14 curated breaking changes across major versions of decimal. Use this as a migration checklist before bumping dependencies.
`Decimal.Context` defaults change from precision `28` and unbounded `emax`/`emin` to decimal128 values: `precision: 34`, `emax: 6_144`, `emin: -6_143`. Operation results whose adjusted exponent leaves that band signal overflow or underflow.
`Decimal.to_string/2` and `Decimal.to_string/3` raise `ArgumentError` when the rendered output would exceed `6_178` digit characters (precision + emax — the worst-case `:normal` width of any in-range decimal128 value). `Inspect`, `String.Chars`, and `JSON.Encoder` protocol implementations pass `max_digits: :infinity` so debug output always succeeds.
`Decimal.parse/2` and `Decimal.cast/2` default `:max_digits` to `34` and `:max_exponent` to `6_144` when not specified.
`Decimal.parse/1` and `Decimal.cast/1` reject inputs whose digit count exceeds `34` (decimal128 precision) or whose absolute exponent exceeds `6_144` (decimal128 emax). Use `parse/2` / `cast/2` with `max_digits: :infinity` and `max_exponent: :infinity` to restore unbounded behavior.
Change `Decimal.parse/1` to return `{t, binary} | :error`
Change `Decimal.compare/2` to return `:lt | :eq | :gt`
Change `Decimal.cast/1` to return `{:ok, t} | :error`
Remove `:message` and `:result` fields from `Decimal.Error`
Remove deprecated support for floats in `Decimal.new/1`
Change `Decimal.cast/1` to return `{:ok, t} | :error`
Remove deprecated support for floats in `Decimal.new/1`
Remove `:message` and `:result` fields from `Decimal.Error`
Change `Decimal.compare/2` to return `:lt | :eq | :gt`
Change `Decimal.parse/1` to return `{t, binary} | :error`
Get this data programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/breaking/hex/decimal