Skip to content
Tcl Source Code History Of Ticket 1152828
Login

History Of Ticket 1152828

Artifacts Associated With Ticket 1152828

  1. Ticket change [df95d84ef6] (rid 115036) by nobody on 2005-02-27 10:37:52:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      the following steps yield a wrong expr result:
      % expr (2.13 - 1.97) - (2.115 - 1.955)
      -2.22044604925e-16
      
      expected results is 0.0.
      
      Error occures for also for different numbers
      
      Running on tclsh8.3 and tclsh8.4.9 (latest)
      
      emails: [email protected]
                  [email protected]
      
      
      Thanks
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "16. Commands A-H"
    10. title initialized to: "wrong expr result"
    11. type initialized to: "Bug"
  2. Ticket change [47e3765c30] (rid 99783) by dkf on 2005-03-03 05:18:43:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Floating-point numbers are not generally great at
      representing arbitrary decimal numbers, so the differences
      in a case like this can be signficant. Witness, where we're
      using [format] to force a more detailed display of the
      actual values involved.:
        % format %.17f [expr 2.115-1.955]
        0.16000000000000014
        % format %.17f [expr 2.13-1.97]
        0.15999999999999992
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  3. Ticket change [c0d0f59708] (rid 102479) by dkf on 2005-03-03 05:23:33:

    1. status changed to: "Closed"
  4. Ticket change [d6e00f3247] (rid 123882) by dkf on 2005-03-03 05:23:34:

    1. closedate changed to: "2005-03-02T22:23:34"
    2. closer changed to: "dkf"
    3. foundin changed to: "obsolete: 8.4.9"
    4. icomment:
      Logged In: YES 
      user_id=79902
      
      BTW, you'd hit the same problem in any other language with
      IEEE floating point, and an analog in virtually any other
      modern programming system too. Not A Bug, just a
      (Mis)Feature of floats.
      
      
    5. login: "dkf"
    6. mimetype: "text/plain"
    7. resolution changed to: "Invalid"
    8. username: "dkf"