Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6cf36829696cd0012d4e4f6facf1c3b3c3b84b98
Ticket: 1108528fffffffffffffffffffffffffffffffff
denormals break EIAS
User & Date: dgp on 2005-01-24 18:20:53
Changes

  1. assignee changed to: "kennykb"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    The following script:
    
       set tcl_precision 17
       # Generate a small value.
       set x [expr {exp(-707)}]
       # Push it into denormal territory.
       while {(0.5*$x)>0.0} { set x [expr {0.5*$x}] }
       puts "    x = $x (double)"
       # Get a text value divorced from the double
    representation.
       set y [format "%.17g" $x]
       puts "    y = $y (string)"
       # Doh! Can't convert back to double...
       catch {expr {$y*1.0}} result
       puts "y*1.0 = $result"
       puts "x*1.0 = [expr {$x*1.0}]"
    
    produces:
    
        x = 4.9406564584124654e-324 (double)
        y = 4.9406564584124654e-324 (string)
    y*1.0 = can't use floating-point value as operand of "*"
    x*1.0 = 4.9406564584124654e-324
    
    Clearly this is another example of
    "everything is a string" getting violated.
    
    Secondary issue is that the error message
    is terrible.
    
  4. foundin changed to: "obsolete: 8.5a3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "dgp"
  9. subsystem changed to: "10. Objects"
  10. title changed to: "denormals break EIAS"
  11. type changed to: "Bug"