Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8360a6f4c27c70231f699b5e8df7586cb03b3717687920aa6d40658bd8f27e7e
Ticket: 87986108835a444a50dbee4ff693f67ce574a648
TclIsInfinite(NaN) returns true for MSVC
User & Date: chrstphrchvz on 2023-04-08 21:51:59
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    In tclInt.h (8.6.13):
    
    <blockquote><pre>
    #ifdef _MSC_VER
    #    define TclIsInfinite(d)	(!(_finite((d))))
    …
    #else
    #    define TclIsInfinite(d)	((d) > DBL_MAX || (d) < -DBL_MAX)
    </pre></blockquote>
    
    The definition used for MSVC will erroneously return true for NaN, inconsistent with the definition on other platforms and the definition in Tcl 8.7 (which deprecates this macro):
    
    <blockquote><pre>
    #   define TclIsInfinite(d)	isinf(d)
    </pre></blockquote>
    
    Should the macro be corrected?
    
  5. foundin changed to: "8.6.13"
  6. is_private changed to: "0"
  7. login: "chrstphrchvz"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "6133eb3026f9b10aa9b7b48da92ae2834fc225b0"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "chrstphrchvz"
  14. subsystem changed to: "52. Portability Support"
  15. title changed to: "TclIsInfinite(NaN) returns true for MSVC"
  16. type changed to: "Bug"