
(FPCore (x) :precision binary64 (- (/ 1.0 (sqrt x)) (/ 1.0 (sqrt (+ x 1.0)))))
double code(double x) {
return (1.0 / sqrt(x)) - (1.0 / sqrt((x + 1.0)));
}
real(8) function code(x)
real(8), intent (in) :: x
code = (1.0d0 / sqrt(x)) - (1.0d0 / sqrt((x + 1.0d0)))
end function
public static double code(double x) {
return (1.0 / Math.sqrt(x)) - (1.0 / Math.sqrt((x + 1.0)));
}
def code(x): return (1.0 / math.sqrt(x)) - (1.0 / math.sqrt((x + 1.0)))
function code(x) return Float64(Float64(1.0 / sqrt(x)) - Float64(1.0 / sqrt(Float64(x + 1.0)))) end
function tmp = code(x) tmp = (1.0 / sqrt(x)) - (1.0 / sqrt((x + 1.0))); 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]
\begin{array}{l}
\\
\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x) :precision binary64 (- (/ 1.0 (sqrt x)) (/ 1.0 (sqrt (+ x 1.0)))))
double code(double x) {
return (1.0 / sqrt(x)) - (1.0 / sqrt((x + 1.0)));
}
real(8) function code(x)
real(8), intent (in) :: x
code = (1.0d0 / sqrt(x)) - (1.0d0 / sqrt((x + 1.0d0)))
end function
public static double code(double x) {
return (1.0 / Math.sqrt(x)) - (1.0 / Math.sqrt((x + 1.0)));
}
def code(x): return (1.0 / math.sqrt(x)) - (1.0 / math.sqrt((x + 1.0)))
function code(x) return Float64(Float64(1.0 / sqrt(x)) - Float64(1.0 / sqrt(Float64(x + 1.0)))) end
function tmp = code(x) tmp = (1.0 / sqrt(x)) - (1.0 / sqrt((x + 1.0))); 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]
\begin{array}{l}
\\
\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}
\end{array}
(FPCore (x) :precision binary64 (if (<= x 280000.0) (- (pow x -0.5) (pow (+ 1.0 x) -0.5)) (fma 0.5 (pow x -1.5) (* -0.375 (pow x -2.5)))))
double code(double x) {
double tmp;
if (x <= 280000.0) {
tmp = pow(x, -0.5) - pow((1.0 + x), -0.5);
} else {
tmp = fma(0.5, pow(x, -1.5), (-0.375 * pow(x, -2.5)));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 280000.0) tmp = Float64((x ^ -0.5) - (Float64(1.0 + x) ^ -0.5)); else tmp = fma(0.5, (x ^ -1.5), Float64(-0.375 * (x ^ -2.5))); end return tmp end
code[x_] := If[LessEqual[x, 280000.0], N[(N[Power[x, -0.5], $MachinePrecision] - N[Power[N[(1.0 + x), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Power[x, -1.5], $MachinePrecision] + N[(-0.375 * N[Power[x, -2.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 280000:\\
\;\;\;\;{x}^{-0.5} - {\left(1 + x\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.5, {x}^{-1.5}, -0.375 \cdot {x}^{-2.5}\right)\\
\end{array}
\end{array}
if x < 2.8e5Initial program 99.4%
*-un-lft-identity99.4%
clear-num99.4%
associate-/r/99.4%
prod-diff99.4%
*-un-lft-identity99.4%
fma-neg99.4%
*-un-lft-identity99.4%
inv-pow99.4%
sqrt-pow299.9%
metadata-eval99.9%
pow1/299.9%
pow-flip99.9%
+-commutative99.9%
metadata-eval99.9%
Applied egg-rr99.9%
fma-udef99.9%
neg-mul-199.9%
rem-log-exp99.8%
log-rec99.8%
+-commutative99.8%
log-rec99.8%
rem-log-exp99.9%
sub-neg99.9%
+-inverses99.9%
+-rgt-identity99.9%
Simplified99.9%
if 2.8e5 < x Initial program 33.4%
*-un-lft-identity33.4%
clear-num33.4%
associate-/r/33.4%
prod-diff33.4%
*-un-lft-identity33.4%
fma-neg33.4%
*-un-lft-identity33.4%
inv-pow33.4%
sqrt-pow224.3%
metadata-eval24.3%
pow1/224.3%
pow-flip33.5%
+-commutative33.5%
metadata-eval33.5%
Applied egg-rr33.5%
fma-udef33.5%
neg-mul-133.5%
rem-log-exp5.5%
log-rec5.7%
+-commutative5.7%
log-rec5.5%
rem-log-exp33.5%
sub-neg33.5%
+-inverses33.5%
+-rgt-identity33.5%
Simplified33.5%
Taylor expanded in x around inf 62.8%
expm1-log1p-u62.8%
expm1-udef32.4%
fma-def32.4%
pow-flip32.4%
metadata-eval32.4%
*-commutative32.4%
pow-flip32.4%
metadata-eval32.4%
Applied egg-rr32.4%
expm1-def64.9%
expm1-log1p64.9%
fma-udef64.9%
+-commutative64.9%
*-commutative64.9%
fma-udef64.9%
sqr-pow64.9%
rem-sqrt-square100.0%
sqr-pow99.4%
fabs-sqr99.4%
sqr-pow100.0%
metadata-eval100.0%
sqr-pow100.0%
rem-sqrt-square100.0%
sqr-pow100.0%
fabs-sqr100.0%
sqr-pow100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification99.9%
(FPCore (x)
:precision binary64
(let* ((t_0 (sqrt (+ 1.0 x))))
(if (<= (+ (/ 1.0 (sqrt x)) (/ -1.0 t_0)) 1e-14)
(/ (/ 1.0 (+ (sqrt x) t_0)) (+ x 0.5))
(- (pow x -0.5) (pow (+ 1.0 x) -0.5)))))
double code(double x) {
double t_0 = sqrt((1.0 + x));
double tmp;
if (((1.0 / sqrt(x)) + (-1.0 / t_0)) <= 1e-14) {
tmp = (1.0 / (sqrt(x) + t_0)) / (x + 0.5);
} else {
tmp = pow(x, -0.5) - pow((1.0 + x), -0.5);
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt((1.0d0 + x))
if (((1.0d0 / sqrt(x)) + ((-1.0d0) / t_0)) <= 1d-14) then
tmp = (1.0d0 / (sqrt(x) + t_0)) / (x + 0.5d0)
else
tmp = (x ** (-0.5d0)) - ((1.0d0 + x) ** (-0.5d0))
end if
code = tmp
end function
public static double code(double x) {
double t_0 = Math.sqrt((1.0 + x));
double tmp;
if (((1.0 / Math.sqrt(x)) + (-1.0 / t_0)) <= 1e-14) {
tmp = (1.0 / (Math.sqrt(x) + t_0)) / (x + 0.5);
} else {
tmp = Math.pow(x, -0.5) - Math.pow((1.0 + x), -0.5);
}
return tmp;
}
def code(x): t_0 = math.sqrt((1.0 + x)) tmp = 0 if ((1.0 / math.sqrt(x)) + (-1.0 / t_0)) <= 1e-14: tmp = (1.0 / (math.sqrt(x) + t_0)) / (x + 0.5) else: tmp = math.pow(x, -0.5) - math.pow((1.0 + x), -0.5) return tmp
function code(x) t_0 = sqrt(Float64(1.0 + x)) tmp = 0.0 if (Float64(Float64(1.0 / sqrt(x)) + Float64(-1.0 / t_0)) <= 1e-14) tmp = Float64(Float64(1.0 / Float64(sqrt(x) + t_0)) / Float64(x + 0.5)); else tmp = Float64((x ^ -0.5) - (Float64(1.0 + x) ^ -0.5)); end return tmp end
function tmp_2 = code(x) t_0 = sqrt((1.0 + x)); tmp = 0.0; if (((1.0 / sqrt(x)) + (-1.0 / t_0)) <= 1e-14) tmp = (1.0 / (sqrt(x) + t_0)) / (x + 0.5); else tmp = (x ^ -0.5) - ((1.0 + x) ^ -0.5); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], 1e-14], N[(N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x + 0.5), $MachinePrecision]), $MachinePrecision], N[(N[Power[x, -0.5], $MachinePrecision] - N[Power[N[(1.0 + x), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{1 + x}\\
\mathbf{if}\;\frac{1}{\sqrt{x}} + \frac{-1}{t_0} \leq 10^{-14}:\\
\;\;\;\;\frac{\frac{1}{\sqrt{x} + t_0}}{x + 0.5}\\
\mathbf{else}:\\
\;\;\;\;{x}^{-0.5} - {\left(1 + x\right)}^{-0.5}\\
\end{array}
\end{array}
if (-.f64 (/.f64 1 (sqrt.f64 x)) (/.f64 1 (sqrt.f64 (+.f64 x 1)))) < 9.99999999999999999e-15Initial program 33.4%
frac-sub33.3%
clear-num33.3%
sqrt-unprod33.3%
+-commutative33.3%
*-un-lft-identity33.3%
*-rgt-identity33.3%
+-commutative33.3%
Applied egg-rr33.3%
associate-/r/33.3%
associate-*l/33.3%
*-lft-identity33.3%
distribute-rgt-in33.3%
*-lft-identity33.3%
Simplified33.3%
flip--33.7%
div-inv33.7%
add-sqr-sqrt35.2%
+-commutative35.2%
add-sqr-sqrt36.2%
associate--l+36.2%
+-commutative36.2%
+-commutative36.2%
Applied egg-rr36.2%
associate-*r/36.2%
*-rgt-identity36.2%
+-commutative36.2%
Simplified36.2%
Taylor expanded in x around 0 78.5%
Taylor expanded in x around inf 99.7%
+-commutative99.7%
Simplified99.7%
if 9.99999999999999999e-15 < (-.f64 (/.f64 1 (sqrt.f64 x)) (/.f64 1 (sqrt.f64 (+.f64 x 1)))) Initial program 99.4%
*-un-lft-identity99.4%
clear-num99.4%
associate-/r/99.4%
prod-diff99.4%
*-un-lft-identity99.4%
fma-neg99.4%
*-un-lft-identity99.4%
inv-pow99.4%
sqrt-pow299.9%
metadata-eval99.9%
pow1/299.9%
pow-flip99.9%
+-commutative99.9%
metadata-eval99.9%
Applied egg-rr99.9%
fma-udef99.9%
neg-mul-199.9%
rem-log-exp99.8%
log-rec99.8%
+-commutative99.8%
log-rec99.8%
rem-log-exp99.9%
sub-neg99.9%
+-inverses99.9%
+-rgt-identity99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (x)
:precision binary64
(let* ((t_0 (sqrt (+ 1.0 x))))
(if (<= (+ (/ 1.0 (sqrt x)) (/ -1.0 t_0)) 1e-14)
(/ (/ 1.0 (+ (sqrt x) t_0)) x)
(- (pow x -0.5) (pow (+ 1.0 x) -0.5)))))
double code(double x) {
double t_0 = sqrt((1.0 + x));
double tmp;
if (((1.0 / sqrt(x)) + (-1.0 / t_0)) <= 1e-14) {
tmp = (1.0 / (sqrt(x) + t_0)) / x;
} else {
tmp = pow(x, -0.5) - pow((1.0 + x), -0.5);
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt((1.0d0 + x))
if (((1.0d0 / sqrt(x)) + ((-1.0d0) / t_0)) <= 1d-14) then
tmp = (1.0d0 / (sqrt(x) + t_0)) / x
else
tmp = (x ** (-0.5d0)) - ((1.0d0 + x) ** (-0.5d0))
end if
code = tmp
end function
public static double code(double x) {
double t_0 = Math.sqrt((1.0 + x));
double tmp;
if (((1.0 / Math.sqrt(x)) + (-1.0 / t_0)) <= 1e-14) {
tmp = (1.0 / (Math.sqrt(x) + t_0)) / x;
} else {
tmp = Math.pow(x, -0.5) - Math.pow((1.0 + x), -0.5);
}
return tmp;
}
def code(x): t_0 = math.sqrt((1.0 + x)) tmp = 0 if ((1.0 / math.sqrt(x)) + (-1.0 / t_0)) <= 1e-14: tmp = (1.0 / (math.sqrt(x) + t_0)) / x else: tmp = math.pow(x, -0.5) - math.pow((1.0 + x), -0.5) return tmp
function code(x) t_0 = sqrt(Float64(1.0 + x)) tmp = 0.0 if (Float64(Float64(1.0 / sqrt(x)) + Float64(-1.0 / t_0)) <= 1e-14) tmp = Float64(Float64(1.0 / Float64(sqrt(x) + t_0)) / x); else tmp = Float64((x ^ -0.5) - (Float64(1.0 + x) ^ -0.5)); end return tmp end
function tmp_2 = code(x) t_0 = sqrt((1.0 + x)); tmp = 0.0; if (((1.0 / sqrt(x)) + (-1.0 / t_0)) <= 1e-14) tmp = (1.0 / (sqrt(x) + t_0)) / x; else tmp = (x ^ -0.5) - ((1.0 + x) ^ -0.5); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], 1e-14], N[(N[(1.0 / N[(N[Sqrt[x], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[Power[x, -0.5], $MachinePrecision] - N[Power[N[(1.0 + x), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{1 + x}\\
\mathbf{if}\;\frac{1}{\sqrt{x}} + \frac{-1}{t_0} \leq 10^{-14}:\\
\;\;\;\;\frac{\frac{1}{\sqrt{x} + t_0}}{x}\\
\mathbf{else}:\\
\;\;\;\;{x}^{-0.5} - {\left(1 + x\right)}^{-0.5}\\
\end{array}
\end{array}
if (-.f64 (/.f64 1 (sqrt.f64 x)) (/.f64 1 (sqrt.f64 (+.f64 x 1)))) < 9.99999999999999999e-15Initial program 33.4%
frac-sub33.3%
clear-num33.3%
sqrt-unprod33.3%
+-commutative33.3%
*-un-lft-identity33.3%
*-rgt-identity33.3%
+-commutative33.3%
Applied egg-rr33.3%
associate-/r/33.3%
associate-*l/33.3%
*-lft-identity33.3%
distribute-rgt-in33.3%
*-lft-identity33.3%
Simplified33.3%
flip--33.7%
div-inv33.7%
add-sqr-sqrt35.2%
+-commutative35.2%
add-sqr-sqrt36.2%
associate--l+36.2%
+-commutative36.2%
+-commutative36.2%
Applied egg-rr36.2%
associate-*r/36.2%
*-rgt-identity36.2%
+-commutative36.2%
Simplified36.2%
Taylor expanded in x around 0 78.5%
Taylor expanded in x around inf 99.1%
if 9.99999999999999999e-15 < (-.f64 (/.f64 1 (sqrt.f64 x)) (/.f64 1 (sqrt.f64 (+.f64 x 1)))) Initial program 99.4%
*-un-lft-identity99.4%
clear-num99.4%
associate-/r/99.4%
prod-diff99.4%
*-un-lft-identity99.4%
fma-neg99.4%
*-un-lft-identity99.4%
inv-pow99.4%
sqrt-pow299.9%
metadata-eval99.9%
pow1/299.9%
pow-flip99.9%
+-commutative99.9%
metadata-eval99.9%
Applied egg-rr99.9%
fma-udef99.9%
neg-mul-199.9%
rem-log-exp99.8%
log-rec99.8%
+-commutative99.8%
log-rec99.8%
rem-log-exp99.9%
sub-neg99.9%
+-inverses99.9%
+-rgt-identity99.9%
Simplified99.9%
Final simplification99.5%
(FPCore (x) :precision binary64 (/ 1.0 (* (+ (sqrt x) (sqrt (+ 1.0 x))) (hypot x (sqrt x)))))
double code(double x) {
return 1.0 / ((sqrt(x) + sqrt((1.0 + x))) * hypot(x, sqrt(x)));
}
public static double code(double x) {
return 1.0 / ((Math.sqrt(x) + Math.sqrt((1.0 + x))) * Math.hypot(x, Math.sqrt(x)));
}
def code(x): return 1.0 / ((math.sqrt(x) + math.sqrt((1.0 + x))) * math.hypot(x, math.sqrt(x)))
function code(x) return Float64(1.0 / Float64(Float64(sqrt(x) + sqrt(Float64(1.0 + x))) * hypot(x, sqrt(x)))) end
function tmp = code(x) tmp = 1.0 / ((sqrt(x) + sqrt((1.0 + x))) * hypot(x, sqrt(x))); end
code[x_] := N[(1.0 / N[(N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[x ^ 2 + N[Sqrt[x], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\left(\sqrt{x} + \sqrt{1 + x}\right) \cdot \mathsf{hypot}\left(x, \sqrt{x}\right)}
\end{array}
Initial program 68.7%
frac-sub68.7%
clear-num68.7%
sqrt-unprod68.7%
+-commutative68.7%
*-un-lft-identity68.7%
*-rgt-identity68.7%
+-commutative68.7%
Applied egg-rr68.7%
associate-/r/68.7%
associate-*l/68.7%
*-lft-identity68.7%
distribute-rgt-in68.7%
*-lft-identity68.7%
Simplified68.7%
flip--68.8%
div-inv68.8%
add-sqr-sqrt69.6%
+-commutative69.6%
add-sqr-sqrt70.1%
associate--l+70.1%
+-commutative70.1%
+-commutative70.1%
Applied egg-rr70.1%
associate-*r/70.1%
*-rgt-identity70.1%
+-commutative70.1%
Simplified70.1%
Taylor expanded in x around 0 89.8%
expm1-log1p-u86.1%
expm1-udef64.5%
+-commutative64.5%
+-commutative64.5%
add-sqr-sqrt64.5%
hypot-def64.5%
Applied egg-rr64.5%
expm1-def95.9%
expm1-log1p99.6%
associate-/r*98.7%
Simplified98.7%
Final simplification98.7%
(FPCore (x) :precision binary64 (if (<= x 100000000.0) (- (pow x -0.5) (pow (+ 1.0 x) -0.5)) (* 0.5 (sqrt (/ 1.0 (pow x 3.0))))))
double code(double x) {
double tmp;
if (x <= 100000000.0) {
tmp = pow(x, -0.5) - pow((1.0 + x), -0.5);
} else {
tmp = 0.5 * sqrt((1.0 / pow(x, 3.0)));
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= 100000000.0d0) then
tmp = (x ** (-0.5d0)) - ((1.0d0 + x) ** (-0.5d0))
else
tmp = 0.5d0 * sqrt((1.0d0 / (x ** 3.0d0)))
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= 100000000.0) {
tmp = Math.pow(x, -0.5) - Math.pow((1.0 + x), -0.5);
} else {
tmp = 0.5 * Math.sqrt((1.0 / Math.pow(x, 3.0)));
}
return tmp;
}
def code(x): tmp = 0 if x <= 100000000.0: tmp = math.pow(x, -0.5) - math.pow((1.0 + x), -0.5) else: tmp = 0.5 * math.sqrt((1.0 / math.pow(x, 3.0))) return tmp
function code(x) tmp = 0.0 if (x <= 100000000.0) tmp = Float64((x ^ -0.5) - (Float64(1.0 + x) ^ -0.5)); else tmp = Float64(0.5 * sqrt(Float64(1.0 / (x ^ 3.0)))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 100000000.0) tmp = (x ^ -0.5) - ((1.0 + x) ^ -0.5); else tmp = 0.5 * sqrt((1.0 / (x ^ 3.0))); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 100000000.0], N[(N[Power[x, -0.5], $MachinePrecision] - N[Power[N[(1.0 + x), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 100000000:\\
\;\;\;\;{x}^{-0.5} - {\left(1 + x\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{{x}^{3}}}\\
\end{array}
\end{array}
if x < 1e8Initial program 99.4%
*-un-lft-identity99.4%
clear-num99.4%
associate-/r/99.4%
prod-diff99.4%
*-un-lft-identity99.4%
fma-neg99.4%
*-un-lft-identity99.4%
inv-pow99.4%
sqrt-pow299.9%
metadata-eval99.9%
pow1/299.9%
pow-flip99.9%
+-commutative99.9%
metadata-eval99.9%
Applied egg-rr99.9%
fma-udef99.9%
neg-mul-199.9%
rem-log-exp99.8%
log-rec99.8%
+-commutative99.8%
log-rec99.8%
rem-log-exp99.9%
sub-neg99.9%
+-inverses99.9%
+-rgt-identity99.9%
Simplified99.9%
if 1e8 < x Initial program 33.4%
*-un-lft-identity33.4%
clear-num33.4%
associate-/r/33.4%
prod-diff33.4%
*-un-lft-identity33.4%
fma-neg33.4%
*-un-lft-identity33.4%
inv-pow33.4%
sqrt-pow224.3%
metadata-eval24.3%
pow1/224.3%
pow-flip33.5%
+-commutative33.5%
metadata-eval33.5%
Applied egg-rr33.5%
fma-udef33.5%
neg-mul-133.5%
rem-log-exp5.5%
log-rec5.7%
+-commutative5.7%
log-rec5.5%
rem-log-exp33.5%
sub-neg33.5%
+-inverses33.5%
+-rgt-identity33.5%
Simplified33.5%
Taylor expanded in x around inf 62.2%
Final simplification82.4%
(FPCore (x) :precision binary64 (if (<= x 1.0) (+ (+ (pow x -0.5) (* x 0.5)) -1.0) (* 0.5 (sqrt (/ 1.0 (pow x 3.0))))))
double code(double x) {
double tmp;
if (x <= 1.0) {
tmp = (pow(x, -0.5) + (x * 0.5)) + -1.0;
} else {
tmp = 0.5 * sqrt((1.0 / pow(x, 3.0)));
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= 1.0d0) then
tmp = ((x ** (-0.5d0)) + (x * 0.5d0)) + (-1.0d0)
else
tmp = 0.5d0 * sqrt((1.0d0 / (x ** 3.0d0)))
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= 1.0) {
tmp = (Math.pow(x, -0.5) + (x * 0.5)) + -1.0;
} else {
tmp = 0.5 * Math.sqrt((1.0 / Math.pow(x, 3.0)));
}
return tmp;
}
def code(x): tmp = 0 if x <= 1.0: tmp = (math.pow(x, -0.5) + (x * 0.5)) + -1.0 else: tmp = 0.5 * math.sqrt((1.0 / math.pow(x, 3.0))) return tmp
function code(x) tmp = 0.0 if (x <= 1.0) tmp = Float64(Float64((x ^ -0.5) + Float64(x * 0.5)) + -1.0); else tmp = Float64(0.5 * sqrt(Float64(1.0 / (x ^ 3.0)))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 1.0) tmp = ((x ^ -0.5) + (x * 0.5)) + -1.0; else tmp = 0.5 * sqrt((1.0 / (x ^ 3.0))); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 1.0], N[(N[(N[Power[x, -0.5], $MachinePrecision] + N[(x * 0.5), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision], N[(0.5 * N[Sqrt[N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1:\\
\;\;\;\;\left({x}^{-0.5} + x \cdot 0.5\right) + -1\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{{x}^{3}}}\\
\end{array}
\end{array}
if x < 1Initial program 99.6%
*-un-lft-identity99.6%
clear-num99.6%
associate-/r/99.6%
prod-diff99.6%
*-un-lft-identity99.6%
fma-neg99.6%
*-un-lft-identity99.6%
inv-pow99.6%
sqrt-pow2100.0%
metadata-eval100.0%
pow1/2100.0%
pow-flip100.0%
+-commutative100.0%
metadata-eval100.0%
Applied egg-rr100.0%
fma-udef100.0%
neg-mul-1100.0%
rem-log-exp100.0%
log-rec100.0%
+-commutative100.0%
log-rec100.0%
rem-log-exp100.0%
sub-neg100.0%
+-inverses100.0%
+-rgt-identity100.0%
Simplified100.0%
Taylor expanded in x around 0 99.1%
if 1 < x Initial program 34.3%
*-un-lft-identity34.3%
clear-num34.3%
associate-/r/34.3%
prod-diff34.3%
*-un-lft-identity34.3%
fma-neg34.3%
*-un-lft-identity34.3%
inv-pow34.3%
sqrt-pow225.5%
metadata-eval25.5%
pow1/225.5%
pow-flip34.5%
+-commutative34.5%
metadata-eval34.5%
Applied egg-rr34.5%
fma-udef34.5%
neg-mul-134.5%
rem-log-exp6.9%
log-rec7.0%
+-commutative7.0%
log-rec6.9%
rem-log-exp34.5%
sub-neg34.5%
+-inverses34.5%
+-rgt-identity34.5%
Simplified34.5%
Taylor expanded in x around inf 61.7%
Final simplification81.4%
(FPCore (x) :precision binary64 (if (<= x 8.2e+122) (+ (/ 1.0 (sqrt x)) (/ -1.0 (+ 1.0 (* x 0.5)))) (* 0.0 (sqrt (/ 1.0 x)))))
double code(double x) {
double tmp;
if (x <= 8.2e+122) {
tmp = (1.0 / sqrt(x)) + (-1.0 / (1.0 + (x * 0.5)));
} else {
tmp = 0.0 * sqrt((1.0 / x));
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= 8.2d+122) then
tmp = (1.0d0 / sqrt(x)) + ((-1.0d0) / (1.0d0 + (x * 0.5d0)))
else
tmp = 0.0d0 * sqrt((1.0d0 / x))
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= 8.2e+122) {
tmp = (1.0 / Math.sqrt(x)) + (-1.0 / (1.0 + (x * 0.5)));
} else {
tmp = 0.0 * Math.sqrt((1.0 / x));
}
return tmp;
}
def code(x): tmp = 0 if x <= 8.2e+122: tmp = (1.0 / math.sqrt(x)) + (-1.0 / (1.0 + (x * 0.5))) else: tmp = 0.0 * math.sqrt((1.0 / x)) return tmp
function code(x) tmp = 0.0 if (x <= 8.2e+122) tmp = Float64(Float64(1.0 / sqrt(x)) + Float64(-1.0 / Float64(1.0 + Float64(x * 0.5)))); else tmp = Float64(0.0 * sqrt(Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 8.2e+122) tmp = (1.0 / sqrt(x)) + (-1.0 / (1.0 + (x * 0.5))); else tmp = 0.0 * sqrt((1.0 / x)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 8.2e+122], N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.2 \cdot 10^{+122}:\\
\;\;\;\;\frac{1}{\sqrt{x}} + \frac{-1}{1 + x \cdot 0.5}\\
\mathbf{else}:\\
\;\;\;\;0 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 8.2000000000000004e122Initial program 75.8%
Taylor expanded in x around 0 74.4%
*-commutative74.4%
Simplified74.4%
if 8.2000000000000004e122 < x Initial program 50.5%
sub-neg50.5%
+-commutative50.5%
add-sqr-sqrt31.5%
distribute-rgt-neg-in31.5%
fma-def4.4%
inv-pow4.4%
sqrt-pow24.4%
+-commutative4.4%
metadata-eval4.4%
inv-pow4.4%
sqrt-pow24.4%
+-commutative4.4%
metadata-eval4.4%
pow1/24.4%
pow-flip4.4%
metadata-eval4.4%
Applied egg-rr4.4%
Taylor expanded in x around inf 50.5%
unpow1/250.5%
distribute-lft1-in50.5%
metadata-eval50.5%
Simplified50.5%
Final simplification67.7%
(FPCore (x) :precision binary64 (if (<= x 8.2e+76) (+ (+ (pow x -0.5) (* x 0.5)) -1.0) (* 0.0 (sqrt (/ 1.0 x)))))
double code(double x) {
double tmp;
if (x <= 8.2e+76) {
tmp = (pow(x, -0.5) + (x * 0.5)) + -1.0;
} else {
tmp = 0.0 * sqrt((1.0 / x));
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= 8.2d+76) then
tmp = ((x ** (-0.5d0)) + (x * 0.5d0)) + (-1.0d0)
else
tmp = 0.0d0 * sqrt((1.0d0 / x))
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= 8.2e+76) {
tmp = (Math.pow(x, -0.5) + (x * 0.5)) + -1.0;
} else {
tmp = 0.0 * Math.sqrt((1.0 / x));
}
return tmp;
}
def code(x): tmp = 0 if x <= 8.2e+76: tmp = (math.pow(x, -0.5) + (x * 0.5)) + -1.0 else: tmp = 0.0 * math.sqrt((1.0 / x)) return tmp
function code(x) tmp = 0.0 if (x <= 8.2e+76) tmp = Float64(Float64((x ^ -0.5) + Float64(x * 0.5)) + -1.0); else tmp = Float64(0.0 * sqrt(Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 8.2e+76) tmp = ((x ^ -0.5) + (x * 0.5)) + -1.0; else tmp = 0.0 * sqrt((1.0 / x)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 8.2e+76], N[(N[(N[Power[x, -0.5], $MachinePrecision] + N[(x * 0.5), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision], N[(0.0 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.2 \cdot 10^{+76}:\\
\;\;\;\;\left({x}^{-0.5} + x \cdot 0.5\right) + -1\\
\mathbf{else}:\\
\;\;\;\;0 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 8.1999999999999997e76Initial program 83.6%
*-un-lft-identity83.6%
clear-num83.6%
associate-/r/83.6%
prod-diff83.6%
*-un-lft-identity83.6%
fma-neg83.6%
*-un-lft-identity83.6%
inv-pow83.6%
sqrt-pow284.0%
metadata-eval84.0%
pow1/284.0%
pow-flip84.0%
+-commutative84.0%
metadata-eval84.0%
Applied egg-rr84.0%
fma-udef84.0%
neg-mul-184.0%
rem-log-exp83.8%
log-rec83.9%
+-commutative83.9%
log-rec83.8%
rem-log-exp84.0%
sub-neg84.0%
+-inverses84.0%
+-rgt-identity84.0%
Simplified84.0%
Taylor expanded in x around 0 81.8%
if 8.1999999999999997e76 < x Initial program 41.4%
sub-neg41.4%
+-commutative41.4%
add-sqr-sqrt25.9%
distribute-rgt-neg-in25.9%
fma-def4.3%
inv-pow4.3%
sqrt-pow24.2%
+-commutative4.2%
metadata-eval4.2%
inv-pow4.2%
sqrt-pow24.2%
+-commutative4.2%
metadata-eval4.2%
pow1/24.2%
pow-flip4.3%
metadata-eval4.3%
Applied egg-rr4.3%
Taylor expanded in x around inf 41.4%
unpow1/241.4%
distribute-lft1-in41.4%
metadata-eval41.4%
Simplified41.4%
Final simplification67.6%
(FPCore (x) :precision binary64 (if (<= x 1.0) (+ (pow x -0.5) -1.0) (* 0.0 (sqrt (/ 1.0 x)))))
double code(double x) {
double tmp;
if (x <= 1.0) {
tmp = pow(x, -0.5) + -1.0;
} else {
tmp = 0.0 * sqrt((1.0 / x));
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= 1.0d0) then
tmp = (x ** (-0.5d0)) + (-1.0d0)
else
tmp = 0.0d0 * sqrt((1.0d0 / x))
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= 1.0) {
tmp = Math.pow(x, -0.5) + -1.0;
} else {
tmp = 0.0 * Math.sqrt((1.0 / x));
}
return tmp;
}
def code(x): tmp = 0 if x <= 1.0: tmp = math.pow(x, -0.5) + -1.0 else: tmp = 0.0 * math.sqrt((1.0 / x)) return tmp
function code(x) tmp = 0.0 if (x <= 1.0) tmp = Float64((x ^ -0.5) + -1.0); else tmp = Float64(0.0 * sqrt(Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 1.0) tmp = (x ^ -0.5) + -1.0; else tmp = 0.0 * sqrt((1.0 / x)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 1.0], N[(N[Power[x, -0.5], $MachinePrecision] + -1.0), $MachinePrecision], N[(0.0 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1:\\
\;\;\;\;{x}^{-0.5} + -1\\
\mathbf{else}:\\
\;\;\;\;0 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 1Initial program 99.6%
*-un-lft-identity99.6%
clear-num99.6%
associate-/r/99.6%
prod-diff99.6%
*-un-lft-identity99.6%
fma-neg99.6%
*-un-lft-identity99.6%
inv-pow99.6%
sqrt-pow2100.0%
metadata-eval100.0%
pow1/2100.0%
pow-flip100.0%
+-commutative100.0%
metadata-eval100.0%
Applied egg-rr100.0%
fma-udef100.0%
neg-mul-1100.0%
rem-log-exp100.0%
log-rec100.0%
+-commutative100.0%
log-rec100.0%
rem-log-exp100.0%
sub-neg100.0%
+-inverses100.0%
+-rgt-identity100.0%
Simplified100.0%
Taylor expanded in x around 0 98.5%
if 1 < x Initial program 34.3%
sub-neg34.3%
+-commutative34.3%
add-sqr-sqrt22.8%
distribute-rgt-neg-in22.8%
fma-def7.1%
inv-pow7.1%
sqrt-pow27.1%
+-commutative7.1%
metadata-eval7.1%
inv-pow7.1%
sqrt-pow27.1%
+-commutative7.1%
metadata-eval7.1%
pow1/27.1%
pow-flip7.3%
metadata-eval7.3%
Applied egg-rr7.3%
Taylor expanded in x around inf 31.7%
unpow1/231.7%
distribute-lft1-in31.7%
metadata-eval31.7%
Simplified31.7%
Final simplification66.9%
(FPCore (x) :precision binary64 (if (<= x 4.6e+153) (/ 1.0 (+ x (sqrt x))) (* 0.0 (sqrt (/ 1.0 x)))))
double code(double x) {
double tmp;
if (x <= 4.6e+153) {
tmp = 1.0 / (x + sqrt(x));
} else {
tmp = 0.0 * sqrt((1.0 / x));
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= 4.6d+153) then
tmp = 1.0d0 / (x + sqrt(x))
else
tmp = 0.0d0 * sqrt((1.0d0 / x))
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= 4.6e+153) {
tmp = 1.0 / (x + Math.sqrt(x));
} else {
tmp = 0.0 * Math.sqrt((1.0 / x));
}
return tmp;
}
def code(x): tmp = 0 if x <= 4.6e+153: tmp = 1.0 / (x + math.sqrt(x)) else: tmp = 0.0 * math.sqrt((1.0 / x)) return tmp
function code(x) tmp = 0.0 if (x <= 4.6e+153) tmp = Float64(1.0 / Float64(x + sqrt(x))); else tmp = Float64(0.0 * sqrt(Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 4.6e+153) tmp = 1.0 / (x + sqrt(x)); else tmp = 0.0 * sqrt((1.0 / x)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 4.6e+153], N[(1.0 / N[(x + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.6 \cdot 10^{+153}:\\
\;\;\;\;\frac{1}{x + \sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;0 \cdot \sqrt{\frac{1}{x}}\\
\end{array}
\end{array}
if x < 4.6000000000000003e153Initial program 71.9%
*-un-lft-identity71.9%
clear-num71.9%
associate-/r/71.9%
prod-diff71.9%
*-un-lft-identity71.9%
fma-neg71.9%
*-un-lft-identity71.9%
inv-pow71.9%
sqrt-pow272.2%
metadata-eval72.2%
pow1/272.2%
pow-flip72.3%
+-commutative72.3%
metadata-eval72.3%
Applied egg-rr72.3%
fma-udef72.3%
neg-mul-172.3%
rem-log-exp72.1%
log-rec72.2%
+-commutative72.2%
log-rec72.1%
rem-log-exp72.3%
sub-neg72.3%
+-inverses72.3%
+-rgt-identity72.3%
Simplified72.3%
flip--72.2%
div-inv72.0%
Applied egg-rr69.1%
associate-*r/69.1%
*-rgt-identity69.1%
unpow-169.1%
Simplified69.1%
Taylor expanded in x around 0 69.7%
distribute-rgt-in69.7%
*-un-lft-identity69.7%
Applied egg-rr69.7%
pow-plus70.0%
metadata-eval70.0%
unpow1/270.0%
Simplified70.0%
if 4.6000000000000003e153 < x Initial program 58.6%
sub-neg58.6%
+-commutative58.6%
add-sqr-sqrt36.2%
distribute-rgt-neg-in36.2%
fma-def4.4%
inv-pow4.4%
sqrt-pow24.4%
+-commutative4.4%
metadata-eval4.4%
inv-pow4.4%
sqrt-pow24.4%
+-commutative4.4%
metadata-eval4.4%
pow1/24.4%
pow-flip4.4%
metadata-eval4.4%
Applied egg-rr4.4%
Taylor expanded in x around inf 58.6%
unpow1/258.6%
distribute-lft1-in58.6%
metadata-eval58.6%
Simplified58.6%
Final simplification67.3%
(FPCore (x) :precision binary64 (+ (pow x -0.5) -1.0))
double code(double x) {
return pow(x, -0.5) + -1.0;
}
real(8) function code(x)
real(8), intent (in) :: x
code = (x ** (-0.5d0)) + (-1.0d0)
end function
public static double code(double x) {
return Math.pow(x, -0.5) + -1.0;
}
def code(x): return math.pow(x, -0.5) + -1.0
function code(x) return Float64((x ^ -0.5) + -1.0) end
function tmp = code(x) tmp = (x ^ -0.5) + -1.0; end
code[x_] := N[(N[Power[x, -0.5], $MachinePrecision] + -1.0), $MachinePrecision]
\begin{array}{l}
\\
{x}^{-0.5} + -1
\end{array}
Initial program 68.7%
*-un-lft-identity68.7%
clear-num68.7%
associate-/r/68.7%
prod-diff68.7%
*-un-lft-identity68.7%
fma-neg68.7%
*-un-lft-identity68.7%
inv-pow68.7%
sqrt-pow264.8%
metadata-eval64.8%
pow1/264.8%
pow-flip69.0%
+-commutative69.0%
metadata-eval69.0%
Applied egg-rr69.0%
fma-udef69.0%
neg-mul-169.0%
rem-log-exp56.0%
log-rec56.0%
+-commutative56.0%
log-rec56.0%
rem-log-exp69.0%
sub-neg69.0%
+-inverses69.0%
+-rgt-identity69.0%
Simplified69.0%
Taylor expanded in x around 0 53.1%
Final simplification53.1%
(FPCore (x) :precision binary64 (sqrt (/ 1.0 x)))
double code(double x) {
return sqrt((1.0 / x));
}
real(8) function code(x)
real(8), intent (in) :: x
code = sqrt((1.0d0 / x))
end function
public static double code(double x) {
return Math.sqrt((1.0 / x));
}
def code(x): return math.sqrt((1.0 / x))
function code(x) return sqrt(Float64(1.0 / x)) end
function tmp = code(x) tmp = sqrt((1.0 / x)); end
code[x_] := N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\frac{1}{x}}
\end{array}
Initial program 68.7%
*-un-lft-identity68.7%
clear-num68.7%
associate-/r/68.7%
prod-diff68.7%
*-un-lft-identity68.7%
fma-neg68.7%
*-un-lft-identity68.7%
inv-pow68.7%
sqrt-pow264.8%
metadata-eval64.8%
pow1/264.8%
pow-flip69.0%
+-commutative69.0%
metadata-eval69.0%
Applied egg-rr69.0%
fma-udef69.0%
neg-mul-169.0%
rem-log-exp56.0%
log-rec56.0%
+-commutative56.0%
log-rec56.0%
rem-log-exp69.0%
sub-neg69.0%
+-inverses69.0%
+-rgt-identity69.0%
Simplified69.0%
flip--68.9%
div-inv68.8%
Applied egg-rr53.7%
associate-*r/53.7%
*-rgt-identity53.7%
unpow-153.7%
Simplified53.7%
Taylor expanded in x around inf 53.0%
Final simplification53.0%
(FPCore (x) :precision binary64 -1.0)
double code(double x) {
return -1.0;
}
real(8) function code(x)
real(8), intent (in) :: x
code = -1.0d0
end function
public static double code(double x) {
return -1.0;
}
def code(x): return -1.0
function code(x) return -1.0 end
function tmp = code(x) tmp = -1.0; end
code[x_] := -1.0
\begin{array}{l}
\\
-1
\end{array}
Initial program 68.7%
Taylor expanded in x around 0 52.9%
Taylor expanded in x around inf 1.9%
Final simplification1.9%
(FPCore (x) :precision binary64 (/ 1.0 (+ (* (+ x 1.0) (sqrt x)) (* x (sqrt (+ x 1.0))))))
double code(double x) {
return 1.0 / (((x + 1.0) * sqrt(x)) + (x * sqrt((x + 1.0))));
}
real(8) function code(x)
real(8), intent (in) :: x
code = 1.0d0 / (((x + 1.0d0) * sqrt(x)) + (x * sqrt((x + 1.0d0))))
end function
public static double code(double x) {
return 1.0 / (((x + 1.0) * Math.sqrt(x)) + (x * Math.sqrt((x + 1.0))));
}
def code(x): return 1.0 / (((x + 1.0) * math.sqrt(x)) + (x * math.sqrt((x + 1.0))))
function code(x) return Float64(1.0 / Float64(Float64(Float64(x + 1.0) * sqrt(x)) + Float64(x * sqrt(Float64(x + 1.0))))) end
function tmp = code(x) tmp = 1.0 / (((x + 1.0) * sqrt(x)) + (x * sqrt((x + 1.0)))); end
code[x_] := N[(1.0 / N[(N[(N[(x + 1.0), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(x * N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\left(x + 1\right) \cdot \sqrt{x} + x \cdot \sqrt{x + 1}}
\end{array}
herbie shell --seed 2023278
(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)))))