Allow exponentials with signed base and unsigned power.

This commit is contained in:
krk
2019-09-04 17:32:47 +02:00
committed by chriseth
parent c499758cd8
commit 33f7f960cf
10 changed files with 72 additions and 18 deletions
@@ -0,0 +1,14 @@
contract test {
function f() public pure returns (int, int) {
int32 x = -3;
uint8 y1;
uint8 y2;
assembly {
y1 := 0x102
y2 := 0x103
}
return (x**y1, x**y2);
}
}
// ----
// f() -> 9, -27
@@ -0,0 +1,13 @@
contract test {
function f() public pure returns (uint) {
uint32 x;
uint8 y;
assembly {
x := 0xfffffffffe
y := 0x102
}
return x**y;
}
}
// ----
// f() -> 4