Skip to content
Tcl Source Code Artifact [5088f15e81]
Login

Artifact [5088f15e81]

Artifact 5088f15e8141a35325a927d8e7866f367f1facf0:

Ticket change [5088f15e81] - Ticket [1340260fffffffff|1340260fff] <i>Simplify round() implementation in expr cmd</i> status still Closed with 4 other changes by kennykb on 2005-11-02 02:13:36.
D 2005-11-02T02:13:36
J icomment Logged\sIn:\sYES\s\nuser_id=99768\n\nDon\sis\scorrect\s-\sbecause\sof\sthe\sdouble\srounding\sstep.\n\nConverting\sa\swide\sto\sa\sdouble\shas\sto\sround\sto\s53\ssignificant\nbits,\sso\sconverting\s0x7fffffffffffffff\srounds\sup:\n\n%\sexpr\s0x7fffffffffffffff\n9223372036854775807\n%\sexpr\sentier(double(0x7fffffffffffffff))\n9223372036854775808\n\nRounding\sthe\sdouble\sthen\syields\san\sinteger\sthat\soverflows\nwhen\sreconverted\sto\s64-bits,\sso\swinds\sup\sbeing\snegative\nrather\sthan\spositive.\n
J login kennykb
J mimetype text/plain
J username kennykb
K 1340260fffffffffffffffffffffffffffffffff
U kennykb
Z 6d8d4895df2d69891f5edbac06526f30