- Mark
FBig::from_str_native
as deprecated. - Implement
TryFrom<Repr>
andTryFrom<FBig>
for primitive integers. - Implement
TryFrom<Repr<2>>
andTryFrom<FBig<_, 2>>
for primitive floats. - Implement
From<UBig>
andFrom<IBig>
forRepr
. - Implement
core::fmt::{Binary, Oct, LowerExp, UpperExp, LowerHex, UpperHex}
forRepr
,FBig
(some are limited to certain bases).
- Add
Repr::from_static_words
to support thestatic_fbig!
andstatic_dbig!
macros. - Add
FBig::from_repr_const
to support create anFBig
instance from repr in const context. - Add conversion from
f32
/f64
toRepr<2>
. - Implement
NumOrd
betweenFBig
and primitive integers / floats. - Implement
AbsOrd
betweenFBig
andUBig
/IBig
. - Now the
Debug
output ofFBig
values will not contains the rounding mode information (when alternative flag is not set).
- Fix the termination criteria for
ln
andexp
series (#44). - Fix
powf
panicking when base is 0.
- Implement
num-order::NumOrd
betweenFBig
andUBig
/IBig
and betweenFBig
with different bases. - Implement
num-order::NumHash
forFBig
andRepr
. - Add
ErrorBounds
trait that calculate the rounding range for a floating point number.
- Now feature
num-traits
andrand
are not enabled by default, featurenum-order
is enabled instead. - The type of
Repr::BASE
is changed fromIBig
toUBig
UBig::square
andIBig::square
are renamed tosqr
.- The implementation of square root is now implemented by the
dashu_base::SquareRoot
trait instead of a standalone method ofFBig
. - The rounding behaviors of
FBig::to_decimal
andFBig::to_binary
are changed for better ergonomics. - The rounding behaviors of
FBig::to_f32
andFBig::to_f64
now follow the mode specified by the type argument.
- The default precision for float numbers from
from_parts
/From<UBig>
/From<IBig>
are now based on the actual digits on the integers, rather than the digits after simplification. (#28)
- Implement
num_traits::{Zero, One, FromPrimitive, ToPrimitive, Num, Signed, Euclid, Pow}
forFBig
(#19) - Implement
rand::distributions::uniform::UniformSampler
forFBig
throughcrate::rand::UniformFBig
- Implement
rand::distributions::{Open01, OpenClosed01, Standard}
forFBig
- Implement
dashu_base::Inverse
forFBig
- Implement
rand::distributions::uniform::SampleUniform
forFBig
. - Implement
serde::{Serialize, Deserialize}
forFBig
andRepr
- Implement
Rem
trait forFBig
- Add support of random floating point numbers generation through
crate::rand::Uniform01
andcrate::rand::UniformFBig
. - Add support for serialization from/to PostgreSQL arguments through
diesel::{deserialize::FromSql, serialize::ToSql}
andpostgres_types::{FromSql, ToSql}
. - Add
from_str_native()
forRepr
- Add
to_f32()
,to_f64()
forRepr
, and these two methods supports all bases for bothRepr
andFBig
. - Add
to_int()
forRepr
, which is equivalent toFBig::trunc()
- Add
TryFrom<FBig>
forUBig
andIBig
- Add
round()
forFBig
- Add
rand_v08
andnum-traits_v02
feature flags to prevent breaking changes due to dependency updates in future - Re-export operation traits through the
ops
module.
- Conversion from FBig to
f32
/f64
support subnormal values now. - Add a
split_at_point()
function toFBig
- Implement
core::iter::{Sum, Product}
forFBig
- Implement
powf
,sqrt
forFBig
- Support basic arithmetic operations (
add
/sub
/mul
/div
/exp
/ln
) and base conversion.
- Support generating base math constants (E, Pi, SQRT2, etc.)
- Support operations with inf
- Create operations benchmark
- Benchmark against crates: rug, twofloat, num-bigfloat, rust_decimal, bigdecimal, scientific
- Implement more formatting traits
- Other math functions: sin/cos/tan/etc.