Overview
| Artifact ID: | 59ef054a6aa50b1d7de8dbfd640a85a258371880 |
|---|---|
| Ticket: | 1273713fffffffffffffffffffffffffffffffff
Expr with acos |
| User & Date: | msofer on 2005-08-27 00:58:58 |
Changes
- assignee changed to: "msofer"
- closedate changed to: "2005-08-26T17:58:58"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 Oops - sorry, had not seen the attached file. I did take a look at the new "Full test case" (it is missing a paren in line 51, but this is irrelevant for this bug report) The problem is caused by the fact that your expressions in line 50 and 51 are not {}'quoted. This causes the values of the variables to be re-read from their string representation, with some loss in precision if tcl_precision is less than 17 (it is 12 by default). This is not really a bug. So there are two possible fixes (and I recommend using both): (1) do {}'quote your expressions: it is much faster, it does not produce these effects, and is almost always the right thing to do. There are few cases where you may want two substitution rounds (one by the tcl interpreter, one by the [expr]) interpreter). If that is what you're after, it will be clear to you. (2) do 'set ::tcl_precision 17' when working with doubles (but see http://www.tcl.tk/man/tcl8.4/TclCmd/tclvars.htm#M39 for some gotchas) - login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Pending"
- username: "msofer"