Skip to content

Latest commit

 

History

History
89 lines (65 loc) · 3.98 KB

CHANGELOG.md

File metadata and controls

89 lines (65 loc) · 3.98 KB

Changelog

0.4.3

  • Mark FBig::from_str_native as deprecated.
  • Implement TryFrom<Repr> and TryFrom<FBig> for primitive integers.
  • Implement TryFrom<Repr<2>> and TryFrom<FBig<_, 2>> for primitive floats.
  • Implement From<UBig> and From<IBig> for Repr.
  • Implement core::fmt::{Binary, Oct, LowerExp, UpperExp, LowerHex, UpperHex} for Repr, FBig (some are limited to certain bases).

0.4.2

  • Add Repr::from_static_words to support the static_fbig! and static_dbig! macros.
  • Add FBig::from_repr_const to support create an FBig instance from repr in const context.
  • Add conversion from f32/f64 to Repr<2>.
  • Implement NumOrd between FBig and primitive integers / floats.
  • Implement AbsOrd between FBig and UBig/IBig.
  • Now the Debug output of FBig values will not contains the rounding mode information (when alternative flag is not set).

0.4.1

  • Fix the termination criteria for ln and exp series (#44).
  • Fix powf panicking when base is 0.

0.4.0

Add

  • Implement num-order::NumOrd between FBig and UBig/IBig and between FBig with different bases.
  • Implement num-order::NumHash for FBig and Repr.
  • Add ErrorBounds trait that calculate the rounding range for a floating point number.

Change

  • Now feature num-traits and rand are not enabled by default, feature num-order is enabled instead.
  • The type of Repr::BASE is changed from IBig to UBig
  • UBig::square and IBig::square are renamed to sqr.
  • The implementation of square root is now implemented by the dashu_base::SquareRoot trait instead of a standalone method of FBig.
  • The rounding behaviors of FBig::to_decimal and FBig::to_binary are changed for better ergonomics.
  • The rounding behaviors of FBig::to_f32 and FBig::to_f64 now follow the mode specified by the type argument.

0.3.2

  • 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)

0.3.1

  • Implement num_traits::{Zero, One, FromPrimitive, ToPrimitive, Num, Signed, Euclid, Pow} for FBig (#19)
  • Implement rand::distributions::uniform::UniformSampler for FBig through crate::rand::UniformFBig
  • Implement rand::distributions::{Open01, OpenClosed01, Standard} for FBig
  • Implement dashu_base::Inverse for FBig
  • Implement rand::distributions::uniform::SampleUniform for FBig.
  • Implement serde::{Serialize, Deserialize} for FBig and Repr
  • Implement Rem trait for FBig
  • Add support of random floating point numbers generation through crate::rand::Uniform01 and crate::rand::UniformFBig.
  • Add support for serialization from/to PostgreSQL arguments through diesel::{deserialize::FromSql, serialize::ToSql} and postgres_types::{FromSql, ToSql}.
  • Add from_str_native() for Repr
  • Add to_f32(), to_f64() for Repr, and these two methods supports all bases for both Repr and FBig.
  • Add to_int() for Repr, which is equivalent to FBig::trunc()
  • Add TryFrom<FBig> for UBig and IBig
  • Add round() for FBig
  • Add rand_v08 and num-traits_v02 feature flags to prevent breaking changes due to dependency updates in future
  • Re-export operation traits through the ops module.

0.3.0

Add

  • Conversion from FBig to f32/f64 support subnormal values now.
  • Add a split_at_point() function to FBig

0.2.1

  • Implement core::iter::{Sum, Product} for FBig
  • Implement powf, sqrt for FBig

0.2.0 (Initial release)

  • Support basic arithmetic operations (add/sub/mul/div/exp/ln) and base conversion.

Todo

Roadmap to next version

  • 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.