We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug u128 division not working as expected for number bigger than 300 N (300 * 10^24). Used to calculate commission/royalty fee.
To Reproduce Steps to reproduce the behavior:
const mul = u128.mul( u128.from('5000000000000000000000000000'), u128.from(95) ) log(mul.toString()) // true return 475000000000000000000000000000 const div100 = u128.div(mul, u128.from(100)) log(div100.toString()) // false return 0 const _div10 = u128.div10(mul) const _div100 = u128.div10(_div10) log(_div100.toString()) // true return 4750000000000000000000000000
Expected behavior u128 division to return expected calculated value
The text was updated successfully, but these errors were encountered:
fixed by: #364
Sorry, something went wrong.
No branches or pull requests
Describe the bug
u128 division not working as expected for number bigger than 300 N (300 * 10^24).
Used to calculate commission/royalty fee.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
u128 division to return expected calculated value
The text was updated successfully, but these errors were encountered: