Artifacts Associated With Ticket 1152828
Ticket change [df95d84ef6] (rid 115036) by nobody on 2005-02-27 10:37:52:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- 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
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "16. Commands A-H"
- title initialized to: "wrong expr result"
- type initialized to: "Bug"
Ticket change [47e3765c30] (rid 99783) by dkf on 2005-03-03 05:18:43:
- 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
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [c0d0f59708] (rid 102479) by dkf on 2005-03-03 05:23:33:
- status changed to: "Closed"
Ticket change [d6e00f3247] (rid 123882) by dkf on 2005-03-03 05:23:34:
- closedate changed to: "2005-03-02T22:23:34"
- closer changed to: "dkf"
- foundin changed to: "obsolete: 8.4.9"
- 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.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- username: "dkf"