5 Stubs to check for extremities of (IEEE) floats,
6 the tests have been (artfully) lifted from the hbc-0.9999.3 (lib/fltcode.c)
11 #if (defined (sun) && !defined(i386)) || defined(hp300) || defined(_IBMR2) || defined(sgi) || defined(hppa)
16 #include "ieee-flpt.h"
17 #include "floatExtreme.h"
27 #ifdef IEEE_FLOATING_POINT
33 union { double d; int i[2]; } u;
41 hx |= (unsigned int)(lx|(-lx))>>31;
43 r = (int)((unsigned int)(hx))>>31;
51 union { double d; int i[2]; } u;
64 isDoubleDenormalized(d)
67 union { double d; int i[2]; } u;
72 iexp = high & (0x7ff << 20);
77 isDoubleNegativeZero(d)
80 union { double d; int i[2]; } u;
84 return (u.i[H] == 0x80000000 && u.i[L] == 0);
97 r = (int)(((unsigned int)(ix))>>31);
114 isFloatDenormalized(f)
120 iexp = high & (0xff << 23);
125 isFloatNegativeZero(f)
129 return (high == 0x80000000);
135 StgInt isDoubleNaN(d) StgDouble d; { return 0; }
136 StgInt isDoubleInfinite(d) StgDouble d; { return 0; }
137 StgInt isDoubleDenormalized(d) StgDouble d; { return 0; }
138 StgInt isDoubleNegativeZero(d) StgDouble d; { return 0; }
139 StgInt isFloatNaN(f) StgFloat f; { return 0; }
140 StgInt isFloatInfinite(f) StgFloat f; { return 0; }
141 StgInt isFloatDenormalized(f) StgFloat f; { return 0; }
142 StgInt isFloatNegativeZero(f) StgFloat f; { return 0; }