shift left arithmetic

Andries Brouwer aeb at cwi.nl
Tue Sep 11 03:18:25 AEST 1990


vu0310 at bingvaxu.cc.binghamton.edu (R. Kym Horsell) writes:

#>While debugging an Australian computer algebra package
#>I stumbled over the following: 1<<32 produced 0, but
#>int a; a=1; a<<32 produced 1. (Of course the word length

#Compiler (may not be) broken -- try 1L<<32. (You didn't
#say that the size of _int_'s was 32 bits).

True, but in fact it was, and 1<<32 and 1L<<32 produce the same results.



More information about the Comp.std.c mailing list