Artifacts Associated With Ticket 1561260
Ticket change [0af29bbe4b] (rid 113907) by sarnold75 on 2006-09-19 07:58:00:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- comment initialized to:
tcl_platform(byteOrder) = littleEndian tcl_platform(machine) = intel tcl_platform(os) = Windows NT tcl_platform(osVersion) = 5.1 tcl_platform(platform) = windows tcl_platform(threaded) = 1 tcl_platform(user) = Stéphane ARNOLD tcl_platform(wordSize) = 4 ****** I was debugging a math package (in tcllib) named math::bigfloat. I figure that 2**exp * 5**exp equals 10**exp. Not in Tcl 8.5a5! (and 8.5a4 either, I guess) % expr (2**32)*(5**32) 14058906998405956947534675968 The expected result would be: % expr (2**32)*(5**32) 100000000000000000000000000000000 It seems that expr 5**32 does not provide a good result: % expr 5**32 3273344365508751233 A multiple of five should end with the digit 5, isn't it? Strange behavior... I am relying on powers and shifts to perform bigfloat computations.
- foundin initialized to: "obsolete: 8.5a5"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "sarnold75"
- subsystem initialized to: "48. Number Handling"
- title initialized to: "Problem with big integers"
- type initialized to: "Bug"
Ticket change [3f60e9036a] (rid 121443) by dgp on 2006-09-19 21:55:15:
- icomment:
Logged In: YES user_id=80530 Confirmed: % expr 5**27 7450580596923828125 % expr 5**28 359414837200037393 I'm worried this might be a problem in libtommath. Investigating...
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [44e22f08b0] (rid 116782) by dkf on 2006-09-19 22:11:54:
- icomment:
Logged In: YES user_id=79902 Looks like a problem at the boundary between 64-bit and arbitrary precision.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [e92ded6e4b] (rid 104770) by dgp on 2006-09-19 22:58:24:
- icomment:
Logged In: YES user_id=80530 yep, overflow detection is a complete botch.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [6b3df26771] (rid 128285) by dgp on 2006-09-19 23:31:57:
- closedate changed to: "2006-09-19T16:31:57"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Fixed by removing all the broken "clever" attempts to contain these calculations in native types. All non-trivial exponentiation calculations now done in bignums.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"