From: SourceForge.net <no...@so...> - 2005-08-05 19:24:34
|
Bugs item #1241572, was opened at 2005-07-20 09:52 Message generated for change (Comment added) made by kennykb You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1241572&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 11. Conversions from String Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Kevin B KENNY (kennykb) Summary: [expr] blind spot at corner of 32/64 bit integers Initial Comment: % set x -2147483647; expr {abs($x)} 2147483647 % set x -2147483648; expr {abs($x)} integer value too large to represent % set x -2147483649; expr {abs($x)} 2147483649 This is a practical problem as we use -2147483648 (0x80000000, MIN_INT) to express missing data. Seen in 8.4.1 and 8.5a2 Tclkit, Windows XP and Linux. Ric...@si... ---------------------------------------------------------------------- >Comment By: Kevin B KENNY (kennykb) Date: 2005-08-05 15:24 Message: Logged In: YES user_id=99768 Right you are. Although in 8.4.11, you have to do expr {int(-2147483648)} to tickle the bug. Anyway, abs() is fixed. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2005-07-20 10:05 Message: Logged In: YES user_id=79902 Problem is it that it hits the "FIXME" case in ExprAbsFunc (in tclBasic.c in the HEAD.) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1241572&group_id=10894 |