[6262] in Athena Bugs
rt 7.1H: hf77
daemon@ATHENA.MIT.EDU (ellis@ATHENA.MIT.EDU)
Mon Oct 22 17:07:28 1990
From: ellis@ATHENA.MIT.EDU
To: bugs@ATHENA.MIT.EDU
Date: Mon, 22 Oct 90 17:07:12 EDT
System name: e40-008-6
Type and version: RTPC-ROMPC 7.1H (1 update(s) to same version)
Display type:
What were you trying to do?
Use function "lshift" with negative argument for nbits
What's wrong:
According to man page, lshift(word,-nbits) should be equal
rshift ft(word,nbi. For the test program below, this is not true.
What should have happened:
The following program should print out "4" twice. On the RT ,
the first value is zero.
c
c example code - lshift bug
c
in = 128
nbits = 5
write(6,*) lshift(in ,-nbits)
write(6,*) rshift(in ,nbits)
stop
end
Please describe any relevant documentation references:
man 3f lshift