package bignum
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=6f577731f8152d96c86d608289cba3b60e94ddf7b9e8b19565fb0e51a2575541
CHANGES.md.html
Release v0.16.0
Big_int
Adds
stable_witness
derivation to both theBigInt.Stable.V1
andBigInt.Stable.V2
modules. This facilitates compatibility checks between different versions of serialized data
Big_num
Add deriving attributes:
Bignum.t
,Bignum.Stable.t
, andBignum.Unstable.t
derivesexp_grammar
Add new functions to
Bignum
:truncate
: Rounds the input towards zero to an integeris_infinite
: Returns true if the number is either positive or negative infinityis_positive_infinity
: Returns true if the number is positive infinityis_negative_infinity
: Returns true if the number is negative infinity
Add
arg_type
toBignum
, for ease of use inCommand.t
based parsers
Old pre-v0.15 changelogs (very likely stale and incomplete)
113.33.00
This release improves the slow path of bignum of string. The previous version used a split on
'_'
followed by a concat, which allocated a bunch of intermediate strings.
113.24.00
Switched to PPX.
The library used polymorphic compare, rather than
Zarith.Q
's compare, in a few locations. Fixed this.Previously stable types in Bignum were defined with unstable types in the scope. Fixd this.
Update to zarith-1.4
113.00.00
Fixed a bug in the =Zarith= library's
to_float
function.These fixes first introduce tests from the base distribution, and then backport a bugfix to the handling of to_float.
112.35.00
Upgraded from Zarith 1.2 to 1.3.
Removed dependence on
Big_int
.
112.24.00
Fixed exception raised by
Bignum.sexp_of_t
when the denominator is zero.
112.17.00
Added
Bigint.random
function, which produces a uniformly distributed value.
112.06.00
Added functions to round from
Bignum.t
toBigint.t
, and to convertBigint.t
intoBignum.t
.
112.01.00
Added
Bignum.Bigint
module, with arbitrary-precision integers based onZarith
, which is significantly faster than theNum.Big_int
library.
111.17.00
Improved the performance of binprot deserialization by removing the allocation of an intermediate type.
111.13.00
Eliminated the dependence of
Bignum
onRe2
, and reduced dependence fromCore
toCore_kernel
.Extended the rounding interface to bring it in line with int and float rounding.
Improved the performance of
Bignum
's binprot.Bignum
's binprot had been to just binprot the decimal string representation. This is both slow to do and unnecessarily big in the majority of cases. Did something better in the majority of cases and fell back to this representation in the exceptional case.$ ./inline_benchmarks_runner Estimated testing time 20s (2 benchmarks x 10s). Change using -quota SECS.
Name Time/Run mWd/Run Percentage bignum0.ml:Stable:Bignum binprot roundtrip compact 7.87us 490.00w 32.88% bignum0.ml:Stable:Bignum binprot roundtrip classic 23.94us 1_079.00w 100.00%