Skip to content

Releases: PaulRBerg/prb-math

v4.0.3

14 Jun 11:09
39eec81
Compare
Choose a tag to compare

Changed

Removed

Fixed

v4.0.2

04 Dec 11:37
9dc0651
Compare
Choose a tag to compare

Changed

Added

Removed

v4.0.1

28 May 11:44
77fa88e
Compare
Choose a tag to compare

Changed

Added

v4.0.0

13 Apr 12:18
7ce3009
Compare
Choose a tag to compare

Changed

  • Breaking: Rename fromSD590x18, fromUD60x18, toSD59x18, and toUD60x18 to convert (@PaulRBerg)
  • Breaking: Rename Core.sol to Common.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 in Common.mulDiv (@PaulRBerg)
  • Open pragma in test assertions and utils (@PaulRBerg)
  • Reorder statements in Common.mulDiv18 (@PaulRBerg)
  • Rename Common.prbExp2 to Common.exp2 (@PaulRBerg)
  • Rename Common.prbSqrt to Common.sqrt (@PaulRBerg)
  • Rename Assertions to PRBMathAssertions (@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 imported unwrap (@PaulRBerg)
  • Use long names in named imports (@PaulRBerg)

Added

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

v3.3.2

19 Mar 15:40
1edf08d
Compare
Choose a tag to compare

Changed

  • Use ValueType.wrap directly in casting functions (@PaulRBerg)

v3.3.1

17 Mar 18:01
34f2344
Compare
Choose a tag to compare

Changed

v3.3.0

06 Feb 19:00
9febcdd
Compare
Choose a tag to compare

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 to PRBMathAssertions in a backward-compatible way (@PaulRBerg)
  • Upgrade Node.js package dependencies (@PaulRBerg)

Added

  • Add casting utilities for PRBMath types and uint128 and uint40 (@PaulRBerg)
  • Add more constants in SD1x18 and UD2x18 (@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 and unwrap in SD1x18 and UD2x18 (@PaulRBerg)
  • Expose unwrap via using for ... global (@PaulRBerg)

v3.2.0

13 Dec 14:19
2c59739
Compare
Choose a tag to compare

Added

  • Add assertions for array comparisons (@PaulRBerg)

Removed

  • Delete assertions that have an "err" argument (@PaulRBerg)

Fixed

  • Match types for SD1x18 and UD2x18 assertions (@PaulRBerg)

v3.1.0

13 Dec 14:22
c971040
Compare
Choose a tag to compare

Added

v3.0.0

29 Nov 17:17
6a03b0a
Compare
Choose a tag to compare

Changed

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 and UD60x18 (@PaulRBerg)
  • Implement conversion and helper functions for the user defined value types (@PaulRBerg)

Removed

Fixed