Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
extF80M_lt_quiet.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include "platform.h"
#include "internals.h"
#include "specialize.h"
#include "softfloat.h"
Include dependency graph for extF80M_lt_quiet.c:

Go to the source code of this file.

Functions

bool extF80M_lt_quiet (const extFloat80_t *aPtr, const extFloat80_t *bPtr)
 

Function Documentation

◆ extF80M_lt_quiet()

bool extF80M_lt_quiet ( const extFloat80_t * aPtr,
const extFloat80_t * bPtr )

Definition at line 55 of file extF80M_lt_quiet.c.

56{
57 const struct extFloat80M *aSPtr, *bSPtr;
58 uint_fast16_t uiA64;
59 uint64_t uiA0;
60 uint_fast16_t uiB64;
61 uint64_t uiB0;
62 bool signA, ltMags;
63
64 /*------------------------------------------------------------------------
65 *------------------------------------------------------------------------*/
66 aSPtr = (const struct extFloat80M *) aPtr;
67 bSPtr = (const struct extFloat80M *) bPtr;
68 /*------------------------------------------------------------------------
69 *------------------------------------------------------------------------*/
70 uiA64 = aSPtr->signExp;
71 uiA0 = aSPtr->signif;
72 uiB64 = bSPtr->signExp;
73 uiB0 = bSPtr->signif;
74 /*------------------------------------------------------------------------
75 *------------------------------------------------------------------------*/
76 if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) {
77 if (
78 softfloat_isSigNaNExtF80UI( uiA64, uiA0 )
79 || softfloat_isSigNaNExtF80UI( uiB64, uiB0 )
80 ) {
82 }
83 return false;
84 }
85 /*------------------------------------------------------------------------
86 *------------------------------------------------------------------------*/
87 signA = signExtF80UI64( uiA64 );
88 if ( (uiA64 ^ uiB64) & 0x8000 ) {
89 /*--------------------------------------------------------------------
90 | Signs are different.
91 *--------------------------------------------------------------------*/
92 return signA && ((uiA0 | uiB0) != 0);
93 } else {
94 /*--------------------------------------------------------------------
95 | Signs are the same.
96 *--------------------------------------------------------------------*/
97 if ( ! ((uiA0 & uiB0) & UINT64_C( 0x8000000000000000 )) ) {
98 return (softfloat_compareNonnormExtF80M( aSPtr, bSPtr ) < 0);
99 }
100 if ( uiA64 == uiB64 ) {
101 if ( uiA0 == uiB0 ) return false;
102 ltMags = (uiA0 < uiB0);
103 } else {
104 ltMags = (uiA64 < uiB64);
105 }
106 return signA ^ ltMags;
107 }
108
109}
void softfloat_raiseFlags(uint_fast8_t flags)
#define softfloat_isSigNaNExtF80UI(uiA64, uiA0)
Definition specialize.h:202
int softfloat_compareNonnormExtF80M(const struct extFloat80M *, const struct extFloat80M *)
#define isNaNExtF80UI(a64, a0)
Definition internals.h:150
#define signExtF80UI64(a64)
Definition internals.h:146
@ softfloat_flag_invalid
Definition softfloat.h:89
uint16_t uint_fast16_t
Definition stdint.h:155
#define UINT64_C(val)
Definition stdint.h:284
unsigned __int64 uint64_t
Definition stdint.h:136
uint64_t signif
uint16_t signExp
Here is the call graph for this function: