-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(protocol): LibFixedPointMath contract library license different MAX_EXP_INPUT values #14344
Conversation
@MarcusWentz This is a critical component (part of 1559 math) and i think would require thorough testing which I do not know we want to go for (?). Since i cannot really estimate the real workload it seems floating point notation differs a little bit, it can be tricky to be tailored. Also would be cool having it as an npm package as well - is it available ? |
Remco's answer:
|
Compared the |
…MAX_EXP_INPUT values (#14344) Co-authored-by: adaki2004 <[email protected]> Co-authored-by: d1onys1us <[email protected]>
Motivation
Add license to third party contract library as suggested by @d1onys1us.
Concerns
Expected return types and values seem slightly off.
PRB math exp():
https://github.com/PaulRBerg/prb-math/blob/main/src/sd59x18/Math.sol#L152-L167
type SD59x18 (signed integer) return type seems different than int256 and has
while our current exp() function supports has
With
original returns
PRB converted to int256 returns
Should we keep the old fixed point exp() function?
Where do we use exp() math? How critical is exp() resolution? Do we have test edge cases with exp()?