@prb/math
Advanced tools
Changelog
[4.0.2] - 2023-12-04
cbor_metadata
by removing the setting (abdf0b)
(@PaulRBerg)prb-test
and forge-std
as Node.js packages (#211) (@andreivladbrg, @PaulRBerg)src
(#210) (@PaulRBerg)UD60x18.avg
function (#213) (@ericglau)PRBMath_SD59x18_Powu_Overflow
custom error (#194) (@DaniPopes)test/utils
in Node.js package (#211) (@andreivladbrg, @PaulRBerg)Changelog
[4.0.1] - 2023-05-28
src/test
to test/utils
(@PaulRBerg)bound
utils (@PaulRBerg)Changelog
[4.0.0] - 2023-04-13
fromSD590x18
, fromUD60x18
, toSD59x18
, and toUD60x18
to convert
(@PaulRBerg)Core.sol
to Common.sol
(@PaulRBerg)>=0.8.19
(@PaulRBerg)mulDiv
rounds toward zero (cda291) (@PaulRBerg)lpotdod
and its flipped counterpart in Common.mulDiv
(@PaulRBerg)Common.mulDiv18
(@PaulRBerg)Common.prbExp2
to Common.exp2
(@PaulRBerg)Common.prbSqrt
to Common.sqrt
(@PaulRBerg)Assertions
to PRBMathAssertions
(@PaulRBerg)pow
(#182) (@PaulRBerg)pow
(#182) (@PaulRBerg)unwrap
instead of imported unwrap
(@PaulRBerg)EXP_MAX_INPUT
and EXP2_MAX_INPUT
constants, and use them in exp
and exp2
(@PaulRBerg)UNIT_SQUARED
and use it instead of the hard-coded value (@PaulRBerg)pow
in UD60x18
by allowing inputs lower than UNIT
(#182) (@PaulRBerg)SD59x19.exp
(@PaulRBerg)Common.exp2
(#179) (@andreivladbrg)Changelog
[3.3.0] - 2023-02-06
Assertions
to PRBMathAssertions
in a backward-compatible way (@PaulRBerg)uint128
and uint40
(@PaulRBerg)SD1x18
and UD2x18
(@PaulRBerg)PRBMathUtils
contract with test utils (@PaulRBerg)err
param (@PaulRBerg)bound
test util (@PaulRBerg)wrap
and unwrap
in SD1x18
and UD2x18
(@PaulRBerg)unwrap
via using for ... global
(@PaulRBerg)Changelog
[3.2.0] - 2022-12-13
SD1x18
and UD2x18
assertions (@PaulRBerg)Changelog
[3.0.0] - 2022-11-29
a69b4b
][a69b4b]) (@PaulRBerg)>=0.8.13
([a69b4b
][a69b4b]) (@PaulRBerg)SCALE
to UNIT
(4d3658
) (@PaulRBerg)y
is zero in gm
(5b585c
) (@PaulRBerg)avg
by using the SWAR technique (#89) (@PaulRBerg)div
and mulDivSigned
by wrapping unary operations in unchecked blocks ([a69b4b
][a69b4b]) (@PaulRBerg)exp2
by batching bit checks (#77) (@k06a)msb
by using assembly (#135) (@t4sk, @PaulRBerg)powu
(673802) (@PaulRBerg)fromInt
to toSD59x18
and toInt
to fromSD59x18
([a69b4b
][a69b4b]) (@PaulRBerg)fromUint
to toUD60x18
and toUint
to fromUD60x18
([a69b4b
][a69b4b]) (@PaulRBerg)mostSignificantBit
to msb
([a69b4b
][a69b4b]) (@PaulRBerg)mulDivFixedPoint
to mulDiv18
(4c5430
) (@PaulRBerg)PRBMath.sol
to Core.sol
([1b82ea
][1b82ea]) (@PaulRBerg)sqrt
in prbSqrt
([1b82ea
][1b82ea]) (@PaulRBerg)exp2
in prbExp2
([1b82ea
][1b82ea]) (@PaulRBerg)pow
(977d43
) (@PaulRBerg)422d87
) (@PaulRBerg)ddb084
) (@PaulRBerg)SD59x18
and UD60x18
(@PaulRBerg)e
and pi
functions (422d87) (@PaulRBerg)1b82ea
][1b82ea]) (@PaulRBerg)