Skip to content
Tcl Source Code View Ticket
Login

View Ticket

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.