Overview
| Artifact ID: | 935cff34eeac6ee2ef68029b794c59ec0e000b76 |
|---|---|
| Ticket: | 761471ffffffffffffffffffffffffffffffffff
INST_EQ issues with NaN |
| User & Date: | kennykb on 2004-11-05 23:34:28 |
Changes
- assignee changed to: "msofer"
- icomment:
Logged In: YES user_id=99768 Ugh. I just looked this one up. VC++6 is not IEEE-754 compliant with respect to NaN comparisons. (I disassembled the object code - and verified this. It simply doesn't check for "unordered" in the result word. VC.NET allegedly fixes this - see for example http://msdn.microsoft.com/library/en-us/dndeepc/html/deep05282002.asp Where does that leave us? We probably need to do explicit tests for the "special values" when compiling on VC++6. There are tests available in <float.h>: _finite(x) - Returns TRUE for ordinary and subnormal values, FALSE for Inf and NaN _isnan(x) - Returns TRUE for NaN, FALSE for everything else. _fpclass(x) - Returns a value that classifies a given FP number. See http://msdn.microsoft.com/library/en-us/vccore98/HTML/_crt__fpclass.asp for the constants.
- login: "kennykb"
- mimetype: "text/plain"
- resolution changed to: "None"
- username: "kennykb"