v0.9.0
Changes since v0.8.5:
Breaking / behavioral changes
- Overflow behavior is now consistent across operations.
+,-(unary and binary),*, andabsuse wrapping (modular) arithmetic, while/,div,fld,cld,rem, andmoduse checked arithmetic and throw an error instead of overflowing. In particular,*betweenNormedvalues now wraps around on overflow instead of throwing (#236). - Division by zero now throws a
DivideErrorfor/,div,fld,cld,rem, andmod. - Promotion rules have been commonized between
FixedandNormed(#207). Most notably,Fixedvalues combined with anIntegernow promote to a floating-point type (e.g.Q0f7(0.5) + 1 === 1.5f0); previously the result stayedFixed. MixedFixed/Normedoperations also promote to floating point. *betweenFixedvalues now rounds ties to even (previously ties rounded up)./betweenFixedvalues now rounds to nearest (previously the result was truncated toward zero) and throws on overflow.printnow emits a plain decimal representation without the type suffix, andshowoutput is more consistent across types (#189, #243).- The old iterator methods have been removed (#231).
- On Julia >= 1.9, Statistics support is provided via a package extension (#277, #281).
New features
- Checked, wrapping, and saturating arithmetic families let callers choose the overflow behavior explicitly:
checked_*(extendingBase.Checked) plus the exportedwrapping_*andsaturating_*counterparts forneg/abs/add/sub/mul/div/fld/cld/rem/mod, andwrapping_fdiv/saturating_fdiv/checked_fdiv(#190, #210, #217, #222, #226, #230). roundnow supports thedigitskeyword argument (#235).- Improved generation of type aliases (#233).
- Better conversion and overflow error messages (#205, #214).
Performance improvements
- Faster multiplication for
Normed(#213) andFixed(#220). - Improved
isapprox(#216). randuses the sampler-based Random API (#206).
Note: for 64-bit types (Fixed{Int64}, Normed{UInt64}), /, div, rem, and their variants are computed via BigFloat — exact, but slow and allocating compared to the narrower types.
Bug fixes
- Fixed
% Normed{UInt32}on ARM and improvedNaN % FixedPoint(#223). - Avoided inconsistent
unsafe_truncbehavior withBigFloat(#212).
Full changelog: v0.8.5...v0.9.0