Releases: PaulRBerg/prb-math
Releases · PaulRBerg/prb-math
v4.1.0
Changed
- Make domain bound specs more visually descriptive (#239) (@PaulRBerg)
- Update requirement spec in
UD60x18.log2
(#239) (@PaulRBerg) - Use return instead of param for return parameter NatSpec documentation (#241) (@ericglau)
Added
- Add UD21x18 and SD21x18 types (#212) (@andreivladbrg, @PaulRBerg)
Removed
- Remove adjacent castings (#237) (@PaulRBerg)
v4.0.3
Changed
- Change visibility of
bound
(#216) (@PaulRBerg) - Switch to Bun for dependency management (#218) (@PaulRBerg)
Removed
- Remove dependency on
prb-test
(#222) (@smol-ninja)
Fixed
- Fix types for
uUNIT
(970aa90) (@PaulRBerg) - Return zero for very small inputs passed to
exp
(#229) (@0x2me)
v4.0.2
Changed
- Enable
cbor_metadata
by removing the setting (abdf0b) (@PaulRBerg) - Install
prb-test
andforge-std
as Node.js packages (#211) (@andreivladbrg, @PaulRBerg) - Update import paths to include
src
(#210) (@PaulRBerg) - Update NatSpec for
UD60x18.avg
function (#213) (@ericglau) - Update NatSpec for
PRBMath_SD59x18_Powu_Overflow
custom error (#194) (@DaniPopes) - Make Node.js the default installation option (@PaulRBerg)
Added
- Include
test/utils
in Node.js package (#211) (@andreivladbrg, @PaulRBerg)
Removed
- Remove git submodules (#211) (@andreivladbrg, @PaulRBerg)
- Remove the dummy re-exports in
src/test
(#211) (@andreivladbrg)
v4.0.1
Changed
- Bump submodules (@PaulRBerg)
- Clarify rounding modes (@PaulRBerg)
- Move test utils from
src/test
totest/utils
(@PaulRBerg) - Improve documentation (@PaulRBerg)
Added
- Provide silent
bound
utils (@PaulRBerg)
v4.0.0
Changed
- Breaking: Rename
fromSD590x18
,fromUD60x18
,toSD59x18
, andtoUD60x18
toconvert
(@PaulRBerg) - Breaking: Rename
Core.sol
toCommon.sol
(@PaulRBerg) - Breaking: Set minimum compiler pragma to
>=0.8.19
(@PaulRBerg) - Bump Node.js dependencies (@PaulRBerg)
- Bump submodules (@PaulRBerg)
- Clarify rounding modes (6bb53ea) (@PaulRBerg)
- Clarify that
mulDiv
rounds toward zero (cda291) (@PaulRBerg) - Fix typo in code snippet in README (#180) (@cygaar)
- Format contracts with Forge Formatter (@PaulRBerg)
- Improve writing and formatting in documentation (@PaulRBerg)
- Make a distinction between
lpotdod
and its flipped counterpart inCommon.mulDiv
(@PaulRBerg) - Open pragma in test assertions and utils (@PaulRBerg)
- Reorder statements in
Common.mulDiv18
(@PaulRBerg) - Rename
Common.prbExp2
toCommon.exp2
(@PaulRBerg) - Rename
Common.prbSqrt
toCommon.sqrt
(@PaulRBerg) - Rename
Assertions
toPRBMathAssertions
(@PaulRBerg) - Return base when exponent is unit in
pow
(#182) (@PaulRBerg) - Return unit when base is unit in
pow
(#182) (@PaulRBerg) - Switch to Pnpm for Node.js package management (@PaulRBerg)
- Use bound
unwrap
instead of importedunwrap
(@PaulRBerg) - Use long names in named imports (@PaulRBerg)
Added
- Add
EXP_MAX_INPUT
andEXP2_MAX_INPUT
constants, and use them inexp
andexp2
(@PaulRBerg) - Add
UNIT_SQUARED
and use it instead of the hard-coded value (@PaulRBerg) - Add user-defined operators (#168) (@Amxx,@PaulRBerg)
- Add unary operator (#173) (@Lumyo,@PaulRBerg)
- Expand domain of
pow
inUD60x18
by allowing inputs lower thanUNIT
(#182) (@PaulRBerg)
Removed
- Remove development-related Node.js dependencies (@PaulRBerg)
- Remove "memory-safe" annotation in test assertions (@PaulRBerg)
- Remove problematic
src/=src/
remapping (@PaulRBerg) - Remove superfluous threshold check in
SD59x19.exp
(@PaulRBerg)
Fixed
- Fix bit mask in
Common.exp2
(#179) (@andreivladbrg)
v3.3.2
Changed
- Use
ValueType.wrap
directly in casting functions (@PaulRBerg)
v3.3.1
Changed
- Bump submodules (@PaulRBerg)
v3.3.0
Changed
- Improve documentation (@PaulRBerg)
- Improve names of custom errors and functions (@PaulRBerg)
- Optimize assembly usage by annotating assembly blocks with the "memory-safe" dialect (@PaulRBerg)
- Modularize code by splitting it into multiple categories: casting, constants, conversions, errors, helpers, math, and value types (@PaulRBerg)
- Rename
Assertions
toPRBMathAssertions
in a backward-compatible way (@PaulRBerg) - Upgrade Node.js package dependencies (@PaulRBerg)
Added
- Add casting utilities for PRBMath types and
uint128
anduint40
(@PaulRBerg) - Add more constants in
SD1x18
andUD2x18
(@PaulRBerg) - Add
PRBMathUtils
contract with test utils (@PaulRBerg) - Add test assertions overloads with
err
param (@PaulRBerg) - Add typed versions of
bound
test util (@PaulRBerg) - Add
wrap
andunwrap
inSD1x18
andUD2x18
(@PaulRBerg) - Expose
unwrap
viausing for ... global
(@PaulRBerg)
v3.2.0
Added
- Add assertions for array comparisons (@PaulRBerg)
Removed
- Delete assertions that have an "err" argument (@PaulRBerg)
Fixed
- Match types for
SD1x18
andUD2x18
assertions (@PaulRBerg)
v3.1.0
Added
- Add value types
SD1x18
andUD2x18
(@PaulRBerg)