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

Go to the source code of this file.

Functions

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

Function Documentation

◆ f128M_lt()

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

Definition at line 54 of file f128M_lt.c.

55{
56 const uint32_t *aWPtr, *bWPtr;
57 uint32_t uiA96, uiB96;
58 bool signA, signB;
59 uint32_t wordA, wordB;
60
61 aWPtr = (const uint32_t *) aPtr;
62 bWPtr = (const uint32_t *) bPtr;
63 if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) {
65 return false;
66 }
67 uiA96 = aWPtr[indexWordHi( 4 )];
68 uiB96 = bWPtr[indexWordHi( 4 )];
69 signA = signF128UI96( uiA96 );
70 signB = signF128UI96( uiB96 );
71 if ( signA != signB ) {
72 if ( signB ) return false;
73 if ( (uiA96 | uiB96) & 0x7FFFFFFF ) return true;
74 wordA = aWPtr[indexWord( 4, 2 )];
75 wordB = bWPtr[indexWord( 4, 2 )];
76 if ( wordA | wordB ) return true;
77 wordA = aWPtr[indexWord( 4, 1 )];
78 wordB = bWPtr[indexWord( 4, 1 )];
79 if ( wordA | wordB ) return true;
80 wordA = aWPtr[indexWord( 4, 0 )];
81 wordB = bWPtr[indexWord( 4, 0 )];
82 return ((wordA | wordB) != 0);
83 }
84 if ( signA ) {
85 aWPtr = (const uint32_t *) bPtr;
86 bWPtr = (const uint32_t *) aPtr;
87 }
88 return (softfloat_compare128M( aWPtr, bWPtr ) < 0);
89
90}
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: