| Alternative 1 | |
|---|---|
| Accuracy | 99.6% |
| Cost | 39040 |
(FPCore (x) :precision binary64 (- (/ 1.0 (sqrt x)) (/ 1.0 (sqrt (+ x 1.0)))))
(FPCore (x) :precision binary64 (if (<= (+ (/ 1.0 (sqrt x)) (/ -1.0 (sqrt (+ x 1.0)))) 0.0) (* 0.5 (pow x -1.5)) (/ (pow x -0.5) (+ 1.0 (+ x (sqrt (* x (+ x 1.0))))))))
double code(double x) {
return (1.0 / sqrt(x)) - (1.0 / sqrt((x + 1.0)));
}
double code(double x) {
double tmp;
if (((1.0 / sqrt(x)) + (-1.0 / sqrt((x + 1.0)))) <= 0.0) {
tmp = 0.5 * pow(x, -1.5);
} else {
tmp = pow(x, -0.5) / (1.0 + (x + sqrt((x * (x + 1.0)))));
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
code = (1.0d0 / sqrt(x)) - (1.0d0 / sqrt((x + 1.0d0)))
end function
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (((1.0d0 / sqrt(x)) + ((-1.0d0) / sqrt((x + 1.0d0)))) <= 0.0d0) then
tmp = 0.5d0 * (x ** (-1.5d0))
else
tmp = (x ** (-0.5d0)) / (1.0d0 + (x + sqrt((x * (x + 1.0d0)))))
end if
code = tmp
end function
public static double code(double x) {
return (1.0 / Math.sqrt(x)) - (1.0 / Math.sqrt((x + 1.0)));
}
public static double code(double x) {
double tmp;
if (((1.0 / Math.sqrt(x)) + (-1.0 / Math.sqrt((x + 1.0)))) <= 0.0) {
tmp = 0.5 * Math.pow(x, -1.5);
} else {
tmp = Math.pow(x, -0.5) / (1.0 + (x + Math.sqrt((x * (x + 1.0)))));
}
return tmp;
}
def code(x): return (1.0 / math.sqrt(x)) - (1.0 / math.sqrt((x + 1.0)))
def code(x): tmp = 0 if ((1.0 / math.sqrt(x)) + (-1.0 / math.sqrt((x + 1.0)))) <= 0.0: tmp = 0.5 * math.pow(x, -1.5) else: tmp = math.pow(x, -0.5) / (1.0 + (x + math.sqrt((x * (x + 1.0))))) return tmp
function code(x) return Float64(Float64(1.0 / sqrt(x)) - Float64(1.0 / sqrt(Float64(x + 1.0)))) end
function code(x) tmp = 0.0 if (Float64(Float64(1.0 / sqrt(x)) + Float64(-1.0 / sqrt(Float64(x + 1.0)))) <= 0.0) tmp = Float64(0.5 * (x ^ -1.5)); else tmp = Float64((x ^ -0.5) / Float64(1.0 + Float64(x + sqrt(Float64(x * Float64(x + 1.0)))))); end return tmp end
function tmp = code(x) tmp = (1.0 / sqrt(x)) - (1.0 / sqrt((x + 1.0))); end
function tmp_2 = code(x) tmp = 0.0; if (((1.0 / sqrt(x)) + (-1.0 / sqrt((x + 1.0)))) <= 0.0) tmp = 0.5 * (x ^ -1.5); else tmp = (x ^ -0.5) / (1.0 + (x + sqrt((x * (x + 1.0))))); end tmp_2 = tmp; end
code[x_] := N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] - N[(1.0 / N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_] := If[LessEqual[N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0], N[(0.5 * N[Power[x, -1.5], $MachinePrecision]), $MachinePrecision], N[(N[Power[x, -0.5], $MachinePrecision] / N[(1.0 + N[(x + N[Sqrt[N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}
\begin{array}{l}
\mathbf{if}\;\frac{1}{\sqrt{x}} + \frac{-1}{\sqrt{x + 1}} \leq 0:\\
\;\;\;\;0.5 \cdot {x}^{-1.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{{x}^{-0.5}}{1 + \left(x + \sqrt{x \cdot \left(x + 1\right)}\right)}\\
\end{array}
Results
| Original | 69.2% |
|---|---|
| Target | 99.0% |
| Herbie | 100.0% |
if (-.f64 (/.f64 1 (sqrt.f64 x)) (/.f64 1 (sqrt.f64 (+.f64 x 1)))) < 0.0Initial program 37.3%
Applied egg-rr37.3%
[Start]37.3 | \[ \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}
\] |
|---|---|
flip-- [=>]37.3 | \[ \color{blue}{\frac{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}}
\] |
div-inv [=>]37.3 | \[ \color{blue}{\left(\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}\right) \cdot \frac{1}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}}
\] |
*-commutative [=>]37.3 | \[ \color{blue}{\frac{1}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}} \cdot \left(\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}\right)}
\] |
pow1/2 [=>]37.3 | \[ \frac{1}{\frac{1}{\color{blue}{{x}^{0.5}}} + \frac{1}{\sqrt{x + 1}}} \cdot \left(\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}\right)
\] |
pow-flip [=>]37.3 | \[ \frac{1}{\color{blue}{{x}^{\left(-0.5\right)}} + \frac{1}{\sqrt{x + 1}}} \cdot \left(\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}\right)
\] |
metadata-eval [=>]37.3 | \[ \frac{1}{{x}^{\color{blue}{-0.5}} + \frac{1}{\sqrt{x + 1}}} \cdot \left(\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}\right)
\] |
pow1/2 [=>]37.3 | \[ \frac{1}{{x}^{-0.5} + \frac{1}{\color{blue}{{\left(x + 1\right)}^{0.5}}}} \cdot \left(\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}\right)
\] |
pow-flip [=>]37.3 | \[ \frac{1}{{x}^{-0.5} + \color{blue}{{\left(x + 1\right)}^{\left(-0.5\right)}}} \cdot \left(\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}\right)
\] |
+-commutative [=>]37.3 | \[ \frac{1}{{x}^{-0.5} + {\color{blue}{\left(1 + x\right)}}^{\left(-0.5\right)}} \cdot \left(\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}\right)
\] |
metadata-eval [=>]37.3 | \[ \frac{1}{{x}^{-0.5} + {\left(1 + x\right)}^{\color{blue}{-0.5}}} \cdot \left(\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}\right)
\] |
cancel-sign-sub-inv [=>]37.3 | \[ \frac{1}{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}} \cdot \color{blue}{\left(\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} + \left(-\frac{1}{\sqrt{x + 1}}\right) \cdot \frac{1}{\sqrt{x + 1}}\right)}
\] |
Taylor expanded in x around inf 65.3%
Applied egg-rr37.3%
[Start]65.3 | \[ 0.5 \cdot \sqrt{\frac{1}{{x}^{3}}}
\] |
|---|---|
expm1-log1p-u [=>]65.3 | \[ 0.5 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{1}{{x}^{3}}}\right)\right)}
\] |
expm1-udef [=>]37.3 | \[ 0.5 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\frac{1}{{x}^{3}}}\right)} - 1\right)}
\] |
pow-flip [=>]37.3 | \[ 0.5 \cdot \left(e^{\mathsf{log1p}\left(\sqrt{\color{blue}{{x}^{\left(-3\right)}}}\right)} - 1\right)
\] |
sqrt-pow1 [=>]37.3 | \[ 0.5 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{{x}^{\left(\frac{-3}{2}\right)}}\right)} - 1\right)
\] |
metadata-eval [=>]37.3 | \[ 0.5 \cdot \left(e^{\mathsf{log1p}\left({x}^{\left(\frac{\color{blue}{-3}}{2}\right)}\right)} - 1\right)
\] |
metadata-eval [=>]37.3 | \[ 0.5 \cdot \left(e^{\mathsf{log1p}\left({x}^{\color{blue}{-1.5}}\right)} - 1\right)
\] |
Simplified100.0%
[Start]37.3 | \[ 0.5 \cdot \left(e^{\mathsf{log1p}\left({x}^{-1.5}\right)} - 1\right)
\] |
|---|---|
expm1-def [=>]100.0 | \[ 0.5 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({x}^{-1.5}\right)\right)}
\] |
expm1-log1p [=>]100.0 | \[ 0.5 \cdot \color{blue}{{x}^{-1.5}}
\] |
if 0.0 < (-.f64 (/.f64 1 (sqrt.f64 x)) (/.f64 1 (sqrt.f64 (+.f64 x 1)))) Initial program 97.7%
Applied egg-rr97.4%
[Start]97.7 | \[ \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}
\] |
|---|---|
add-cbrt-cube [=>]97.6 | \[ \frac{1}{\sqrt{x}} - \frac{1}{\color{blue}{\sqrt[3]{\left(\sqrt{x + 1} \cdot \sqrt{x + 1}\right) \cdot \sqrt{x + 1}}}}
\] |
pow1/3 [=>]97.4 | \[ \frac{1}{\sqrt{x}} - \frac{1}{\color{blue}{{\left(\left(\sqrt{x + 1} \cdot \sqrt{x + 1}\right) \cdot \sqrt{x + 1}\right)}^{0.3333333333333333}}}
\] |
add-sqr-sqrt [<=]97.4 | \[ \frac{1}{\sqrt{x}} - \frac{1}{{\left(\color{blue}{\left(x + 1\right)} \cdot \sqrt{x + 1}\right)}^{0.3333333333333333}}
\] |
pow1 [=>]97.4 | \[ \frac{1}{\sqrt{x}} - \frac{1}{{\left(\color{blue}{{\left(x + 1\right)}^{1}} \cdot \sqrt{x + 1}\right)}^{0.3333333333333333}}
\] |
pow1/2 [=>]97.4 | \[ \frac{1}{\sqrt{x}} - \frac{1}{{\left({\left(x + 1\right)}^{1} \cdot \color{blue}{{\left(x + 1\right)}^{0.5}}\right)}^{0.3333333333333333}}
\] |
pow-prod-up [=>]97.4 | \[ \frac{1}{\sqrt{x}} - \frac{1}{{\color{blue}{\left({\left(x + 1\right)}^{\left(1 + 0.5\right)}\right)}}^{0.3333333333333333}}
\] |
+-commutative [=>]97.4 | \[ \frac{1}{\sqrt{x}} - \frac{1}{{\left({\color{blue}{\left(1 + x\right)}}^{\left(1 + 0.5\right)}\right)}^{0.3333333333333333}}
\] |
metadata-eval [=>]97.4 | \[ \frac{1}{\sqrt{x}} - \frac{1}{{\left({\left(1 + x\right)}^{\color{blue}{1.5}}\right)}^{0.3333333333333333}}
\] |
Simplified97.7%
[Start]97.4 | \[ \frac{1}{\sqrt{x}} - \frac{1}{{\left({\left(1 + x\right)}^{1.5}\right)}^{0.3333333333333333}}
\] |
|---|---|
unpow1/3 [=>]97.7 | \[ \frac{1}{\sqrt{x}} - \frac{1}{\color{blue}{\sqrt[3]{{\left(1 + x\right)}^{1.5}}}}
\] |
Applied egg-rr99.9%
[Start]97.7 | \[ \frac{1}{\sqrt{x}} - \frac{1}{\sqrt[3]{{\left(1 + x\right)}^{1.5}}}
\] |
|---|---|
frac-sub [=>]97.7 | \[ \color{blue}{\frac{1 \cdot \sqrt[3]{{\left(1 + x\right)}^{1.5}} - \sqrt{x} \cdot 1}{\sqrt{x} \cdot \sqrt[3]{{\left(1 + x\right)}^{1.5}}}}
\] |
div-inv [=>]97.7 | \[ \color{blue}{\left(1 \cdot \sqrt[3]{{\left(1 + x\right)}^{1.5}} - \sqrt{x} \cdot 1\right) \cdot \frac{1}{\sqrt{x} \cdot \sqrt[3]{{\left(1 + x\right)}^{1.5}}}}
\] |
*-rgt-identity [=>]97.7 | \[ \left(1 \cdot \sqrt[3]{{\left(1 + x\right)}^{1.5}} - \color{blue}{\sqrt{x}}\right) \cdot \frac{1}{\sqrt{x} \cdot \sqrt[3]{{\left(1 + x\right)}^{1.5}}}
\] |
*-un-lft-identity [<=]97.7 | \[ \left(\color{blue}{\sqrt[3]{{\left(1 + x\right)}^{1.5}}} - \sqrt{x}\right) \cdot \frac{1}{\sqrt{x} \cdot \sqrt[3]{{\left(1 + x\right)}^{1.5}}}
\] |
flip-- [=>]98.0 | \[ \color{blue}{\frac{\sqrt[3]{{\left(1 + x\right)}^{1.5}} \cdot \sqrt[3]{{\left(1 + x\right)}^{1.5}} - \sqrt{x} \cdot \sqrt{x}}{\sqrt[3]{{\left(1 + x\right)}^{1.5}} + \sqrt{x}}} \cdot \frac{1}{\sqrt{x} \cdot \sqrt[3]{{\left(1 + x\right)}^{1.5}}}
\] |
metadata-eval [<=]98.0 | \[ \frac{\sqrt[3]{{\left(1 + x\right)}^{1.5}} \cdot \sqrt[3]{{\left(1 + x\right)}^{1.5}} - \sqrt{x} \cdot \sqrt{x}}{\sqrt[3]{{\left(1 + x\right)}^{1.5}} + \sqrt{x}} \cdot \frac{\color{blue}{1 \cdot 1}}{\sqrt{x} \cdot \sqrt[3]{{\left(1 + x\right)}^{1.5}}}
\] |
frac-times [<=]98.0 | \[ \frac{\sqrt[3]{{\left(1 + x\right)}^{1.5}} \cdot \sqrt[3]{{\left(1 + x\right)}^{1.5}} - \sqrt{x} \cdot \sqrt{x}}{\sqrt[3]{{\left(1 + x\right)}^{1.5}} + \sqrt{x}} \cdot \color{blue}{\left(\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt[3]{{\left(1 + x\right)}^{1.5}}}\right)}
\] |
associate-*l/ [=>]98.0 | \[ \color{blue}{\frac{\left(\sqrt[3]{{\left(1 + x\right)}^{1.5}} \cdot \sqrt[3]{{\left(1 + x\right)}^{1.5}} - \sqrt{x} \cdot \sqrt{x}\right) \cdot \left(\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt[3]{{\left(1 + x\right)}^{1.5}}}\right)}{\sqrt[3]{{\left(1 + x\right)}^{1.5}} + \sqrt{x}}}
\] |
Simplified99.9%
[Start]99.9 | \[ \frac{\left(1 + \left(x - x\right)\right) \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, \sqrt{x}\right)}}{\mathsf{hypot}\left(1, \sqrt{x}\right) + \sqrt{x}}
\] |
|---|---|
+-commutative [=>]99.9 | \[ \frac{\color{blue}{\left(\left(x - x\right) + 1\right)} \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, \sqrt{x}\right)}}{\mathsf{hypot}\left(1, \sqrt{x}\right) + \sqrt{x}}
\] |
+-inverses [=>]99.9 | \[ \frac{\left(\color{blue}{0} + 1\right) \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, \sqrt{x}\right)}}{\mathsf{hypot}\left(1, \sqrt{x}\right) + \sqrt{x}}
\] |
metadata-eval [=>]99.9 | \[ \frac{\color{blue}{1} \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, \sqrt{x}\right)}}{\mathsf{hypot}\left(1, \sqrt{x}\right) + \sqrt{x}}
\] |
associate-*r/ [=>]99.9 | \[ \frac{\color{blue}{\frac{1 \cdot {x}^{-0.5}}{\mathsf{hypot}\left(1, \sqrt{x}\right)}}}{\mathsf{hypot}\left(1, \sqrt{x}\right) + \sqrt{x}}
\] |
associate-/l/ [=>]99.9 | \[ \color{blue}{\frac{1 \cdot {x}^{-0.5}}{\left(\mathsf{hypot}\left(1, \sqrt{x}\right) + \sqrt{x}\right) \cdot \mathsf{hypot}\left(1, \sqrt{x}\right)}}
\] |
*-lft-identity [=>]99.9 | \[ \frac{\color{blue}{{x}^{-0.5}}}{\left(\mathsf{hypot}\left(1, \sqrt{x}\right) + \sqrt{x}\right) \cdot \mathsf{hypot}\left(1, \sqrt{x}\right)}
\] |
+-commutative [=>]99.9 | \[ \frac{{x}^{-0.5}}{\color{blue}{\left(\sqrt{x} + \mathsf{hypot}\left(1, \sqrt{x}\right)\right)} \cdot \mathsf{hypot}\left(1, \sqrt{x}\right)}
\] |
Applied egg-rr99.9%
[Start]99.9 | \[ \frac{{x}^{-0.5}}{\left(\sqrt{x} + \mathsf{hypot}\left(1, \sqrt{x}\right)\right) \cdot \mathsf{hypot}\left(1, \sqrt{x}\right)}
\] |
|---|---|
*-commutative [=>]99.9 | \[ \frac{{x}^{-0.5}}{\color{blue}{\mathsf{hypot}\left(1, \sqrt{x}\right) \cdot \left(\sqrt{x} + \mathsf{hypot}\left(1, \sqrt{x}\right)\right)}}
\] |
distribute-rgt-in [=>]99.9 | \[ \frac{{x}^{-0.5}}{\color{blue}{\sqrt{x} \cdot \mathsf{hypot}\left(1, \sqrt{x}\right) + \mathsf{hypot}\left(1, \sqrt{x}\right) \cdot \mathsf{hypot}\left(1, \sqrt{x}\right)}}
\] |
hypot-udef [=>]99.9 | \[ \frac{{x}^{-0.5}}{\sqrt{x} \cdot \mathsf{hypot}\left(1, \sqrt{x}\right) + \color{blue}{\sqrt{1 \cdot 1 + \sqrt{x} \cdot \sqrt{x}}} \cdot \mathsf{hypot}\left(1, \sqrt{x}\right)}
\] |
hypot-udef [=>]99.9 | \[ \frac{{x}^{-0.5}}{\sqrt{x} \cdot \mathsf{hypot}\left(1, \sqrt{x}\right) + \sqrt{1 \cdot 1 + \sqrt{x} \cdot \sqrt{x}} \cdot \color{blue}{\sqrt{1 \cdot 1 + \sqrt{x} \cdot \sqrt{x}}}}
\] |
add-sqr-sqrt [<=]99.9 | \[ \frac{{x}^{-0.5}}{\sqrt{x} \cdot \mathsf{hypot}\left(1, \sqrt{x}\right) + \color{blue}{\left(1 \cdot 1 + \sqrt{x} \cdot \sqrt{x}\right)}}
\] |
metadata-eval [=>]99.9 | \[ \frac{{x}^{-0.5}}{\sqrt{x} \cdot \mathsf{hypot}\left(1, \sqrt{x}\right) + \left(\color{blue}{1} + \sqrt{x} \cdot \sqrt{x}\right)}
\] |
add-sqr-sqrt [<=]99.9 | \[ \frac{{x}^{-0.5}}{\sqrt{x} \cdot \mathsf{hypot}\left(1, \sqrt{x}\right) + \left(1 + \color{blue}{x}\right)}
\] |
+-commutative [=>]99.9 | \[ \frac{{x}^{-0.5}}{\sqrt{x} \cdot \mathsf{hypot}\left(1, \sqrt{x}\right) + \color{blue}{\left(x + 1\right)}}
\] |
associate-+r+ [=>]99.9 | \[ \frac{{x}^{-0.5}}{\color{blue}{\left(\sqrt{x} \cdot \mathsf{hypot}\left(1, \sqrt{x}\right) + x\right) + 1}}
\] |
Final simplification100.0%
| Alternative 1 | |
|---|---|
| Accuracy | 99.6% |
| Cost | 39040 |
| Alternative 2 | |
|---|---|
| Accuracy | 99.2% |
| Cost | 26692 |
| Alternative 3 | |
|---|---|
| Accuracy | 99.4% |
| Cost | 13696 |
| Alternative 4 | |
|---|---|
| Accuracy | 98.6% |
| Cost | 7172 |
| Alternative 5 | |
|---|---|
| Accuracy | 98.6% |
| Cost | 7044 |
| Alternative 6 | |
|---|---|
| Accuracy | 96.8% |
| Cost | 6788 |
| Alternative 7 | |
|---|---|
| Accuracy | 98.3% |
| Cost | 6788 |
| Alternative 8 | |
|---|---|
| Accuracy | 50.9% |
| Cost | 6528 |
| Alternative 9 | |
|---|---|
| Accuracy | 3.9% |
| Cost | 192 |
| Alternative 10 | |
|---|---|
| Accuracy | 1.9% |
| Cost | 64 |
herbie shell --seed 2023138
(FPCore (x)
:name "2isqrt (example 3.6)"
:precision binary64
:herbie-target
(/ 1.0 (+ (* (+ x 1.0) (sqrt x)) (* x (sqrt (+ x 1.0)))))
(- (/ 1.0 (sqrt x)) (/ 1.0 (sqrt (+ x 1.0)))))