-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
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
Add support to Math.Pow #834
Comments
BigInteger.Pow |
Would it be hard to add Math.Pow and make it work like BigInteger.Pow? |
Can't you use BigInteger in python? Would be like this: BigInteger.Pow(100_000_000, 8); // (value, exponent) |
Well, not hard at all, just a few lines of code. I am working to make the method support more complete, but will take time to get merged. |
Sure, no rush. Thank you for looking into it |
Problem:
The Decimals property "can't" be used inside smart contracts to deal with the supply.
Example: It's not possible to convert 100_000_000 to 100_000_000.00000000.
Solution:
Add support to Math.Pow (or equivalent).
Python Example:
Note: I'm not sure if there is another solution for this.
Question: How do people calculate the total supply without using the decimals property? (inside the smart contract).
The text was updated successfully, but these errors were encountered: