Overview
| Artifact ID: | 045f68dc9de064ba6f65cf9418dbe496281e8ab57bf353f00720e25cab039ea2 |
|---|---|
| Ticket: | b8e9a9a97f0d8be15bd549239ec89aa58c11f3f4
expr 52 * 0.001 = 0.052000000000000005 |
| User & Date: | anonymous on 2019-03-08 23:23:49 |
Changes
- comment changed to:
It seems tcl needs to consider how to handle math correctly. See the math example below. It will mess up the results in most of the cases, as long as the user does some simple math. 52 * 0.001 = 0.052000000000000005 0.52 * 0.01 = 0.005200000000000001 0.1 + 0.2 = 0.30000000000000004 I can reproduce this issue in Tcl 8.6.8 for Windows and Tcl 8.5.9 for Windows. (bin) 1 % expr 1 + 3 4 (bin) 2 % expr 52 + 3 55 (bin) 3 % expr 52 * 0.01 0.52 (bin) 4 % expr 52 * 0.001 0.052000000000000005 (bin) 5 % expr 0.52 * 0.01 0.005200000000000001 (bin) 8 % expr 0.1 + 0.2 0.30000000000000004
- login: "anonymous"
- mimetype: "text/plain"