Created
September 9, 2018 12:24
-
-
Save JohannesGitHub/986aee1ecb79b27586b73da33fff9f28 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.4.24; | |
| contract Arithmetic { | |
| uint256 public unsignedIntMax; | |
| int256 public signedIntMax; | |
| uint256 public unsignedIntMin; | |
| int256 public signedIntMin; | |
| constructor() public { | |
| unsignedIntMax = ~uint256(0); | |
| signedIntMax = int256((~uint256(0)) >> 1); | |
| unsignedIntMin = uint256(0); | |
| signedIntMin = int256((uint256(1) << 255)); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment