Changeset 7e557805 in mainline for softfloat/generic/comparison.c
- Timestamp:
- 2005-12-20T12:48:15Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e649dfa
- Parents:
- b5440cf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
softfloat/generic/comparison.c
rb5440cf r7e557805 40 40 }; 41 41 42 inline int isFloat32Infinity(float32 f) 43 { 44 return ((f.parts.exp==0xFF)&&(f.parts.mantisa==0x0)); 45 }; 46 47 /** 48 * @return 1, if both floats are equal - but NaNs are not recognized 49 */ 50 inline int isFloat32eq(float32 a, float32 b) 51 { 52 return ((a==b)||(((a.binary| b.binary)&0x7FFFFFFF)==0)); /* a equals to b or both are zeros (with any sign) */ 53 } 54 55 /** 56 * @return 1, if a>b - but NaNs are not recognized 57 */ 58 inline int isFloat32lt(float32 a, float32 b) 59 { 60 if (((a.binary| b.binary)&0x7FFFFFFF)==0) { 61 return 0; 62 }; 63 a.parts.sign^=a.parts.sign; 64 b.parts.sign^=b.parts.sign; 65 return (a.binary<b.binary); 66 67 } 68 69
Note:
See TracChangeset
for help on using the changeset viewer.