prb-math
prb-math copied to clipboard
Solidity library for advanced fixed-point math
A good ~350 gas can be saved in the `powu` function by implementing the optimizations in [ABDKMath64x64](https://github.com/abdk-consulting/abdk-libraries-solidity/blob/d8817cb600381319992d7caa038bf4faceb1097f/ABDKMath64x64.sol#L366-L439). I haven't yet fully grokked how the optimizations work, but this is what...
Have a helper function like this: ```solidity /// @notice Wraps a signed integer into the UD60x18 type. function ud60x18(uint256 x) pure returns (UD60x18 result) { result = UD60x18.wrap(x); } ```...
### Describe the feature you would like > I was wondering, whether [...] should offer a proper signum (sign might be too confusing due to cryptographic functions) function that returns...
### What version of PRBMath are you using? v4.0.1 ### What version of Solidity are you using? 0.8.19 ### Operating System None ### Describe the bug `SD59x18.exp` correctly returns 0...
- [ ] Add a new directory "audits" with PDF references to the audits performed by Cantina. - [ ] Update the "Security" section in the README.
Ref https://github.com/ethereum/solidity/pull/14166.
## Description The README has become rather cluttered after implementing the casting utilities in https://github.com/PaulRBerg/prb-math/commit/5085861101e592cde0ce6239031bb679cde7a2dc. I should move the documentation to a dedicated documentation website built with Docusaurus, ReadTheDocs, or...
See Trail of Bits' [Learn how to fuzz like a pro: Fuzzing Arithmetics](https://www.youtube.com/watch?v=9P7sqE6hILM&t=2084s) workshop, minute 34:00:
### What version of PRBMath are you using? 5959ef59f906d689c2472ed08797872a1cc00644 ### What version of Solidity are you using? 0.8.19 ### Describe the bug the unchecked division at the start of mulDiv...
See high_byte's [tweet](https://twitter.com/high_byte/status/1636365098418855936).