v3.0.0
Changed
- Breaking: Refactor the libraries into free functions and user defined value types (
a69b4b
) (@PaulRBerg) - Breaking: Set minimum compiler pragma to
>=0.8.13
(a69b4b
) (@PaulRBerg) - Breaking: Rename
SCALE
toUNIT
(4d3658
) (@PaulRBerg) - Always truncate instead of rounding up in multiplication functions (21fb32) (@PaulRBerg)
- Change license to MIT (@PaulRBerg)
- Check if
y
is zero ingm
(5b585c
) (@PaulRBerg) - Optimize
avg
by using the SWAR technique (#89) (@PaulRBerg) - Optimize
div
andmulDivSigned
by wrapping unary operations in unchecked blocks (a69b4b
) (@PaulRBerg) - Optimize
exp2
by batching bit checks (#77) (@k06a) - Optimize
msb
by using assembly (#135) (@t4sk, @PaulRBerg) - Optimize result assignment in
powu
(673802) (@PaulRBerg) - Rename
fromInt
totoSD59x18
andtoInt
tofromSD59x18
(a69b4b
) (@PaulRBerg) - Rename
fromUint
totoUD60x18
andtoUint
tofromUD60x18
(a69b4b
) (@PaulRBerg) - Rename
mostSignificantBit
tomsb
(a69b4b
) (@PaulRBerg) - Rename
mulDivFixedPoint
tomulDiv18
(4c5430
) (@PaulRBerg) - Rename
PRBMath.sol
toCore.sol
(1b82ea
) (@PaulRBerg) - Rename shared
sqrt
inprbSqrt
(1b82ea
) (@PaulRBerg) - Rename shared
exp2
inprbExp2
(1b82ea
) (@PaulRBerg) - Revert with inputs instead of computed value custom errors (@PaulRBerg)
- Return base if exponent is one in
pow
(977d43
) (@PaulRBerg) - Format mathematical expressions using LaTeX (@PaulRBerg)
- Improve wording and formatting in comments, NatSpec documentation, and README (@PaulRBerg)
Added
- Add constants for E and PI (
422d87
) (@PaulRBerg) - Add simple PRBTest-based typed assertions for testing in Foundry (
ddb084
) (@PaulRBerg) - Add user defined value types
SD59x18
andUD60x18
(@PaulRBerg) - Implement conversion and helper functions for the user defined value types (@PaulRBerg)
Removed
- Breaking: Delete the
e
andpi
functions (422d87) (@PaulRBerg) - Breaking: Remove JavaScript SDK and all paraphernalia (
1b82ea
) (@PaulRBerg)
Fixed
- Fix incorrect hard-coded value in
sqrt
(#91) (@Amxx, @nonergodic) - Fix upper boundary specified in
exp
NatSpec comments (#119) (@PaulRBerg)