Right shift vs. divide

emjej at uokvax.UUCP emjej at uokvax.UUCP
Sun Dec 29 23:49:00 AEST 1985


And still wrong, because after all the significant bits go away, you get
-1 instead of 0, which you should get.  I guess some things have to be
rediscovered occasionally.

						James Jones

Anybody's compiler have sufficient smarts to puzzle out control flow
and turn the example given into an assignment of -3 (or is that -4? not
many computers do integer division the way we learned it back in foundations
or ring theory!) to the variable?



More information about the Comp.lang.c mailing list