Most accurate way to compute x/sqrt(y) in Julia?

You can test it against the results of BigFloats:

d(f, x, y) = f(x, y) - f(big(x), big(y))

I got deviations in the order of 10^-17 for both methods and Float64.

x*1/sqrt(y) is by the way identical to x/sqrt(y).

6 Likes