|
@@ -3360,3 +3360,76 @@ flag floatx80_eq_signaling( floatx80 a, floatx80 b )
|
|
|
|| ( ( a.low == 0 )
|
|
|
&& ( (bits16) ( ( a.high | b.high )<<1 ) == 0 ) )
|
|
|
);
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+/*
|
|
|
+-------------------------------------------------------------------------------
|
|
|
+Returns 1 if the extended double-precision floating-point value `a' is less
|
|
|
+than or equal to the corresponding value `b', and 0 otherwise. Quiet NaNs
|
|
|
+do not cause an exception. Otherwise, the comparison is performed according
|
|
|
+to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
|
|
|
+-------------------------------------------------------------------------------
|
|
|
+*/
|
|
|
+flag floatx80_le_quiet( floatx80 a, floatx80 b )
|
|
|
+{
|
|
|
+ flag aSign, bSign;
|
|
|
+
|
|
|
+ if ( ( ( extractFloatx80Exp( a ) == 0x7FFF )
|
|
|
+ && (bits64) ( extractFloatx80Frac( a )<<1 ) )
|
|
|
+ || ( ( extractFloatx80Exp( b ) == 0x7FFF )
|
|
|
+ && (bits64) ( extractFloatx80Frac( b )<<1 ) )
|
|
|
+ ) {
|
|
|
+ /* Do nothing, even if NaN as we're quiet */
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ aSign = extractFloatx80Sign( a );
|
|
|
+ bSign = extractFloatx80Sign( b );
|
|
|
+ if ( aSign != bSign ) {
|
|
|
+ return
|
|
|
+ aSign
|
|
|
+ || ( ( ( (bits16) ( ( a.high | b.high )<<1 ) ) | a.low | b.low )
|
|
|
+ == 0 );
|
|
|
+ }
|
|
|
+ return
|
|
|
+ aSign ? le128( b.high, b.low, a.high, a.low )
|
|
|
+ : le128( a.high, a.low, b.high, b.low );
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+/*
|
|
|
+-------------------------------------------------------------------------------
|
|
|
+Returns 1 if the extended double-precision floating-point value `a' is less
|
|
|
+than the corresponding value `b', and 0 otherwise. Quiet NaNs do not cause
|
|
|
+an exception. Otherwise, the comparison is performed according to the
|
|
|
+IEC/IEEE Standard for Binary Floating-point Arithmetic.
|
|
|
+-------------------------------------------------------------------------------
|
|
|
+*/
|
|
|
+flag floatx80_lt_quiet( floatx80 a, floatx80 b )
|
|
|
+{
|
|
|
+ flag aSign, bSign;
|
|
|
+
|
|
|
+ if ( ( ( extractFloatx80Exp( a ) == 0x7FFF )
|
|
|
+ && (bits64) ( extractFloatx80Frac( a )<<1 ) )
|
|
|
+ || ( ( extractFloatx80Exp( b ) == 0x7FFF )
|
|
|
+ && (bits64) ( extractFloatx80Frac( b )<<1 ) )
|
|
|
+ ) {
|
|
|
+ /* Do nothing, even if NaN as we're quiet */
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ aSign = extractFloatx80Sign( a );
|
|
|
+ bSign = extractFloatx80Sign( b );
|
|
|
+ if ( aSign != bSign ) {
|
|
|
+ return
|
|
|
+ aSign
|
|
|
+ && ( ( ( (bits16) ( ( a.high | b.high )<<1 ) ) | a.low | b.low )
|
|
|
+ != 0 );
|
|
|
+ }
|
|
|
+ return
|
|
|
+ aSign ? lt128( b.high, b.low, a.high, a.low )
|
|
|
+ : lt128( a.high, a.low, b.high, b.low );
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+#endif
|
|
|
+
|