You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6299 Reporter: jrrk100 Status: closed (set by @xavierleroy on 2015-12-11T18:26:44Z) Resolution: not a bug Priority: normal Severity: major Platform: amd64 OS: OSX OS Version: 10.9.1 Category: runtime system and C interface
Bug description
When using x lsr y where y is a large number (> 63), the answer should always be zero, however if y reaches 128 the actual shift goes back to zero.
Steps to reproduce
$ ocaml
OCaml version 4.01.0
1024 lsr 9;;
: int = 2
1 lsr 128;;
: int = 1
The text was updated successfully, but these errors were encountered:
"n lsr m shifts n to the right by m bits. This is a logical shift: zeroes are inserted regardless of the sign of n. The result is unspecified if m < 0 or m >= bitsize."
Note that different processors behave differently if m < 0 or m >= bitsize. For example, x86-64 takes m modulo 64, but ARM-32 takes m modul0 256.
Original bug ID: 6299
Reporter: jrrk100
Status: closed (set by @xavierleroy on 2015-12-11T18:26:44Z)
Resolution: not a bug
Priority: normal
Severity: major
Platform: amd64
OS: OSX
OS Version: 10.9.1
Category: runtime system and C interface
Bug description
When using x lsr y where y is a large number (> 63), the answer should always be zero, however if y reaches 128 the actual shift goes back to zero.
Steps to reproduce
$ ocaml
OCaml version 4.01.0
1024 lsr 9;;
1 lsr 128;;
The text was updated successfully, but these errors were encountered: