| Anonymous | Login | Signup for a new account | 2013-05-20 07:33 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0005262 | OCaml | OCaml general | public | 2011-05-06 21:46 | 2012-09-25 20:06 | |||
| Reporter | edmcman | |||||||
| Assigned To | xclerc | |||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.12.0 | |||||||
| Target Version | Fixed in Version | 3.12.1+dev | ||||||
| Summary | 0005262: Big_int shifting and eq_big_int problems | |||||||
| Description | Taking a small, positive integer < 2^n and shifting it to the right by n bits should result in 0. When using Big_ints, the resulting value v has the following properties: (string_of_big_int v) = "0" but (eq_big_int v zero_big_int) = false. See the sample program: open Big_int let x = big_int_of_int 12;; let sign = shift_right_big_int x 31;; Printf.printf "sign: %s; sign==0: %b\n" (string_of_big_int sign) (eq_big_int sign zero_big_int);; For me, this program displays: sign: 0; sign==0: false I expect it to display: sign: 0; sign==0: true | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-05-06 21:46 | edmcman | New Issue | |
| 2011-05-12 11:00 | xclerc | Status | new => resolved |
| 2011-05-12 11:00 | xclerc | Fixed in Version | => 3.12.1+dev |
| 2011-05-12 11:00 | xclerc | Resolution | open => no change required |
| 2011-05-12 11:00 | xclerc | Assigned To | => xclerc |
| 2011-05-12 17:18 | xleroy | Resolution | no change required => fixed |
| 2012-09-25 20:06 | xleroy | Status | resolved => closed |
| Copyright © 2000 - 2011 MantisBT Group |