Skip to content

Commit 9c361f8

Browse files
committed
Release v2.4.0
1 parent 97a23e6 commit 9c361f8

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# CHANGELOG
22

3+
## v2.4.0 (2026-05-07)
4+
5+
### Security
6+
7+
* Mitigate exponent amplification (CVE-2026-32686).
8+
Compact inputs such as `1e1000000` could force multi-second expansions
9+
during arithmetic, parsing, normalization, comparison, or formatting.
10+
`Decimal.add/2` and `Decimal.sub/2` now scale operands to `precision + 2`
11+
digits with a sticky bit instead of materializing the full coefficient.
12+
13+
### Enhancements
14+
15+
* Add `:max_digits` and `:max_exponent` options to `Decimal.parse/2` and
16+
`Decimal.cast/2` to reject pathological inputs without expansion
17+
* Add `:max_digits` option to `Decimal.to_string/3` to cap formatted output
18+
before materialization
19+
* Add `:emax` and `:emin` fields to `Decimal.Context` for IBM General Decimal
20+
Arithmetic-style overflow and underflow signaling
21+
* Optimize hot paths for large decimals: `coef_length`, `normalize`,
22+
`to_integer`, `integer?`, parsing, and large-coefficient string formatting
23+
324
## v2.3.0 (2024-12-13)
425

526
* Implement the upcoming [`JSON.Encoder`](https://hexdocs.pm/elixir/main/JSON.Encoder.html)

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule Decimal.Mixfile do
22
use Mix.Project
33

4-
@version "2.3.0"
4+
@version "2.4.0"
55
@source_url "https://github.com/ericmj/decimal"
66

77
def project() do

0 commit comments

Comments
 (0)