Changeset 1266543 in mainline for softfloat/generic/comparison.c
- Timestamp:
- 2006-02-07T00:41:18Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1a030b8
- Parents:
- b7e65d4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified softfloat/generic/comparison.c ¶
rb7e65d4 r1266543 31 31 32 32 inline int isFloat32NaN(float32 f) 33 { /* NaN : exp = 0xff and nonzero mantisa*/34 return ((f.parts.exp==0xFF)&&(f.parts. mantisa));33 { /* NaN : exp = 0xff and nonzero fraction */ 34 return ((f.parts.exp==0xFF)&&(f.parts.fraction)); 35 35 }; 36 36 37 37 inline int isFloat64NaN(float64 d) 38 { /* NaN : exp = 0x7ff and nonzero mantisa*/39 return ((d.parts.exp==0x7FF)&&(d.parts. mantisa));38 { /* NaN : exp = 0x7ff and nonzero fraction */ 39 return ((d.parts.exp==0x7FF)&&(d.parts.fraction)); 40 40 }; 41 41 42 42 inline int isFloat32SigNaN(float32 f) 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)&&(f.parts.mantisa));43 { /* SigNaN : exp = 0xff fraction = 0xxxxx..x (binary), where at least one x is nonzero */ 44 return ((f.parts.exp==0xFF)&&(f.parts.fraction<0x400000)&&(f.parts.fraction)); 45 45 }; 46 46 47 47 inline int isFloat64SigNaN(float64 d) 48 { /* SigNaN : exp = 0x7ff mantisa= 0xxxxx..x (binary), where at least one x is nonzero */49 return ((d.parts.exp==0x7FF)&&(d.parts. mantisa)&&(d.parts.mantisa<0x8000000000000ll));48 { /* SigNaN : exp = 0x7ff fraction = 0xxxxx..x (binary), where at least one x is nonzero */ 49 return ((d.parts.exp==0x7FF)&&(d.parts.fraction)&&(d.parts.fraction<0x8000000000000ll)); 50 50 }; 51 51 52 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.fraction==0x0)); 55 55 }; 56 56 57 57 inline int isFloat64Infinity(float64 d) 58 58 { 59 return ((d.parts.exp==0x7FF)&&(d.parts. mantisa==0x0));59 return ((d.parts.exp==0x7FF)&&(d.parts.fraction==0x0)); 60 60 }; 61 61
Note:
See TracChangeset
for help on using the changeset viewer.