Implements fixed point numbers in Solidity using the Q number format.
Built off the Uniswap FixedPoint and Babylonian libraries developed by moodysalem.
This library uses the UQ192x64 format to maximize the range of fixed point numbers while keeping the resolution close to the 18 decimal places that is standard for most Solidity contracts.
Uniswap originally used the UQ112x112 format to optimize the variable packing in their contracts.
npm install
npx buidler compile
npx buidler test
- @opz 💻