From: SourceForge.net <no...@so...> - 2005-10-31 17:10:53
|
Bugs item #1341368, was opened at 2005-10-29 02:43 Message generated for change (Comment added) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1341368&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: 44. Parsing and Eval Group: current: 8.4.11 >Status: Open >Resolution: Remind Priority: 5 Submitted By: Don Porter (dgp) Assigned to: Mo DeJong (mdejong) Summary: expr-46.13-18 fail on 64-bit systems Initial Comment: ==== expr-46.13 round() boundary case - largest int FAILED ==== Contents of test case: set imax [expr {((1<<31) + 1) * -1}] expr {round($imax - 0.51)} ---- Result was: -2147483650 ---- Result should have been (exact matching): 2147483646 ==== expr-46.13 FAILED ==== expr-46.14 round() boundary case - largest int FAILED ==== Contents of test case: set imax [expr {((1<<31) + 1) * -1}] expr {round($imax - 0.50)} ---- Result was: -2147483650 ---- Result should have been (exact matching): 2147483647 ==== expr-46.14 FAILED ==== expr-46.15 round() boundary case - becomes wide int FAILED ==== Contents of test case: set imax [expr {((1<<31) + 1) * -1}] expr {round($imax + 0.50)} ---- Result was: -2147483649 ---- Result should have been (exact matching): 2147483648 ==== expr-46.15 FAILED ==== expr-46.16 round() boundary case - smallest int FAILED ==== Contents of test case: set imin [expr {1<<31}] expr {round($imin + 0.51)} ---- Result was: 2147483649 ---- Result should have been (exact matching): -2147483647 ==== expr-46.16 FAILED ==== expr-46.17 round() boundary case - smallest int FAILED ==== Contents of test case: set imin [expr {1<<31}] expr {round($imin + 0.50)} ---- Result was: 2147483649 ---- Result should have been (exact matching): -2147483648 ==== expr-46.17 FAILED ==== expr-46.18 round() boundary case - becomes wide int FAILED ==== Contents of test case: set imin [expr {1<<31}] expr {round($imin - 0.50)} ---- Result was: 2147483648 ---- Result should have been (exact matching): -2147483649 ==== expr-46.18 FAILED Perhaps it's just missing test constraints; the tests appear suitable only for systems on which the C long type is 32-bit. Still the point of the tests elude me. Just more stuff that's changing in 8.5, right? If we haven't tested it before, why start now? ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2005-10-31 12:10 Message: Logged In: YES user_id=80530 Now instead of failing, the tests throw the error "integer value too large to represent". ---------------------------------------------------------------------- Comment By: Mo DeJong (mdejong) Date: 2005-10-29 16:00 Message: Logged In: YES user_id=90858 Fixed problem by adding 32bit vs 64 bit logic. As far as the 8.5 bit, it needs to behave like the expr impl in 8.4 for numbers that fit inside longs anyway. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1341368&group_id=10894 |