Skip to content

Commit

Permalink
Fix prbmath.exp tests
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed May 14, 2021
1 parent 324caef commit 7dc5148
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ contract test {
ret = x.div(y);
}
function exp(int256 x) external pure returns (int256 ret) {
ret = x.log10();
ret = x.exp();
}
function exp2(int256 x) external pure returns (int256 ret) {
ret = x.exp2();
Expand Down Expand Up @@ -50,17 +50,17 @@ contract test {
// compileViaYul: also
// ----
// constructor()
// gas irOptimized: 2149588
// gas legacy: 2561184
// gas legacyOptimized: 1874610
// gas irOptimized: 2171167
// gas legacy: 2602700
// gas legacyOptimized: 1900162
// div(int256,int256): 3141592653589793238, 88714123 -> 35412542528203691288251815328
// gas irOptimized: 22303
// gas legacy: 22767
// gas legacyOptimized: 22282
// exp(int256): 3141592653589793238 -> 4971498726941338506
// gas irOptimized: 31438
// gas legacy: 32933
// gas legacyOptimized: 30322
// exp(int256): 3141592653589793238 -> 23140692632779268978
// gas irOptimized: 25094
// gas legacy: 25203
// gas legacyOptimized: 24357
// exp2(int256): 3141592653589793238 -> 8824977827076287620
// gas irOptimized: 24808
// gas legacy: 24864
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ contract test {
ret = x.div(y);
}
function exp(uint256 x) external pure returns (uint256 ret) {
ret = x.log10();
ret = x.exp();
}
function exp2(uint256 x) external pure returns (uint256 ret) {
ret = x.exp2();
Expand Down Expand Up @@ -50,17 +50,17 @@ contract test {
// compileViaYul: also
// ----
// constructor()
// gas irOptimized: 1945345
// gas legacy: 2326345
// gas legacyOptimized: 1750080
// gas irOptimized: 1961108
// gas legacy: 2356230
// gas legacyOptimized: 1770105
// div(uint256,uint256): 3141592653589793238, 88714123 -> 35412542528203691288251815328
// gas irOptimized: 22103
// gas legacy: 22497
// gas legacyOptimized: 22010
// exp(uint256): 3141592653589793238 -> 0x44fe4fc084a52b8a
// gas irOptimized: 30892
// gas legacy: 32854
// gas legacyOptimized: 29881
// exp(uint256): 3141592653589793238 -> 23140692632779268978
// gas irOptimized: 24981
// gas legacy: 25104
// gas legacyOptimized: 24258
// exp2(uint256): 3141592653589793238 -> 8824977827076287620
// gas irOptimized: 24746
// gas legacy: 24814
Expand Down

0 comments on commit 7dc5148

Please sign in to comment.