package bigdecimal
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=7a73ad6a6a742e874d888904d9e78b5174c2ee80d769684d36027df84cb6a8d7
CHANGES.md.html
Release v0.17.0
broke dependency on expect_test_helpers_core
added rounding dir parameter
added support for bankers rounding
added new human readable sexp format representation
Release v0.16.0
Add new functions and constants to
Bigdecimal
:Bigdecimal.one
represents the value one in theBigdecimal
typediv
: computes the division of twoBigdecimal
values with optionaldecimals_precision
parameter (default 15)sqrt
: computes the square root of aBigdecimal
value with optionaldecimals_precision
parameter (default 15)**
: computes the power of aBigdecimal
value raised to a non-negative integer exponentscale_int
: scales aBigdecimal
value by an integer factoris_integral
: returns true if and only if the input value is an integerround_to_power_of_ten
: rounds the given value to the nearest power of ten with optional rounding direction parameterto_bigint_exact
: converts the given value to an exactBigint.t
if it is an integral value; returnsNone
otherwiseto_bigint_exact_exn
: converts the given value to an exactBigint.t
if it is an integral value; raises an exception otherwiselog10_int_exact
: calculates the log in base 10; returnsOption.None
if the result is not representable as an integer