Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2006-09-29
03:07 • Closed ticket [1567222fff]: error in bignum << computation plus 7 othe... artifact: a10f5a08df user: dgp
02:26 • Ticket [1567222fff]: 4 changes artifact: 87aa23aa08 user: dgp
2006-09-28
18:29 • New ticket [1567222fff]. artifact: e5b15bb45c user: dgp

error in bignum << computation

Closed / Fixed1567222fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2006-09-28 18:29:29
On 32-bit systems, the correct
result:

% expr {(500000000000000<<28)}
134217728000000000000000

On an LP64 system:

% expr {(500000000000000<<28)}
-781880310697558016
dgpplain2006-09-29 02:26:15
Logged In: YES 
user_id=80530


Wow.  That was subtle.

Code had literal "1"
where it needed to have "1L"
or perhaps "((long)1)".
dgpplain2006-09-29 03:07:02
Logged In: YES 
user_id=80530

fix committed
Log in (anonymous is fine) to add a comment.