You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per #2072, we are performing overflow checks on exponentiation as long as either the base or power is a literal value. We still need to implement these checks in the case where both values are unknown at compile time.
Took a hand at (3) using the link @michwill sent: https://github.com/fubuloubu/integer-exponential. Looks like it takes 10994 gas in the uint256 case, and 9575 gas in the int128 case (one less round required). The calls normally take 558 gas and 752 gas respectively (no idea why uint256 is cheaper here), so about a 10x-20x markup for this most general case
Per #2072, we are performing overflow checks on exponentiation as long as either the base or power is a literal value. We still need to implement these checks in the case where both values are unknown at compile time.
Originally posted by @fubuloubu in #1684 (comment)
The arithmetic leg-work is done here, we just need to implement and test it.
The text was updated successfully, but these errors were encountered: