Rev 697 | Rev 804 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 697 | Rev 734 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | { /* NaN : exp = 0x7ff and nonzero mantisa */ |
38 | { /* NaN : exp = 0x7ff and nonzero mantisa */ |
39 | return ((d.parts.exp==0x7FF)&&(d.parts.mantisa)); |
39 | return ((d.parts.exp==0x7FF)&&(d.parts.mantisa)); |
40 | }; |
40 | }; |
41 | 41 | ||
42 | inline int isFloat32SigNaN(float32 f) |
42 | inline int isFloat32SigNaN(float32 f) |
43 | { /* SigNaN : exp = 0xff mantisa = 1xxxxx..x (binary), where at least one x is nonzero */ |
43 | { /* SigNaN : exp = 0xff mantisa = 0xxxxx..x (binary), where at least one x is nonzero */ |
44 | return ((f.parts.exp==0xFF)&&(f.parts.mantisa>0x400000)); |
44 | return ((f.parts.exp==0xFF)&&(f.parts.mantisa<0x400000)&&(f.parts.mantisa)); |
45 | }; |
45 | }; |
46 | 46 | ||
47 | inline int isFloat64SigNaN(float64 d) |
47 | inline int isFloat64SigNaN(float64 d) |
48 | { /* SigNaN : exp = 0x7ff mantisa = 1xxxxx..x (binary), where at least one x is nonzero */ |
48 | { /* SigNaN : exp = 0x7ff mantisa = 0xxxxx..x (binary), where at least one x is nonzero */ |
49 | return ((d.parts.exp==0x7FF)&&(d.parts.mantisa>0x8000000000000ll)); |
49 | return ((d.parts.exp==0x7FF)&&(d.parts.mantisa)&&(d.parts.mantisa<0x8000000000000ll)); |
50 | }; |
50 | }; |
51 | 51 | ||
52 | inline int isFloat32Infinity(float32 f) |
52 | inline int isFloat32Infinity(float32 f) |
53 | { |
53 | { |
54 | return ((f.parts.exp==0xFF)&&(f.parts.mantisa==0x0)); |
54 | return ((f.parts.exp==0xFF)&&(f.parts.mantisa==0x0)); |