Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ba2b9b685fd39073b7955a58849ed483579741aa
Ticket: 3105247fffffffffffffffffffffffffffffffff
-NaN?
User & Date: nijtmans on 2010-12-02 18:02:03
Changes

  1. icomment:
    >Setting status to "pending - invalid"
    
    Well, I already spent too much time on this, and forced the same to some other people.
    Sorry about that. Here my conclusion, for the interested.
    
    For more information, See: <http://www.validlab.com/754R/drafts/archive/2006-10-04.pdf>
    
    After reading this (and the wiki about it), I come to the same conclusion:
    
    >A NaN may also carry a payload, intended for diagnostic information indicating
    >the source of the NaN. The sign of a NaN has no meaning, but it may
    >be predictable in some circumstances.
    ...
    >Conversion of a quiet NaN in internal format to an external character sequence
    >shall produce a language defined one of “nan” or a sequence that is equivalent
    >except for case (e.g., “NaN”), with an optional preceding sign.
    
    >Languages should provide an optional conversion of NaNs in internal format to
    >external character sequences that appends to the basic NaN character sequences
    >a suffix that can represent the NaN payload (see 8.2). The form and interpretation
    >of the payload suffix is language defined. The language should require that any such
    >optional output sequences be recognized as input in conversion of external character
    >sequences to internal formats.
    
    So, there is only one NaN, the extra bits (payload) and the sign are optional. External
    software should not generate a negative sign, since it has no meaning it should have
    used the payload for that. But the parser is required to accept an optional payload as
    valid NaN! This means, the Tcl numeric parser is conforming to IEEE754. Changing that,
    would interpret the sign as part of the payload, which is not a good idea.
    
    Regards,
           Jan Nijtmans
    
    
  2. login: "nijtmans"
  3. mimetype: "text/plain"
  4. username: "nijtmans"