Skip to content

Releases: neogenie/fastnum

v0.2.2

22 Feb 15:24
Compare
Choose a tag to compare

Changed

  • Some float2decimal performance optimizations.

Fixed

  • Minor fixes in float2decimal conversion.
  • Minor fixes with extra precision digits.

v0.2.1

18 Feb 07:49
Compare
Choose a tag to compare

Fixed

  • Incorrect .ceil() and floor() behavior for negative values.

v0.2.0

17 Feb 19:15
7d63bd7
Compare
Choose a tag to compare

This release primarily focuses on:

  • Increasing the accuracy of approximated mathematical calculations due to the use of 7 extra precision digits
    instead of 4.
  • Performance optimizations.

Expect better performance, precision handling, and expanded documentation covering new methods and examples.

Added

  • floor() and ceil() const methods.
  • Add basic tests for trivial trigonometric functions for 0–360 degree angles.

Changed

  • Control block is completely refactored for better performance and more compact memory layout.
  • Micro-optimizations in rounding.
  • Inline optimizations and better precision handling for mathematical rounding.
  • Remove custom const float helpers as they're stabilized as const in rust 1.83.

Fixed

  • Incorrect floor() and ceil() methods in num_traits Float implementation.

Documentation

  • Minor fixes.

v0.1.13

07 Feb 16:29
Compare
Choose a tag to compare

Added

  • Add tokio-postgres feature which enables serialization and deserialization of fastnum decimals for
    tokio-postgres

    crate #8.
  • Add tokio-postgres and sqlx_postgres examples.

Documentation

  • Minor fixes.

v0.1.12

06 Feb 13:07
Compare
Choose a tag to compare

Fixed

  • Incorrect to_f64 impl on Decimal: #7.

Documentation

  • Minor fixes.

v0.1.11

04 Feb 11:54
Compare
Choose a tag to compare

Fix compilation warnings

v0.1.10

04 Feb 10:57
Compare
Choose a tag to compare

This release primarily focuses on:

  • Implementing a full range of advanced mathematical functions (exponential, roots, power, logarithmic, and
    trigonometric functions) for working with exact precision decimal numbers.
  • Increasing the accuracy of approximated mathematical calculations due to the use of extra precision digits and the
    absence of intermediate rounding.
  • Fixing and improving conversions between Float and Decimal types.

Expect better performance, precision handling, and expanded documentation covering new methods, constants, and examples.
Highlights include removing libm dependency and major refinements for no-std environments.

Added

  • Implement exponential exp and binary exponential exp2 functions for decimals.
  • Implement logarithmic ln, log10, log2, log functions for decimals.
  • Implement sqrt, cbrt, and nth_root roots functions for decimals.
  • Refactor and extend pow to support non-integer exponents.
  • Implement base trigonometric functions: sin, cos, tan, sin_cos for decimals.
  • Implement inverse trigonometric functions: asin, acos, atan, atan2 for decimals.
  • Implement hyperbolic functions: sinh, cosh, tanh for decimals.
  • Implement inverse hyperbolic functions: asinh, acosh, atanh for decimals.
  • Implement hypotenuse calculation hypot function for decimals.
  • Introduce fused multiply-add mul_add operation without intermediate rounding.
  • Introduce transmute operation for N-to-M bit decimal conversion.
  • Add integer and unsigned integer conversion utilities (from_int, from_uint).
  • Implement num_traits::float::Float trait.

Changed

  • Improved arithmetic precision of approximated mathematical calculations due to the use of extra precision digits and
    the
    absence of intermediate rounding.
  • Overhauled mathematical constants. Add INEXACT flag and extra precision digits.
  • Mark some methods as inexact by design.
  • Micro-optimizations in rounding.
  • Inline optimizations and better precision handling for mathematical rounding.
  • Re-implement recip method without division.
  • Improve test coverage for mathematical operations (e.g., sqrt, ln, exp).
  • Remove libm dependency for no-std environment.

Fixed

  • Corrected edge cases for float (f32/f64) from/to Decimal conversions (
    fix #5).
  • Fix long rounding issues with improved context precision.
  • General code quality improvements and bug fixes, including better inexact flag handling.

Documentation

  • Expanded documentation for all major operations with examples.
  • Added comprehensive examples and descriptions to LIB.md.
  • Minor fixes.

v0.1.9

01 Jan 09:19
Compare
Choose a tag to compare

Breaking changes

  • Replace decimal::Category with core::num::FpCategory.

Changed

  • Micro-optimizations in rounding.
  • Make .from_parts() constructor public (Way to directly create decimals with scale without dividing? #3).

Added

  • Implement TryFrom<Decimal> for UnsignedDecimal and From<UnsignedDecimal> for Decimal traits.

Fixed

  • Fixed minor issues with ceil/floor rounding.

v0.1.8

29 Dec 12:25
Compare
Choose a tag to compare
v0.1.8

v0.1.7

25 Dec 21:41
Compare
Choose a tag to compare

Fixed

  • Division by divisor with non-scalable coefficient.

Changed

  • More strict #[repr] for Decimal type.
  • Documentation improvements.

Added

  • Implement num_traits::float::FloatCore trait.
  • Add MIN_POSITIVE and EPSILON constants.
  • Add .powi(), .recip(), .to_degrees(), .to_radians() methods.

Full Changelog: v0.1.6...v0.1.7