Closed yanndupis closed 2 years ago
Looks good! Perhaps a small proof in the comments would help a future reader?
2^(0.5 * log_2 x) = (2^log_2 x)^0.5 = x^0.5 = sqrt(x)
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 sqrt
as described in the whitepaper.
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.