Socket
Socket
Sign inDemoInstall

prb-math

Package Overview
Dependencies
17
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
2Next

2.4.3

Diff

Changelog

Source

[2.4.3] - 2022-02-02

Fixed

  • Peer dependency version for mathjs (@PaulRBerg)
paulrberg
published 2.4.2 •

Changelog

Source

[2.4.2] - 2022-02-02

Changed

  • Upgrade to mathjs v10.1.1 (@PaulRBerg)

Fixed

  • Fix typo in comment in sqrt (#67 (@transmissions11)
paulrberg
published 2.4.1 •

Changelog

Source

[2.4.1] - 2021-10-27

Changed

  • Upgrade to @ethersproject/bignumber v5.5.0 (@PaulRBerg)

Fixed

  • Set peer dependencies (@PaulRBerg)
paulrberg
published 2.4.0 •

Changelog

Source

[2.4.0] - 2021-10-20

Added

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

Changed

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

Fixed

  • Fix bug in the powu function of the PRBMathSD59x18 contract, which caused the result to be positive even if the base was negative (@PaulRBerg)
  • Fix minor bug in the avg function of the PRBMathSD59x18 contract, which rounded down the result instead of up when the intermediary sum was negative (@PaulRBerg)
paulrberg
published 2.3.0 •

Changelog

Source

[2.3.0] - 2021-09-18

Added

  • The CHANGELOG file in the npm package bundle (@PaulRBerg)

Changed

  • License from "WTFPL" to "Unlicense" (@PaulRBerg)
  • Polish README (@PaulRBerg)

Fixed

  • Typos in comments (@PaulRBerg)

Removed

  • Remove stale "resolutions" field in package.json (@PaulRBerg)
paulrberg
published 2.2.0 •

Changelog

Source

[2.2.0] - 2021-06-27

Changed

  • Add contract name prefix to custom errors (@PaulRBerg)

Removed

  • Remove @param tags in custom errors' NatSpec (@PaulRBerg)
paulrberg
published 2.1.0 •

Changelog

Source

[2.1.0] - 2021-06-27

Changed

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

Added

  • Add Solidity v0.8.4 custom errors (@PaulRBerg)

Removed

  • Remove stale hardhat/console.sol import (@PaulRBerg)
  • Remove stale caveat in the NatSpec for sqrt (@PaulRBerg)
paulrberg
published 2.0.1 •

Changelog

Source

[2.0.1] - 2021-06-16

Changed

  • Mention the new typed flavors in the README (@PaulRBerg)

Fixed

  • Code snippet for the UD60x18Typed consumer in the README (@PaulRBerg)
  • English typos in NatSpec comments (#40) (@ggviana)
  • Minor bug in log10 in PRBMathUD60x18Typed.sol which made the result inaccurate when the input was a multiple of 10 (@PaulRBerg)
paulrberg
published 2.0.0 •

Changelog

Source

[2.0.0] - 2021-06-14

Changed

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

Added

  • Add add and sub functions in the typed libraries (@PaulRBerg)
  • Add types flavors of the library: PRBMathSD59x18Typed.sol and PRBMathUD60x18Typed.sol (@PaulRBerg)
  • Document gas estimates for fromInt, fromUint, pow, toInt and toUInt (@PaulRBerg)
  • Structs PRBMath.SD59x18 and PRBMath.UD60x18, simple wrappers to indicate that the variables are fixed-point numbers (@PaulRBerg)

Fixed

  • Bug in log10 which made the result incorrect when the input was not a multiple of 10 (@PaulRBerg)
  • Typos in NatSpec comments (@PaulRBerg)
paulrberg
published 1.1.0 •

Changelog

Source

[1.1.0] - 2021-05-07

This release was yanked because it was accidentally published with the wrong version number.

Changed

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

Added

  • Add new convertor functions fromInt and toInt in PRBMathSD59x18.sol (@PaulRBerg)
  • Add new convertor functions fromUint and toUint in PRBMathUD60x18.sol (@PaulRBerg)
  • Add new function mulDivSigned in PRBMathCommon.sol (@PaulRBerg)
  • Add new function pow in PRBMathSD59x18.sol and PRBMathUD60x18.sol (@PaulRBerg)

Fixed

  • Fix minor typos in NatSpec comments (@PaulRBerg)
2Next
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc