|
2009-06-03
| ||
| 00:58 | • Closed ticket [2798543fff]: bogus bignum exponent calculations plus 7 other ... artifact: c977c26d3a user: dgp | |
|
2009-06-02
| ||
| 04:35 | • Ticket [2798543fff]: 4 changes artifact: 1d46836385 user: dgp | |
|
2009-06-01
| ||
| 23:55 | • Ticket [2798543fff]: 4 changes artifact: 1b1852da55 user: dgp | |
| 22:39 | • Ticket [2798543fff]: 4 changes artifact: 66b6c05e70 user: andreas_kupries | |
|
2009-05-30
| ||
| 22:01 | • Ticket [2798543fff]: 4 changes artifact: d88c56dbdc user: dgp | |
| 04:54 | • Ticket [2798543fff]: 4 changes artifact: 2e7fb92ad2 user: andreas_kupries | |
| 04:36 | • Ticket [2798543fff]: 4 changes artifact: 2044aecfcc user: dgp | |
| 02:35 | • Ticket [2798543fff]: 4 changes artifact: 83a51dd17d user: dgp | |
| 02:25 | • Ticket [2798543fff]: 4 changes artifact: 2fffb0aab8 user: dgp | |
|
2009-05-29
| ||
| 18:53 | • New ticket [2798543fff]. artifact: 81c7e8897e user: dgp | |
bogus bignum exponent calculations
Closed / Fixed2798543fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2009-05-29 18:53:19
% string length [expr {10**2**15}]
32769
% string length [expr {10**2**16}]
17
% expr {10**2**16}
21936950640377856
dgpplain2009-05-30 02:25:15
Simpler demo:
% expr {10**65536}
21936950640377856
Something in the logic that chooses
among the many (!!) implementations of
exponent computation is borked.
dgpplain2009-05-30 02:35:02
Something wrong computing the value of "base" at line 5963? Computation is done in a short int, but what happens when l2 is so big that we're overflowing that?
dgpplain2009-05-30 04:36:32
More ugliness:
% expr {10**65553 == 10**17}
1
andreas_kupriesplain2009-05-30 04:54:11
Curiosity: Is that ugliness all in Tcl's use of libtommath, or in libtommath itself ?
dgpplain2009-05-30 22:01:16
Neither. All appearances say it's in TEBC's own "optimized table lookup" implementation.
andreas_kupriesplain2009-06-01 22:39:01
Ok. The optimized table lookup is Kevin's work, IIRC.
dgpplain2009-06-01 23:55:03
Similar trouble in the 32 bit
table lookup:
% expr {7**9 == 7**65545}
1
dgpplain2009-06-02 04:35:54
tests committed demonstrating broken cases
dgpplain2009-06-03 00:58:29
allow_comments - 1 Fixes committed.
Log in (anonymous is fine) to add a comment.