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

**URL:** https://discourse.julialang.org/t/most-accurate-way-to-compute-x-sqrt-y-in-julia/51061
**Category:** Performance
**Tags:** precision
**Created:** [December 1, 2020, 7:05pm UTC](https://discourse.julialang.org/t/most-accurate-way-to-compute-x-sqrt-y-in-julia/51061 "2020-12-01T19:05:31Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)
#### Post date: [December 1, 2020, 7:28pm UTC](https://discourse.julialang.org/t/most-accurate-way-to-compute-x-sqrt-y-in-julia/51061/2 "2020-12-01T19:28:55Z")

</div>

You can test it against the results of BigFloats:

```julia
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)`.

---

_[View the full topic](https://discourse.julialang.org/t/most-accurate-way-to-compute-x-sqrt-y-in-julia/51061)._
