expr number1 +number2 - number1
Closed / Invalid218441ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:57:38
OriginalBugID: 6245 Bug
Version: 8.0.3
SubmitDate: '2000-09-11'
LastModified: '2000-09-26'
Severity: SER
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: All
Machine: 266 Pentium
FixedDate: '2000-10-25'
ClosedDate: '2000-09-26'
Name:
Johannes Schwarzer
ReproducibleScript:
expr 10000 + 0.01 - 10000
ObservedBehavior:
= 0.01000000000002
DesiredBehavior:
= 0.01
This is a natural artifact of the lossiness of floating point math.
If you want the desired behavior, you need to crank down the
tcl_precision value, ie:
set tcl_precision 10
-- 09/26/2000 hobbs
welch Closed ticket [218441ffff].
[History diff]2000-10-26 08:22:16
dgp Ticket [218441ffff]: 4 changes
[History diff]2001-04-16 22:48:33
Log in (anonymous is fine) to add a comment.