Skip to content

Releases: MaterializeInc/rust-dec

dec-0.4.10

Choose a tag to compare

@petrosagg petrosagg released this 06 May 12:34

0.4.10 - 2025-05-06

  • Optimize Decimal::<N>::from_f{64,32}.

  • Provide a serde-compatible module, dec::serde_decimal_from_non_float_primitives, to permit
    deserializing Decimal values from primitive integers, String, and str.

    This feature relies on Deserialize::deserialize_any, so is only appropriate
    when using self-describing formats (e.g. JSON) as input.

    Find more details on the module-level documentation.

  • Implement num_traits::{MulAdd, MulAddAssign, One, Zero} for the
    Decimal, Decimal64, and Decimal128 types when the num-traits feature
    is enabled.

dec-0.4.9

Choose a tag to compare

@benesch benesch released this 11 Nov 16:35
bfcf645
dec 0.4.9

dec 0.4.7

Choose a tag to compare

@sploiselle sploiselle released this 15 Jan 13:19

Refactor from_raw_parts and to_raw_parts again to use [u16; N] rather
than &[u16] to represent Decimal's lsu. This makes from_raw_parts
cheaper because the lsu length does not need validation.

dec 0.4.6

Choose a tag to compare

@sploiselle sploiselle released this 14 Jan 20:20

0.4.6 - 2022-01-14

  • Add functions to take Decimal values to and from packed binary-coded
    decimals
    using the
    decPacked module.

  • Add round_to_place and reduce_to_place to Decimal<N>, which provide
    "places from the left" rounding, akin to a shift right, round, and shift
    left. reduce_to_place performs the operation, as expected, and
    simultaneously performs a reduce.

  • Refactor to_raw_parts and to_raw_parts to use &[u16] to represent a
    Decimal's lsu, largely reverting the change from
    0.4.2.

    The reversion addresses an oversight that would corrupt values if the LSU's
    data was moved between machines with different endianness.

dec 0.4.5

Choose a tag to compare

@sploiselle sploiselle released this 29 Jul 16:23

Change TryFrom<Decimal> for T where T are primitive integers; no longer requires an exponent of 0.

dec 0.4.4

Choose a tag to compare

@sploiselle sploiselle released this 25 Jun 13:44
dec-0.4.4

dec 0.4.4

dec 0.4.3

Choose a tag to compare

@sploiselle sploiselle released this 18 Jun 22:04
  • Genericizes Decimal operations to allow interoperation of multiple widths/precisions.
  • Other quality of life improvements.

dec 0.4.2

Choose a tag to compare

@sploiselle sploiselle released this 07 Jun 14:19
dec-0.4.2

dec 0.4.2

dec 0.4.1

Choose a tag to compare

@sploiselle sploiselle released this 03 Jun 23:27

Expanded functionality for Decimal type

dec 0.4.0

Choose a tag to compare

@sploiselle sploiselle released this 20 May 16:09

Extends functionality of Decimal type.