| Anonymous | Login | Signup for a new account | 2013-05-24 05:57 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 | |||
| 0005123 | OCaml | OCaml general | public | 2010-08-09 13:46 | 2010-08-18 15:22 | |||
| Reporter | profjim | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | tweak | 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 | 0005123: Big_int.shift_right* methods never yield zero_big_int | |||||||
| Description | # compare Big_int.(shift_right_big_int (big_int_of_int 1) 1) (Big_int.zero_big_int);; - : int = 1 This is because the shift_right methods just copy over the sign of the first argument, without checking whether the value has gone to zero. However: # compare Big_int.(add_big_int (shift_right_big_int (big_int_of_int 1) 1) zero_big_int) (Big_int.zero_big_int);; - : int = 0 | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0005635) profjim (reporter) 2010-08-09 13:48 edited on: 2010-08-09 13:50 |
Using Big_int.compare_big_int instead of Pervasives.compare also fails: # Big_int.compare_big_int (Big_int.shift_right_big_int (Big_int.big_int_of_int 1) 1) (Big_int.zero_big_int);; - : int = 1 |
|
(0005639) doligez (manager) 2010-08-18 15:22 |
Thanks for the report. This will be fixed in 3.12.1. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-08-09 13:46 | profjim | New Issue | |
| 2010-08-09 13:48 | profjim | Note Added: 0005635 | |
| 2010-08-09 13:50 | profjim | Note Edited: 0005635 | |
| 2010-08-18 15:22 | doligez | Note Added: 0005639 | |
| 2010-08-18 15:22 | doligez | Status | new => closed |
| 2010-08-18 15:22 | doligez | Resolution | open => fixed |
| 2010-08-18 15:22 | doligez | Fixed in Version | => 3.12.1+dev |
| Copyright © 2000 - 2011 MantisBT Group |