-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add Replicated Sqrt operation #1051
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, Yann! One small request, could you test a bit the bounds that this sqrt function provides accurate results? This way we would know how to calibrate the magnitude of our inputs when we operate with sqrt
Looks good! Perhaps a small proof in the comments would help a future reader?
|
We should add a followup issue to implement the square root as we've described in our whitepaper. |
Thank you both for the review. @rdragos good question. I checked the bounds. With 10 fractional precision, we get accurate result for [0.001, 1000] with error threshold set to 0.1 and for 20 fractional precision we get accurate result [0.01, 500000] for error threshold set to 0.001. Sounds good, I will open a follow up issue to implement Thanks |
One more for the road. When working on a PyMoose example, I realized that
sqrt
was missing to compute pearson correlation. So here it is.sqrt
. We compute the square root usinglog2
andpow2
. There are other algorithm which could much more efficient but it should be good enough for the initial implementation.sqrt
to logical dialect.sqrt
to the edsl.