Overview
| Artifact ID: | 2c97a15461e9b08d2e2a78f6d3d63ea1cd78003e |
|---|---|
| Ticket: | 410043ffffffffffffffffffffffffffffffffff
"if" does not evaluate same as "expr" |
| User & Date: | dkf on 2001-03-20 23:43:47 |
Changes
- closedate changed to: "2001-03-20T16:43:47"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 This problem (a known feature of Tcl that is unlikely to ever be altered for a host of deep reasons) stems from the fact that 0.1 is not a precisely representable floating point number and that arguments to [expr] are [concat]enated before evaluation. Rerun the script with tcl_precision set to 17, or with the expression to pass to [expr] in {braces}, and you'll get agreement between the "bare if" and the "if with expr". If this matters very much, use fixed-point arithmetic instead. - login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- title changed to: ""if" does not evaluate same as "expr""
- username: "dkf"