solidity/test/libsolidity/semanticTests/exponentiation/small_exp.sol

15 lines
259 B
Solidity
Raw Normal View History

contract test {
2020-09-15 14:16:30 +00:00
function f() public pure returns (uint r) {
uint32 x;
uint8 y;
assembly {
x := 0xfffffffffe
y := 0x102
}
2020-09-15 14:16:30 +00:00
unchecked { r = x**y; }
return r;
}
}
// ----
// f() -> 4