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
{{ message }}
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
When used with an argument with many decimals, (exp) uses billions of gas
Steps to reproduce
pact> (env-gasmodel"table")
"Set gas model to table-based cost model"
pact> (env-gaslimit1000000)
"Set gas limit to 1000000"
pact> (env-gas0)
"Set gas to 0"
pact> (exp -0.00369328591312029)
(interactive):1:0: Gas limit "1000000"exceeded:184467440737095521 | (exp -0.00369328591312029)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
Expected Behavior
I would expect something more reasonable.
Debug Information
This one is ok:
pact> (env-gasmodel"table")
"Set gas model to table-based cost model"
pact> (env-gaslimit10)
"Set gas limit to 10"
pact> (env-gas0)
"Set gas to 0"
pact> (^ (exp1.0) -0.00369328591312029)
0.99631352587875243731474483865895308554172515869140625
pact> (env-gas)
3
Note: I have the same beahviour on-chain and in REPL