solidity/test/libsolidity/semanticTests/arithmetics/signed_mod.sol

15 lines
302 B
Solidity
Raw Normal View History

2020-05-11 17:56:29 +00:00
contract C {
function f(int a, int b) public pure returns (int) {
return a % b;
}
}
// ====
// compileViaYul: also
// ----
// f(int256,int256): 7, 5 -> 2
// f(int256,int256): 7, -5 -> 2
// f(int256,int256): -7, 5 -> -2
// f(int256,int256): -7, 5 -> -2
// f(int256,int256): -5, -5 -> 0