Skip to content

Instantly share code, notes, and snippets.

@PaulRBerg
Created March 23, 2021 13:42
Show Gist options
  • Save PaulRBerg/947248d299b900bc806ffc048060e5b9 to your computer and use it in GitHub Desktop.
Save PaulRBerg/947248d299b900bc806ffc048060e5b9 to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract CompileVsRuntime {
uint256 public constant j0 = ((7 / 11 + 3 / 13) * 22 + 1) * 39;
function foo(uint256 x, uint256 y, uint256 w, uint256 z, uint256 x2, uint256 y2, uint256 w2) external pure returns (uint256) {
uint256 j1 = ((x / y + z / w) * x2 + y2) * w2;
return j1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment