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: 4641 Reporter: andrejbauer Assigned to:@xavierleroy Status: closed (set by @xavierleroy on 2011-05-29T10:14:20Z) Resolution: fixed Priority: normal Severity: feature Version: 3.10.2 Fixed in version: 3.12.0+dev Category: ~DO NOT USE (was: OCaml general) Related to:#4652 Monitored by: yoiwa
Bug description
The Big_int module in the Num library would benefit greatly from two simple additions: functions which can shift numbers left and right a given number of bits (the equivalent of asl, lsl, asr, lsr for the type int). Please consider adding them. I am willing to write a patch if someone tells me they will consider it.
Additional information
I am implementing real number computation in Ocaml, for which I am using the MPFR library. Since MPFR is hard to compile and link with Ocaml (requires a bunch of other tools and libraries), I have decided to reimplement dyadic rationals in "pure" Ocaml. To my shock I discovered that the Big_int package doesn't have the bit shifting operations. So now I have to divide by powers of two, which is really inefficient.
The text was updated successfully, but these errors were encountered:
On the CVS trunk, I added big_int implementations for bitwise operations, shifts, and bit extraction. More testing is welcome. If all goes well, this will be released in 3.12.0.
Original bug ID: 4641
Reporter: andrejbauer
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2011-05-29T10:14:20Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 3.10.2
Fixed in version: 3.12.0+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #4652
Monitored by: yoiwa
Bug description
The Big_int module in the Num library would benefit greatly from two simple additions: functions which can shift numbers left and right a given number of bits (the equivalent of asl, lsl, asr, lsr for the type int). Please consider adding them. I am willing to write a patch if someone tells me they will consider it.
Additional information
I am implementing real number computation in Ocaml, for which I am using the MPFR library. Since MPFR is hard to compile and link with Ocaml (requires a bunch of other tools and libraries), I have decided to reimplement dyadic rationals in "pure" Ocaml. To my shock I discovered that the Big_int package doesn't have the bit shifting operations. So now I have to divide by powers of two, which is really inefficient.
The text was updated successfully, but these errors were encountered: