Overview
| Artifact ID: | 5c9265ed2e44a37372f991aecc4100b24728a547 |
|---|---|
| Ticket: | 809784ffffffffffffffffffffffffffffffffff
expr round(12345678901234567890) |
| User & Date: | dkf on 2003-09-20 22:50:56 |
Changes
- closedate changed to: "2003-09-20T15:50:56"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Tcl integers are signed 64-bit values (modulo some complexity which doesn't matter here.) 1234567890123456789 is a value that is precisely representable as a signed 64-bit value, and so is OK. 12345678901234567890 is not, but can be represented as an *unsigned* 64-bit value so we can still parse it (and get the same bit representation) but it is interpreted as a signed 64-bit value and so comes out looking quite different (you can use the [scan] command to print it as an unsigned value if necessary.) 123456789012345678900 is not representable at all in a 64-bit quantity. If you have to work with integers of this size, check out the mpexpr extension. And rest assured that before 8.4 you would have hit the limit with much smaller values (i.e. 32-bits) on your platform! :^/ ("Fixing" this in the core really requires access to a high-quality unencumbered arbitrary-precision arithmetic library, but those are kind-of rare on the ground.) - login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- subsystem changed to: "47. Bytecode Compiler"
- username: "dkf"