Skip to content
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

Fix comment in "prbSqrt" #103

Closed
PaulRBerg opened this issue Jul 12, 2022 · 1 comment
Closed

Fix comment in "prbSqrt" #103

PaulRBerg opened this issue Jul 12, 2022 · 1 comment

Comments

@PaulRBerg
Copy link
Owner

As @nonergodic has aptly mentioned here, the comment on line 604 of PRBMath.sol is incorrect:

https://github.com/paulrberg/prb-math/blob/e33a042e4d1673fe9b333830b75c4765ccf3f5f2/contracts/PRBMath.sol#L604

Instead the comment should say something along the line of:

Set the initial guess to the largest power of two that is smaller than or equal to sqrt(x)

Relevant link: see OpenZeppelin's implementation.

@PaulRBerg
Copy link
Owner Author

Done in 3c92e3a.

@PaulRBerg PaulRBerg changed the title Fix comment in "PRBMath.sqrt" Fix comment in "prbSqrt" Nov 27, 2022
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

No branches or pull requests

1 participant