Releases: MaterializeInc/rust-dec
dec-0.4.10
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
deserializingDecimalvalues from primitive integers,String, andstr.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, andDecimal128types when thenum-traitsfeature
is enabled.
dec-0.4.9
dec 0.4.7
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
0.4.6 - 2022-01-14
-
Add functions to take
Decimalvalues to and from packed binary-coded
decimals using the
decPacked module. -
Add
round_to_placeandreduce_to_placetoDecimal<N>, which provide
"places from the left" rounding, akin to a shift right, round, and shift
left.reduce_to_placeperforms the operation, as expected, and
simultaneously performs areduce. -
Refactor
to_raw_partsandto_raw_partsto use&[u16]to represent a
Decimal'slsu, 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
Change TryFrom<Decimal> for T where T are primitive integers; no longer requires an exponent of 0.
dec 0.4.4
dec-0.4.4 dec 0.4.4
dec 0.4.3
- Genericizes
Decimaloperations to allow interoperation of multiple widths/precisions. - Other quality of life improvements.
dec 0.4.2
dec-0.4.2 dec 0.4.2
dec 0.4.1
Expanded functionality for Decimal type
dec 0.4.0
Extends functionality of Decimal type.