
(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
(let* ((t_0 (sqrt (+ x 1.0))))
(if (<= (- (/ 1.0 (sqrt x)) (/ 1.0 t_0)) 2e-11)
(/ (/ 1.0 (+ t_0 (sqrt x))) (+ x 0.5))
(- (pow x -0.5) (pow (+ x 1.0) -0.5)))))
double code(double x) {
double t_0 = sqrt((x + 1.0));
double tmp;
if (((1.0 / sqrt(x)) - (1.0 / t_0)) <= 2e-11) {
tmp = (1.0 / (t_0 + sqrt(x))) / (x + 0.5);
} else {
tmp = pow(x, -0.5) - pow((x + 1.0), -0.5);
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt((x + 1.0d0))
if (((1.0d0 / sqrt(x)) - (1.0d0 / t_0)) <= 2d-11) then
tmp = (1.0d0 / (t_0 + sqrt(x))) / (x + 0.5d0)
else
tmp = (x ** (-0.5d0)) - ((x + 1.0d0) ** (-0.5d0))
end if
code = tmp
end function
public static double code(double x) {
double t_0 = Math.sqrt((x + 1.0));
double tmp;
if (((1.0 / Math.sqrt(x)) - (1.0 / t_0)) <= 2e-11) {
tmp = (1.0 / (t_0 + Math.sqrt(x))) / (x + 0.5);
} else {
tmp = Math.pow(x, -0.5) - Math.pow((x + 1.0), -0.5);
}
return tmp;
}
def code(x): t_0 = math.sqrt((x + 1.0)) tmp = 0 if ((1.0 / math.sqrt(x)) - (1.0 / t_0)) <= 2e-11: tmp = (1.0 / (t_0 + math.sqrt(x))) / (x + 0.5) else: tmp = math.pow(x, -0.5) - math.pow((x + 1.0), -0.5) return tmp
function code(x) t_0 = sqrt(Float64(x + 1.0)) tmp = 0.0 if (Float64(Float64(1.0 / sqrt(x)) - Float64(1.0 / t_0)) <= 2e-11) tmp = Float64(Float64(1.0 / Float64(t_0 + sqrt(x))) / Float64(x + 0.5)); else tmp = Float64((x ^ -0.5) - (Float64(x + 1.0) ^ -0.5)); end return tmp end
function tmp_2 = code(x) t_0 = sqrt((x + 1.0)); tmp = 0.0; if (((1.0 / sqrt(x)) - (1.0 / t_0)) <= 2e-11) tmp = (1.0 / (t_0 + sqrt(x))) / (x + 0.5); else tmp = (x ^ -0.5) - ((x + 1.0) ^ -0.5); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] - N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], 2e-11], N[(N[(1.0 / N[(t$95$0 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 0.5), $MachinePrecision]), $MachinePrecision], N[(N[Power[x, -0.5], $MachinePrecision] - N[Power[N[(x + 1.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x + 1}\\
\mathbf{if}\;\frac{1}{\sqrt{x}} - \frac{1}{t_0} \leq 2 \cdot 10^{-11}:\\
\;\;\;\;\frac{\frac{1}{t_0 + \sqrt{x}}}{x + 0.5}\\
\mathbf{else}:\\
\;\;\;\;{x}^{-0.5} - {\left(x + 1\right)}^{-0.5}\\
\end{array}
\end{array}
if (-.f64 (/.f64 1 (sqrt.f64 x)) (/.f64 1 (sqrt.f64 (+.f64 x 1)))) < 1.99999999999999988e-11Initial program 45.7%
frac-sub45.7%
*-un-lft-identity45.7%
*-rgt-identity45.7%
+-commutative45.7%
sqrt-unprod45.7%
+-commutative45.7%
Applied egg-rr45.7%
flip--46.6%
div-inv46.6%
add-sqr-sqrt46.3%
add-sqr-sqrt46.9%
associate--l+87.1%
Applied egg-rr87.1%
+-inverses87.1%
metadata-eval87.1%
*-lft-identity87.1%
+-commutative87.1%
Simplified87.1%
Taylor expanded in x around inf 99.6%
+-commutative99.6%
Simplified99.6%
if 1.99999999999999988e-11 < (-.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%
pow1/299.4%
pow-flip99.8%
metadata-eval99.8%
pow1/299.8%
pow-flip99.8%
+-commutative99.8%
metadata-eval99.8%
Applied egg-rr99.8%
associate-+l-99.8%
expm1-log1p99.7%
expm1-def99.7%
associate--l-99.7%
fma-udef99.7%
distribute-lft1-in99.7%
metadata-eval99.7%
mul0-lft99.7%
metadata-eval99.7%
expm1-def99.7%
expm1-log1p99.8%
Simplified99.8%
Final simplification99.7%
(FPCore (x)
:precision binary64
(let* ((t_0 (sqrt (+ x 1.0))))
(if (<= (- (/ 1.0 (sqrt x)) (/ 1.0 t_0)) 5e-18)
(/ (/ 1.0 (+ t_0 (sqrt x))) x)
(- (pow x -0.5) (pow (+ x 1.0) -0.5)))))
double code(double x) {
double t_0 = sqrt((x + 1.0));
double tmp;
if (((1.0 / sqrt(x)) - (1.0 / t_0)) <= 5e-18) {
tmp = (1.0 / (t_0 + sqrt(x))) / x;
} else {
tmp = pow(x, -0.5) - pow((x + 1.0), -0.5);
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt((x + 1.0d0))
if (((1.0d0 / sqrt(x)) - (1.0d0 / t_0)) <= 5d-18) then
tmp = (1.0d0 / (t_0 + sqrt(x))) / x
else
tmp = (x ** (-0.5d0)) - ((x + 1.0d0) ** (-0.5d0))
end if
code = tmp
end function
public static double code(double x) {
double t_0 = Math.sqrt((x + 1.0));
double tmp;
if (((1.0 / Math.sqrt(x)) - (1.0 / t_0)) <= 5e-18) {
tmp = (1.0 / (t_0 + Math.sqrt(x))) / x;
} else {
tmp = Math.pow(x, -0.5) - Math.pow((x + 1.0), -0.5);
}
return tmp;
}
def code(x): t_0 = math.sqrt((x + 1.0)) tmp = 0 if ((1.0 / math.sqrt(x)) - (1.0 / t_0)) <= 5e-18: tmp = (1.0 / (t_0 + math.sqrt(x))) / x else: tmp = math.pow(x, -0.5) - math.pow((x + 1.0), -0.5) return tmp
function code(x) t_0 = sqrt(Float64(x + 1.0)) tmp = 0.0 if (Float64(Float64(1.0 / sqrt(x)) - Float64(1.0 / t_0)) <= 5e-18) tmp = Float64(Float64(1.0 / Float64(t_0 + sqrt(x))) / x); else tmp = Float64((x ^ -0.5) - (Float64(x + 1.0) ^ -0.5)); end return tmp end
function tmp_2 = code(x) t_0 = sqrt((x + 1.0)); tmp = 0.0; if (((1.0 / sqrt(x)) - (1.0 / t_0)) <= 5e-18) tmp = (1.0 / (t_0 + sqrt(x))) / x; else tmp = (x ^ -0.5) - ((x + 1.0) ^ -0.5); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] - N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], 5e-18], N[(N[(1.0 / N[(t$95$0 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[Power[x, -0.5], $MachinePrecision] - N[Power[N[(x + 1.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x + 1}\\
\mathbf{if}\;\frac{1}{\sqrt{x}} - \frac{1}{t_0} \leq 5 \cdot 10^{-18}:\\
\;\;\;\;\frac{\frac{1}{t_0 + \sqrt{x}}}{x}\\
\mathbf{else}:\\
\;\;\;\;{x}^{-0.5} - {\left(x + 1\right)}^{-0.5}\\
\end{array}
\end{array}
if (-.f64 (/.f64 1 (sqrt.f64 x)) (/.f64 1 (sqrt.f64 (+.f64 x 1)))) < 5.00000000000000036e-18Initial program 45.2%
frac-sub45.2%
*-un-lft-identity45.2%
*-rgt-identity45.2%
+-commutative45.2%
sqrt-unprod45.2%
+-commutative45.2%
Applied egg-rr45.2%
flip--45.6%
div-inv45.6%
add-sqr-sqrt45.6%
add-sqr-sqrt45.6%
associate--l+86.8%
Applied egg-rr86.8%
+-inverses86.8%
metadata-eval86.8%
*-lft-identity86.8%
+-commutative86.8%
Simplified86.8%
Taylor expanded in x around inf 99.5%
if 5.00000000000000036e-18 < (-.f64 (/.f64 1 (sqrt.f64 x)) (/.f64 1 (sqrt.f64 (+.f64 x 1)))) Initial program 98.7%
*-un-lft-identity98.7%
clear-num98.7%
associate-/r/98.7%
prod-diff98.7%
*-un-lft-identity98.7%
fma-neg98.7%
*-un-lft-identity98.7%
pow1/298.7%
pow-flip99.0%
metadata-eval99.0%
pow1/299.0%
pow-flip99.0%
+-commutative99.0%
metadata-eval99.0%
Applied egg-rr99.0%
associate-+l-99.0%
expm1-log1p99.0%
expm1-def98.4%
associate--l-98.4%
fma-udef98.4%
distribute-lft1-in98.4%
metadata-eval98.4%
mul0-lft98.4%
metadata-eval98.4%
expm1-def99.0%
expm1-log1p99.0%
Simplified99.0%
Final simplification99.2%
(FPCore (x) :precision binary64 (let* ((t_0 (sqrt (+ x 1.0)))) (/ (pow x -0.5) (* t_0 (+ t_0 (sqrt x))))))
double code(double x) {
double t_0 = sqrt((x + 1.0));
return pow(x, -0.5) / (t_0 * (t_0 + sqrt(x)));
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: t_0
t_0 = sqrt((x + 1.0d0))
code = (x ** (-0.5d0)) / (t_0 * (t_0 + sqrt(x)))
end function
public static double code(double x) {
double t_0 = Math.sqrt((x + 1.0));
return Math.pow(x, -0.5) / (t_0 * (t_0 + Math.sqrt(x)));
}
def code(x): t_0 = math.sqrt((x + 1.0)) return math.pow(x, -0.5) / (t_0 * (t_0 + math.sqrt(x)))
function code(x) t_0 = sqrt(Float64(x + 1.0)) return Float64((x ^ -0.5) / Float64(t_0 * Float64(t_0 + sqrt(x)))) end
function tmp = code(x) t_0 = sqrt((x + 1.0)); tmp = (x ^ -0.5) / (t_0 * (t_0 + sqrt(x))); end
code[x_] := Block[{t$95$0 = N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]}, N[(N[Power[x, -0.5], $MachinePrecision] / N[(t$95$0 * N[(t$95$0 + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x + 1}\\
\frac{{x}^{-0.5}}{t_0 \cdot \left(t_0 + \sqrt{x}\right)}
\end{array}
\end{array}
Initial program 73.2%
frac-sub73.2%
*-un-lft-identity73.2%
*-rgt-identity73.2%
+-commutative73.2%
sqrt-unprod73.2%
+-commutative73.2%
Applied egg-rr73.2%
flip--73.6%
div-inv73.6%
add-sqr-sqrt73.5%
add-sqr-sqrt73.9%
associate--l+93.5%
Applied egg-rr93.5%
+-inverses93.5%
metadata-eval93.5%
*-lft-identity93.5%
+-commutative93.5%
Simplified93.5%
*-un-lft-identity93.5%
sqrt-prod99.4%
times-frac99.4%
pow1/299.4%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
associate-/l/99.6%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x) :precision binary64 (/ 1.0 (* (+ (sqrt (+ x 1.0)) (sqrt x)) (hypot (sqrt x) x))))
double code(double x) {
return 1.0 / ((sqrt((x + 1.0)) + sqrt(x)) * hypot(sqrt(x), x));
}
public static double code(double x) {
return 1.0 / ((Math.sqrt((x + 1.0)) + Math.sqrt(x)) * Math.hypot(Math.sqrt(x), x));
}
def code(x): return 1.0 / ((math.sqrt((x + 1.0)) + math.sqrt(x)) * math.hypot(math.sqrt(x), x))
function code(x) return Float64(1.0 / Float64(Float64(sqrt(Float64(x + 1.0)) + sqrt(x)) * hypot(sqrt(x), x))) end
function tmp = code(x) tmp = 1.0 / ((sqrt((x + 1.0)) + sqrt(x)) * hypot(sqrt(x), x)); end
code[x_] := N[(1.0 / N[(N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Sqrt[x], $MachinePrecision] ^ 2 + x ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\left(\sqrt{x + 1} + \sqrt{x}\right) \cdot \mathsf{hypot}\left(\sqrt{x}, x\right)}
\end{array}
Initial program 73.2%
frac-sub73.2%
*-un-lft-identity73.2%
*-rgt-identity73.2%
+-commutative73.2%
sqrt-unprod73.2%
+-commutative73.2%
Applied egg-rr73.2%
flip--73.6%
div-inv73.6%
add-sqr-sqrt73.5%
add-sqr-sqrt73.9%
associate--l+93.5%
Applied egg-rr93.5%
+-inverses93.5%
metadata-eval93.5%
*-lft-identity93.5%
+-commutative93.5%
Simplified93.5%
expm1-log1p-u90.1%
expm1-udef69.3%
div-inv69.3%
frac-times69.3%
metadata-eval69.3%
distribute-rgt-in69.3%
*-un-lft-identity69.3%
add-sqr-sqrt69.3%
hypot-def69.3%
Applied egg-rr69.3%
expm1-def96.1%
expm1-log1p99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (x) :precision binary64 (if (<= x 195000000.0) (- (pow x -0.5) (pow (+ x 1.0) -0.5)) (* 0.5 (sqrt (/ 1.0 (pow x 3.0))))))
double code(double x) {
double tmp;
if (x <= 195000000.0) {
tmp = pow(x, -0.5) - pow((x + 1.0), -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 <= 195000000.0d0) then
tmp = (x ** (-0.5d0)) - ((x + 1.0d0) ** (-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 <= 195000000.0) {
tmp = Math.pow(x, -0.5) - Math.pow((x + 1.0), -0.5);
} else {
tmp = 0.5 * Math.sqrt((1.0 / Math.pow(x, 3.0)));
}
return tmp;
}
def code(x): tmp = 0 if x <= 195000000.0: tmp = math.pow(x, -0.5) - math.pow((x + 1.0), -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 <= 195000000.0) tmp = Float64((x ^ -0.5) - (Float64(x + 1.0) ^ -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 <= 195000000.0) tmp = (x ^ -0.5) - ((x + 1.0) ^ -0.5); else tmp = 0.5 * sqrt((1.0 / (x ^ 3.0))); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 195000000.0], N[(N[Power[x, -0.5], $MachinePrecision] - N[Power[N[(x + 1.0), $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 195000000:\\
\;\;\;\;{x}^{-0.5} - {\left(x + 1\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{{x}^{3}}}\\
\end{array}
\end{array}
if x < 1.95e8Initial program 98.7%
*-un-lft-identity98.7%
clear-num98.7%
associate-/r/98.7%
prod-diff98.7%
*-un-lft-identity98.7%
fma-neg98.7%
*-un-lft-identity98.7%
pow1/298.7%
pow-flip99.0%
metadata-eval99.0%
pow1/299.0%
pow-flip99.0%
+-commutative99.0%
metadata-eval99.0%
Applied egg-rr99.0%
associate-+l-99.0%
expm1-log1p99.0%
expm1-def98.4%
associate--l-98.4%
fma-udef98.4%
distribute-lft1-in98.4%
metadata-eval98.4%
mul0-lft98.4%
metadata-eval98.4%
expm1-def99.0%
expm1-log1p99.0%
Simplified99.0%
if 1.95e8 < x Initial program 45.2%
*-un-lft-identity45.2%
clear-num45.2%
associate-/r/45.2%
prod-diff45.2%
*-un-lft-identity45.2%
fma-neg45.2%
*-un-lft-identity45.2%
pow1/245.2%
pow-flip37.9%
metadata-eval37.9%
pow1/237.9%
pow-flip45.2%
+-commutative45.2%
metadata-eval45.2%
Applied egg-rr45.2%
associate-+l-45.2%
expm1-log1p45.2%
expm1-def5.0%
associate--l-5.0%
fma-udef5.0%
distribute-lft1-in5.0%
metadata-eval5.0%
mul0-lft5.0%
metadata-eval5.0%
expm1-def45.2%
expm1-log1p45.2%
Simplified45.2%
Taylor expanded in x around inf 69.0%
Final simplification84.7%
(FPCore (x) :precision binary64 (if (<= x 1.0) (+ (pow x -0.5) (- -1.0 (* x -0.5))) (* 0.5 (sqrt (/ 1.0 (pow x 3.0))))))
double code(double x) {
double tmp;
if (x <= 1.0) {
tmp = pow(x, -0.5) + (-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 <= 1.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 <= 1.0) {
tmp = Math.pow(x, -0.5) + (-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 <= 1.0: tmp = math.pow(x, -0.5) + (-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 <= 1.0) tmp = Float64((x ^ -0.5) + Float64(-1.0 - Float64(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 <= 1.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, 1.0], N[(N[Power[x, -0.5], $MachinePrecision] + N[(-1.0 - N[(x * -0.5), $MachinePrecision]), $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 1:\\
\;\;\;\;{x}^{-0.5} + \left(-1 - x \cdot -0.5\right)\\
\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%
pow1/299.6%
pow-flip100.0%
metadata-eval100.0%
pow1/2100.0%
pow-flip100.0%
+-commutative100.0%
metadata-eval100.0%
Applied egg-rr100.0%
associate-+l-100.0%
expm1-log1p99.9%
expm1-def99.9%
associate--l-99.9%
fma-udef99.9%
distribute-lft1-in99.9%
metadata-eval99.9%
mul0-lft99.9%
metadata-eval99.9%
expm1-def99.9%
expm1-log1p100.0%
Simplified100.0%
Taylor expanded in x around 0 97.9%
*-commutative97.9%
Simplified97.9%
if 1 < x Initial program 46.7%
*-un-lft-identity46.7%
clear-num46.7%
associate-/r/46.7%
prod-diff46.7%
*-un-lft-identity46.7%
fma-neg46.7%
*-un-lft-identity46.7%
pow1/246.7%
pow-flip39.8%
metadata-eval39.8%
pow1/239.8%
pow-flip46.7%
+-commutative46.7%
metadata-eval46.7%
Applied egg-rr46.7%
associate-+l-46.7%
expm1-log1p46.7%
expm1-def7.9%
associate--l-7.9%
fma-udef7.9%
distribute-lft1-in7.9%
metadata-eval7.9%
mul0-lft7.9%
metadata-eval7.9%
expm1-def46.7%
expm1-log1p46.7%
Simplified46.7%
Taylor expanded in x around inf 67.8%
Final simplification82.8%
(FPCore (x) :precision binary64 (if (<= x 8.5e+122) (+ (/ 1.0 (sqrt x)) (/ -1.0 (+ 1.0 (* x 0.5)))) 0.0))
double code(double x) {
double tmp;
if (x <= 8.5e+122) {
tmp = (1.0 / sqrt(x)) + (-1.0 / (1.0 + (x * 0.5)));
} else {
tmp = 0.0;
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= 8.5d+122) then
tmp = (1.0d0 / sqrt(x)) + ((-1.0d0) / (1.0d0 + (x * 0.5d0)))
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= 8.5e+122) {
tmp = (1.0 / Math.sqrt(x)) + (-1.0 / (1.0 + (x * 0.5)));
} else {
tmp = 0.0;
}
return tmp;
}
def code(x): tmp = 0 if x <= 8.5e+122: tmp = (1.0 / math.sqrt(x)) + (-1.0 / (1.0 + (x * 0.5))) else: tmp = 0.0 return tmp
function code(x) tmp = 0.0 if (x <= 8.5e+122) tmp = Float64(Float64(1.0 / sqrt(x)) + Float64(-1.0 / Float64(1.0 + Float64(x * 0.5)))); else tmp = 0.0; end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 8.5e+122) tmp = (1.0 / sqrt(x)) + (-1.0 / (1.0 + (x * 0.5))); else tmp = 0.0; end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 8.5e+122], N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.5 \cdot 10^{+122}:\\
\;\;\;\;\frac{1}{\sqrt{x}} + \frac{-1}{1 + x \cdot 0.5}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < 8.50000000000000003e122Initial program 77.2%
Taylor expanded in x around 0 73.8%
*-commutative73.8%
Simplified73.8%
if 8.50000000000000003e122 < x Initial program 64.7%
*-un-lft-identity64.7%
clear-num64.7%
associate-/r/64.7%
prod-diff64.7%
*-un-lft-identity64.7%
fma-neg64.7%
*-un-lft-identity64.7%
pow1/264.7%
pow-flip53.8%
metadata-eval53.8%
pow1/253.8%
pow-flip64.7%
+-commutative64.7%
metadata-eval64.7%
Applied egg-rr64.7%
associate-+l-64.7%
expm1-log1p64.7%
expm1-def4.4%
associate--l-4.4%
fma-udef4.4%
distribute-lft1-in4.4%
metadata-eval4.4%
mul0-lft4.4%
metadata-eval4.4%
expm1-def64.7%
expm1-log1p64.7%
Simplified64.7%
metadata-eval64.7%
pow-flip53.8%
pow1/253.8%
sqr-pow29.4%
fma-neg4.4%
metadata-eval4.4%
metadata-eval4.4%
pow1/24.4%
pow-flip4.5%
+-commutative4.5%
metadata-eval4.5%
Applied egg-rr4.5%
Taylor expanded in x around inf 64.7%
unpow1/264.7%
+-inverses64.7%
Simplified64.7%
Final simplification70.9%
(FPCore (x) :precision binary64 (/ (/ 1.0 (* x (+ x 1.0))) (+ (pow x -0.5) 1.0)))
double code(double x) {
return (1.0 / (x * (x + 1.0))) / (pow(x, -0.5) + 1.0);
}
real(8) function code(x)
real(8), intent (in) :: x
code = (1.0d0 / (x * (x + 1.0d0))) / ((x ** (-0.5d0)) + 1.0d0)
end function
public static double code(double x) {
return (1.0 / (x * (x + 1.0))) / (Math.pow(x, -0.5) + 1.0);
}
def code(x): return (1.0 / (x * (x + 1.0))) / (math.pow(x, -0.5) + 1.0)
function code(x) return Float64(Float64(1.0 / Float64(x * Float64(x + 1.0))) / Float64((x ^ -0.5) + 1.0)) end
function tmp = code(x) tmp = (1.0 / (x * (x + 1.0))) / ((x ^ -0.5) + 1.0); end
code[x_] := N[(N[(1.0 / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[x, -0.5], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{1}{x \cdot \left(x + 1\right)}}{{x}^{-0.5} + 1}
\end{array}
Initial program 73.2%
*-un-lft-identity73.2%
clear-num73.2%
associate-/r/73.2%
prod-diff73.2%
*-un-lft-identity73.2%
fma-neg73.2%
*-un-lft-identity73.2%
pow1/273.2%
pow-flip69.9%
metadata-eval69.9%
pow1/269.9%
pow-flip73.4%
+-commutative73.4%
metadata-eval73.4%
Applied egg-rr73.4%
associate-+l-73.4%
expm1-log1p73.3%
expm1-def53.9%
associate--l-53.9%
fma-udef53.9%
distribute-lft1-in53.9%
metadata-eval53.9%
mul0-lft53.9%
metadata-eval53.9%
expm1-def73.3%
expm1-log1p73.4%
Simplified73.4%
flip--72.9%
pow-prod-up65.0%
metadata-eval65.0%
inv-pow65.0%
pow-prod-up72.6%
metadata-eval72.6%
inv-pow72.6%
+-commutative72.6%
+-commutative72.6%
Applied egg-rr72.6%
Taylor expanded in x around 0 69.3%
frac-sub69.3%
+-commutative69.3%
div-inv69.3%
*-un-lft-identity69.3%
+-commutative69.3%
*-rgt-identity69.3%
associate--l+70.0%
metadata-eval70.0%
+-commutative70.0%
frac-times70.0%
un-div-inv70.0%
+-commutative70.0%
Applied egg-rr70.0%
+-inverses70.0%
metadata-eval70.0%
*-lft-identity70.0%
associate-/l/70.0%
Simplified70.0%
Final simplification70.0%
(FPCore (x) :precision binary64 (if (<= x 8.2e+76) (+ (pow x -0.5) (- -1.0 (* x -0.5))) 0.0))
double code(double x) {
double tmp;
if (x <= 8.2e+76) {
tmp = pow(x, -0.5) + (-1.0 - (x * -0.5));
} else {
tmp = 0.0;
}
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)) + ((-1.0d0) - (x * (-0.5d0)))
else
tmp = 0.0d0
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) + (-1.0 - (x * -0.5));
} else {
tmp = 0.0;
}
return tmp;
}
def code(x): tmp = 0 if x <= 8.2e+76: tmp = math.pow(x, -0.5) + (-1.0 - (x * -0.5)) else: tmp = 0.0 return tmp
function code(x) tmp = 0.0 if (x <= 8.2e+76) tmp = Float64((x ^ -0.5) + Float64(-1.0 - Float64(x * -0.5))); else tmp = 0.0; end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 8.2e+76) tmp = (x ^ -0.5) + (-1.0 - (x * -0.5)); else tmp = 0.0; end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 8.2e+76], N[(N[Power[x, -0.5], $MachinePrecision] + N[(-1.0 - N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.2 \cdot 10^{+76}:\\
\;\;\;\;{x}^{-0.5} + \left(-1 - x \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < 8.1999999999999997e76Initial program 86.1%
*-un-lft-identity86.1%
clear-num86.1%
associate-/r/86.1%
prod-diff86.1%
*-un-lft-identity86.1%
fma-neg86.1%
*-un-lft-identity86.1%
pow1/286.1%
pow-flip86.4%
metadata-eval86.4%
pow1/286.4%
pow-flip86.4%
+-commutative86.4%
metadata-eval86.4%
Applied egg-rr86.4%
associate-+l-86.4%
expm1-log1p86.3%
expm1-def86.0%
associate--l-86.0%
fma-udef86.0%
distribute-lft1-in86.0%
metadata-eval86.0%
mul0-lft86.0%
metadata-eval86.0%
expm1-def86.3%
expm1-log1p86.4%
Simplified86.4%
Taylor expanded in x around 0 82.0%
*-commutative82.0%
Simplified82.0%
if 8.1999999999999997e76 < x Initial program 53.4%
*-un-lft-identity53.4%
clear-num53.4%
associate-/r/53.4%
prod-diff53.4%
*-un-lft-identity53.4%
fma-neg53.4%
*-un-lft-identity53.4%
pow1/253.4%
pow-flip44.6%
metadata-eval44.6%
pow1/244.6%
pow-flip53.4%
+-commutative53.4%
metadata-eval53.4%
Applied egg-rr53.4%
associate-+l-53.4%
expm1-log1p53.4%
expm1-def4.7%
associate--l-4.7%
fma-udef4.7%
distribute-lft1-in4.7%
metadata-eval4.7%
mul0-lft4.7%
metadata-eval4.7%
expm1-def53.4%
expm1-log1p53.4%
Simplified53.4%
metadata-eval53.4%
pow-flip44.6%
pow1/244.6%
sqr-pow24.7%
fma-neg4.5%
metadata-eval4.5%
metadata-eval4.5%
pow1/24.5%
pow-flip4.5%
+-commutative4.5%
metadata-eval4.5%
Applied egg-rr4.5%
Taylor expanded in x around inf 53.4%
unpow1/253.4%
+-inverses53.4%
Simplified53.4%
Final simplification70.7%
(FPCore (x) :precision binary64 (if (<= x 4.6e+153) (/ 1.0 (+ x (sqrt x))) 0.0))
double code(double x) {
double tmp;
if (x <= 4.6e+153) {
tmp = 1.0 / (x + sqrt(x));
} else {
tmp = 0.0;
}
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
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;
}
return tmp;
}
def code(x): tmp = 0 if x <= 4.6e+153: tmp = 1.0 / (x + math.sqrt(x)) else: tmp = 0.0 return tmp
function code(x) tmp = 0.0 if (x <= 4.6e+153) tmp = Float64(1.0 / Float64(x + sqrt(x))); else tmp = 0.0; 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; end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 4.6e+153], N[(1.0 / N[(x + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.6 \cdot 10^{+153}:\\
\;\;\;\;\frac{1}{x + \sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < 4.6000000000000003e153Initial program 71.8%
*-un-lft-identity71.8%
clear-num71.8%
associate-/r/71.8%
prod-diff71.8%
*-un-lft-identity71.8%
fma-neg71.8%
*-un-lft-identity71.8%
pow1/271.8%
pow-flip72.1%
metadata-eval72.1%
pow1/272.1%
pow-flip72.1%
+-commutative72.1%
metadata-eval72.1%
Applied egg-rr72.1%
associate-+l-72.1%
expm1-log1p72.0%
expm1-def71.9%
associate--l-71.9%
fma-udef71.9%
distribute-lft1-in71.9%
metadata-eval71.9%
mul0-lft71.9%
metadata-eval71.9%
expm1-def72.0%
expm1-log1p72.1%
Simplified72.1%
flip--71.5%
pow-prod-up71.0%
metadata-eval71.0%
inv-pow71.0%
pow-prod-up71.0%
metadata-eval71.0%
inv-pow71.0%
+-commutative71.0%
+-commutative71.0%
Applied egg-rr71.0%
Taylor expanded in x around 0 67.2%
+-commutative67.2%
distribute-lft-in67.2%
pow167.2%
pow-prod-up67.5%
metadata-eval67.5%
pow1/267.5%
*-rgt-identity67.5%
Applied egg-rr67.5%
if 4.6000000000000003e153 < x Initial program 76.9%
*-un-lft-identity76.9%
clear-num76.9%
associate-/r/76.9%
prod-diff76.9%
*-un-lft-identity76.9%
fma-neg76.9%
*-un-lft-identity76.9%
pow1/276.9%
pow-flip63.8%
metadata-eval63.8%
pow1/263.8%
pow-flip76.9%
+-commutative76.9%
metadata-eval76.9%
Applied egg-rr76.9%
associate-+l-76.9%
expm1-log1p76.9%
expm1-def4.3%
associate--l-4.3%
fma-udef4.3%
distribute-lft1-in4.3%
metadata-eval4.3%
mul0-lft4.3%
metadata-eval4.3%
expm1-def76.9%
expm1-log1p76.9%
Simplified76.9%
metadata-eval76.9%
pow-flip63.8%
pow1/263.8%
sqr-pow34.3%
fma-neg4.5%
metadata-eval4.5%
metadata-eval4.5%
pow1/24.5%
pow-flip4.4%
+-commutative4.4%
metadata-eval4.4%
Applied egg-rr4.4%
Taylor expanded in x around inf 76.9%
unpow1/276.9%
+-inverses76.9%
Simplified76.9%
Final simplification70.0%
(FPCore (x) :precision binary64 (if (<= x 1.0) (+ (pow x -0.5) -1.0) 0.0))
double code(double x) {
double tmp;
if (x <= 1.0) {
tmp = pow(x, -0.5) + -1.0;
} else {
tmp = 0.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)) + (-1.0d0)
else
tmp = 0.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) + -1.0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x): tmp = 0 if x <= 1.0: tmp = math.pow(x, -0.5) + -1.0 else: tmp = 0.0 return tmp
function code(x) tmp = 0.0 if (x <= 1.0) tmp = Float64((x ^ -0.5) + -1.0); else tmp = 0.0; 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; end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 1.0], N[(N[Power[x, -0.5], $MachinePrecision] + -1.0), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1:\\
\;\;\;\;{x}^{-0.5} + -1\\
\mathbf{else}:\\
\;\;\;\;0\\
\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%
pow1/299.6%
pow-flip100.0%
metadata-eval100.0%
pow1/2100.0%
pow-flip100.0%
+-commutative100.0%
metadata-eval100.0%
Applied egg-rr100.0%
associate-+l-100.0%
expm1-log1p99.9%
expm1-def99.9%
associate--l-99.9%
fma-udef99.9%
distribute-lft1-in99.9%
metadata-eval99.9%
mul0-lft99.9%
metadata-eval99.9%
expm1-def99.9%
expm1-log1p100.0%
Simplified100.0%
Taylor expanded in x around 0 96.6%
if 1 < x Initial program 46.7%
*-un-lft-identity46.7%
clear-num46.7%
associate-/r/46.7%
prod-diff46.7%
*-un-lft-identity46.7%
fma-neg46.7%
*-un-lft-identity46.7%
pow1/246.7%
pow-flip39.8%
metadata-eval39.8%
pow1/239.8%
pow-flip46.7%
+-commutative46.7%
metadata-eval46.7%
Applied egg-rr46.7%
associate-+l-46.7%
expm1-log1p46.7%
expm1-def7.9%
associate--l-7.9%
fma-udef7.9%
distribute-lft1-in7.9%
metadata-eval7.9%
mul0-lft7.9%
metadata-eval7.9%
expm1-def46.7%
expm1-log1p46.7%
Simplified46.7%
metadata-eval46.7%
pow-flip39.8%
pow1/239.8%
sqr-pow24.2%
fma-neg8.3%
metadata-eval8.3%
metadata-eval8.3%
pow1/28.3%
pow-flip8.3%
+-commutative8.3%
metadata-eval8.3%
Applied egg-rr8.3%
Taylor expanded in x around inf 42.9%
unpow1/242.9%
+-inverses42.9%
Simplified42.9%
Final simplification69.8%
(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 73.2%
Taylor expanded in x around 0 49.5%
Taylor expanded in x around inf 2.0%
Final simplification2.0%
(FPCore (x) :precision binary64 0.0)
double code(double x) {
return 0.0;
}
real(8) function code(x)
real(8), intent (in) :: x
code = 0.0d0
end function
public static double code(double x) {
return 0.0;
}
def code(x): return 0.0
function code(x) return 0.0 end
function tmp = code(x) tmp = 0.0; end
code[x_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 73.2%
*-un-lft-identity73.2%
clear-num73.2%
associate-/r/73.2%
prod-diff73.2%
*-un-lft-identity73.2%
fma-neg73.2%
*-un-lft-identity73.2%
pow1/273.2%
pow-flip69.9%
metadata-eval69.9%
pow1/269.9%
pow-flip73.4%
+-commutative73.4%
metadata-eval73.4%
Applied egg-rr73.4%
associate-+l-73.4%
expm1-log1p73.3%
expm1-def53.9%
associate--l-53.9%
fma-udef53.9%
distribute-lft1-in53.9%
metadata-eval53.9%
mul0-lft53.9%
metadata-eval53.9%
expm1-def73.3%
expm1-log1p73.4%
Simplified73.4%
metadata-eval73.4%
pow-flip69.9%
pow1/269.9%
sqr-pow61.7%
fma-neg53.7%
metadata-eval53.7%
metadata-eval53.7%
pow1/253.7%
pow-flip53.7%
+-commutative53.7%
metadata-eval53.7%
Applied egg-rr53.7%
Taylor expanded in x around inf 22.8%
unpow1/222.8%
+-inverses22.8%
Simplified22.8%
Final simplification22.8%
(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 2023310
(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)))))