Skip to content

Releases: PaulRBerg/prb-math

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

v2.5.0

08 Mar 22:20
8fc0c1a
Compare
Choose a tag to compare

Changed

  • Change the package name from prb-math to @prb/math.
  • Update links to repository.
  • Upgrade to mathjs v10.4.0.

v2.4.3

02 Feb 16:50
8cb5b77
Compare
Choose a tag to compare

Fixed

  • Peer dependency version for mathjs.

v2.4.2

02 Feb 16:50
ecf9015
Compare
Choose a tag to compare

Changed

  • Upgrade to mathjs v10.1.1.

v2.4.1

27 Oct 18:38
Compare
Choose a tag to compare

Changed

  • Upgrade to @ethersproject/bignumber v5.5.0.

Fixed

  • Set peer dependencies.

v2.4.0

23 Oct 18:45
Compare
Choose a tag to compare

Added

  • @ethersproject/bignumber, decimal.js, evm-bn, and mathjs as normal deps.
  • Ship JavaScript source maps with the npm package.

Changed

  • Americanize spellings in NatSpec comments.
  • Move everything from the prb-math.js package to prb-math.
  • Polish NatSpec comments in avg function.
  • Use underscores in number literals.

Fixed

  • Bug in powu function in the PRBMathSD59x18 contract, which caused the result to be positive even if the base was negative.
  • Minor bug in avg function in the PRBMathSD59x18 contract, which rounded down the result instead of up when the intermediary sum was negative.

v2.3.0

20 Oct 15:04
Compare
Choose a tag to compare

Added

  • The CHANGELOG file in the npm package bundle.

Changed

  • License from "WTFPL" to "Unlicense".
  • Polish README.

Fixed

  • Typos in comments.

Removed

  • Stale "resolutions" field in package.json.

v2.2.0

20 Oct 15:03
Compare
Choose a tag to compare

Changed

  • Add contract name prefix to custom errors.

Removed

  • @param tags for custom errors NatSpec.

v2.1.0

20 Oct 15:02
Compare
Choose a tag to compare

Added

  • Solidity v0.8.4 custom errors.

Changed

  • Define the upper limit as MAX_UD60x18 / SCALE in the sqrt function.
  • Define xValue var to avoid reading x.value multiple times.
  • Move SCALE > prod1 check at the top of the mulDivFixedPoint function.
  • Refer to add function operands as summands.
  • Refer to sub function operands as minuend and subtrahend.
  • Rename rUnsigned var to rAbs.
  • Set minimum compiler version to 0.8.4.
  • Use MIN_SD59x18 instead of type(int256).min where appropriate.

Removed

  • hardhat/console.sol import.
  • Stale caveat in sqrt function NatSpec.

v2.0.1

20 Oct 14:59
Compare
Choose a tag to compare

Changed

  • Mention the new typed flavors in the README.

Fixed

  • Code snippet for the UD60x18Typed consumer in the README.
  • English typos in NatSpec comments.
  • Minor bug in log10 in PRBMathUD60x18Typed.sol which made the result inaccurate when the input was a multiple of 10.