Skip to content

🥢 Correct rounding direction comments in FixedPointMathLib.sol - #1558

Merged
atarpara merged 1 commit into
mainfrom
fix-mathlib
Sep 1, 2026
Merged

atarpara merged 1 commit into
mainfrom
fix-mathlib

Conversation

@atarpara

Copy link
Copy Markdown
Collaborator

Description

Describe the changes made in your pull request here.

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Ran forge fmt?
  • Ran forge test?

Pull requests with an incomplete checklist will be thrown out.

@atarpara atarpara changed the title Fix mathlib 🥢 Correct rounding direction comments in FixedPointMathLib.sol Aug 31, 2026
@github-actions

Copy link
Copy Markdown

Gas Snapshot Comparison Report

Generated at commit : 71a8a94, Compared to commit : 4225d5f

Contract Name Test Name Main Gas PR Gas Diff
FixedPointMathLibTest testAbs() 698 676 -22
testAbsEdgeCases() 490 468 -22
testAvgEdgeCase() 445 490 45
testCbrtWadConverged() 24191 24211 20
testCbrtWadDebug() 7369 7325 -44
testDist() 675 631 -44
testDistEdgeCases() 567 523 -44
testDivWadUp() 2949 2927 -22
testDivWadUpEdgeCases() 446 469 23
testDivWadUpZeroDenominatorReverts() 3945 3967 22
testDivWadZeroDenominatorReverts() 3948 3966 18
testFactorial() 97524 97546 22
testFullMulDiv() 1099 1143 44
testFullMulDivUnchecked() 1622 1578 -44
testFullMulDivUpRevertsIfRoundedUpResultOverflowsCase1() 4450 4517 67
testFullMulDivUpRevertsIfRoundedUpResultOverflowsCase2() 4494 4516 22
testInvMod() 12885 12908 23
testLambertW0WadMonoDebug() 769090 769068 -22
testLambertW0WadMonotonicallyIncreasing() 18356886 18356909 23
testLambertW0WadMonotonicallyIncreasing2() 4030663 4030641 -22
testLambertW0WadRevertsForOutOfDomain() 112923 112681 -242
testLerpInt() 6410 6455 45
testLerpUint() 6413 6369 -44
testLnWad() 2071 2094 23
testLnWadNegativeReverts() 11231 11165 -66
testLnWadOverflowReverts() 4037 4014 -23
testLnWadSmall() 2703 2681 -22
testLog10() 75973 75929 -44
testLog10Up() 4408 4364 -44
testLog256() 22804 22826 22
testLog2Up() 318958 318981 23
testMulDiv() 1911 1867 -44
testMulDivEdgeCases() 755 733 -22
testMulDivUpEdgeCases() 831 854 23
testMulDivUpZeroDenominator() 4041 4019 -22
testMulDivZeroDenominatorReverts() 4018 3996 -22
testMulSqrt() 1941009 1940987 -22
testMulWadEdgeCases() 695 718 23
testMulWadUp() 778 801 23
testMulWadUpEdgeCases() 768 791 23
testRPow() 3283 3306 23
testRPowOverflowReverts() 13229 13119 -110
testSDivWad() 858 836 -22
testSMulWad() 1028 1048 20
testSaturatingAdd() 1491 1492 1
testSaturatingMul() 1599 1622 23
testSci() 1828180 1828158 -22
testSqrt() 45390 45435 45
testSqrtHashedSingle() 54630 54586 -44
testSqrtWad() 7914 7936 22
test__codesize() 60859 62241 1382
testRawSDivWadEdgeCases() - 11346 -
testRawSMulWadEdgeCases() - 4232 -
testSDivWadRoundsTowardsZero() - 1183 -
testSMulWadRoundsTowardsZero() - 1783 -

@atarpara
atarpara merged commit 9fe23ff into main Sep 1, 2026
14 checks passed
@atarpara
atarpara deleted the fix-mathlib branch September 2, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant