Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e65fd3af66c06b2ca5954704cd56f3da5dded0a9
Ticket: 576512ffffffffffffffffffffffffffffffffff
Math problem.
User & Date: dgp on 2002-07-03 02:10:33
Changes

  1. icomment:
    Logged In: YES 
    user_id=80530
    
    "So, apparently the expr procedure evaluates differently
    than the parsing of the if conditional"
    
    No, you will find that
    
        [expr {3.6 > $x}]
    
    always gives the same result as
    
       if {3.6 > $x} {...}
    
    You did not enclose the expression in
    braces, so two rounds of substituion
    occurred, including a translation from
    double -> string -> double.  Such
    translations often lose precision and
    change the precise floating point value.
    
    Seeking arbitrarily precise answers involving
    floating point values is a mistake in the
    first place.
    
    
  2. login: "dgp"
  3. mimetype: "text/plain"
  4. status changed to: "Open"
  5. username: "dgp"