Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 952af8555afb0163facc1e681a4923de0f75c25d
Ticket: 218954ffffffffffffffffffffffffffffffffff
Floating point 'for' loops - value of 0 has significant non
User & Date: nobody on 2000-10-26 01:08:34
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 3083 Bug
    Version: 8.1
    SubmitDate: '1999-10-11'
    LastModified: '1999-11-11'
    Severity: LOW
    Status: Released
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Windows 98
    OSVersion: also Linux Redhat 5.0+
    Machine: X86
    FixedDate: '1999-11-11'
    FixedInVersion: 8.2
    ClosedDate: '2000-10-25'
    
    
    Name:
    Gail
    
    ReproducibleScript:
    % for {set i -0.4} {$i<0.1} {set i [expr $i + 0.10]} {puts $i}
        -0.4
        -0.3
        -0.2
        -0.1
        -2.77555756156e-017
        0.1
    
    ObservedBehavior:
    The value of 0 in the 'for' loop has significant non-zero digits. Loops
        that test for 0.0 to terminate therefore dont terminate.
        Termination is also not correct in the above example, the loop should
        stop before outputting 1.0.
        Happens on intel processors (Pentium) under Linux and MS windows Tcl.
    
    DesiredBehavior:
    No significant non-zero digits after the required number of decimal
        places.
    
    
    
    This bounds checking was added before 8.2. 
    -- 11/11/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to:
    Floating point 'for' loops - value of 0 has significant non 
    
  11. type changed to: "Bug"