Skip to content

Conversation

weirdgiraffe
Copy link

@weirdgiraffe weirdgiraffe commented Jan 8, 2025

That is yet another iteration to add Sqrt method into this package. I've already seen previous attempts which were trying to implement the algorithm:

so this solution doesn't reinvent the wheel and just uses the integer Sqrt provided by big go package. The only thing that this PR functionally adds is the rescaling of integers to fit the desired precision.

This PR just creates couple of aliases SqrtRound = PowWithPrecision(0.5, precision) and Sqrt = SrqrtRound(DivisionPrecision)

@weirdgiraffe
Copy link
Author

@mwoss I've seen that you've been involved into reviews of #130, so could you maybe take a look at this one as well?

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