Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1873b0f5d25da748f05f41547b1898e89160d6e6
Ticket: 761471ffffffffffffffffffffffffffffffffff
INST_EQ issues with NaN
User & Date: msofer on 2004-11-13 04:40:19
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    
    Note that  (at the top)
    
    #ifdef BORKEN_STIFF_COMPILER
    #define IS_NAN(x) _isnan(x)
    #else
    #define IS_NAN(x) ((x) != (x))
    #endif
    
    and the code below at line 3383 would fix the issue of msvc
    not doing the right comparisons for NaN, but does not touch
    the other brokenness in win: that strtod() does not
    recognize "NaN" as a double. 
    
    FWIW, that can be written simpler as
    
    #ifdef BORKEN_STIFF_COMPILER
        if (IS_NAN(d1) || IS_NAN(d2)) {
            iResult = (*pc == INST_NEQ);
            goto foundResult;
        }
    #endif
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"