Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
f128M_le_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 f128M_le_quiet.c:

Go to the source code of this file.

Functions

bool f128M_le_quiet (const float128_t *aPtr, const float128_t *bPtr)
 

Function Documentation

◆ f128M_le_quiet()

bool f128M_le_quiet ( const float128_t * aPtr,
const float128_t * bPtr )

Definition at line 55 of file f128M_le_quiet.c.

56{
57 const uint32_t *aWPtr, *bWPtr;
58 uint32_t uiA96, uiB96;
59 bool signA, signB;
60 uint32_t wordA, wordB;
61
62 aWPtr = (const uint32_t *) aPtr;
63 bWPtr = (const uint32_t *) bPtr;
64 if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) {
65 if ( f128M_isSignalingNaN( aPtr ) || f128M_isSignalingNaN( bPtr ) ) {
67 }
68 return false;
69 }
70 uiA96 = aWPtr[indexWordHi( 4 )];
71 uiB96 = bWPtr[indexWordHi( 4 )];
72 signA = signF128UI96( uiA96 );
73 signB = signF128UI96( uiB96 );
74 if ( signA != signB ) {
75 if ( signA ) return true;
76 if ( (uiA96 | uiB96) & 0x7FFFFFFF ) return false;
77 wordA = aWPtr[indexWord( 4, 2 )];
78 wordB = bWPtr[indexWord( 4, 2 )];
79 if ( wordA | wordB ) return false;
80 wordA = aWPtr[indexWord( 4, 1 )];
81 wordB = bWPtr[indexWord( 4, 1 )];
82 if ( wordA | wordB ) return false;
83 wordA = aWPtr[indexWord( 4, 0 )];
84 wordB = bWPtr[indexWord( 4, 0 )];
85 return ((wordA | wordB) == 0);
86 }
87 if ( signA ) {
88 aWPtr = (const uint32_t *) bPtr;
89 bWPtr = (const uint32_t *) aPtr;
90 }
91 return (softfloat_compare128M( aWPtr, bWPtr ) <= 0);
92
93}
bool f128M_isSignalingNaN(const float128_t *aPtr)
void softfloat_raiseFlags(uint_fast8_t flags)
bool softfloat_isNaNF128M(const uint32_t *)
#define signF128UI96(a96)
Definition internals.h:247
#define indexWord(total, n)
#define indexWordHi(total)
int_fast8_t softfloat_compare128M(const uint32_t *aPtr, const uint32_t *bPtr)
@ softfloat_flag_invalid
Definition softfloat.h:89
unsigned int uint32_t
Definition stdint.h:126
Here is the call graph for this function: