Skip to content

Releases: PaulRBerg/prb-math

v2.0.0

20 Oct 14:58
Compare
Choose a tag to compare

Added

  • Addition and subtraction functions in the typed libraries.
  • Gas estimates for fromInt, fromUint, pow, toInt and toUInt.
  • Structs PRBMath.SD59x18 and PRBMath.UD60x18, simple wrappers to indicate that the variables are fixed-point numbers.
  • Typed versions of the library: PRBMathSD59x18Typed.sol and PRBMathUD60x18Typed.sol.

Changed

  • Increase the accuracy of exp2 by using the 192.64-bit format instead of 128.128-bit.
  • Rename PRBMathCommon.sol to PRBMath.sol.
  • Set named parameter instead of returning result in pow functions.
  • Update gas estimates for exp and exp2.

Fixed

  • Bug in log10 which made the result incorrect when the input was not a multiple of 10.
  • Typos in NatSpec comments.

v1.1.0 [YANKED]

20 Oct 14:57
Compare
Choose a tag to compare

Added

  • New convertor functions fromInt and toInt in PRBMathSD59x18.sol.
  • New convertor functions fromUint and toUint in PRBMathUD60x18.sol.
  • New function mulDivSigned in PRBMathCommon.sol.
  • New function pow in PRBMathSD59x18.sol and PRBMathUD60x18.sol

Changed

  • Rename the previous pow function to powu.
  • Speed up exp2 by simplifying the integer part calculations.
  • Use the fixed-point format in NatSpec comments.

Fixed

  • Minor typos in NatSpec comments.

v1.0.5

20 Oct 14:56
Compare
Choose a tag to compare

Added

  • Link to StackExchange answer in exp2 NatSpec comments.

Changed

  • Speed up the exp2 function in PRBMathCommon.sol by simplifying the integer part calculation.
  • Use SCALE instead of the 1e18 literal in PRBMathCommon.sol.

v1.0.4

20 Oct 14:55
Compare
Choose a tag to compare

Changed

  • Optimize the pow function in PRBMathUD60x18.sol by calling mulDivFixedPoint directly.

v1.0.3

20 Oct 14:54
Compare
Choose a tag to compare

Fixed

  • Typos in NatSpec comments.
  • Typo in example in README.

Removed

  • Stale SCALE_LPOTD and SCALE_INVERSE constants in PRBMathSD59x18.sol.

v1.0.2

20 Oct 14:50
Compare
Choose a tag to compare

Removed

  • Stale SCALE_LPOTD and SCALE_INVERSE constants in PRBMathUD60x18.sol.

v1.0.1

20 Oct 14:49
Compare
Choose a tag to compare

Changed

  • Examples in the README.

v1.0.0

20 Oct 14:48
Compare
Choose a tag to compare

Added

  • First release of the library.