
(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 (pow (+ 1.0 x) -0.5)))
(if (<= (- (/ 1.0 (sqrt x)) (/ 1.0 (sqrt (+ 1.0 x)))) 4e-13)
(/ (/ 1.0 (* x x)) (+ (pow x -0.5) t_0))
(- (pow x -0.5) t_0))))
double code(double x) {
double t_0 = pow((1.0 + x), -0.5);
double tmp;
if (((1.0 / sqrt(x)) - (1.0 / sqrt((1.0 + x)))) <= 4e-13) {
tmp = (1.0 / (x * x)) / (pow(x, -0.5) + t_0);
} else {
tmp = pow(x, -0.5) - t_0;
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 + x) ** (-0.5d0)
if (((1.0d0 / sqrt(x)) - (1.0d0 / sqrt((1.0d0 + x)))) <= 4d-13) then
tmp = (1.0d0 / (x * x)) / ((x ** (-0.5d0)) + t_0)
else
tmp = (x ** (-0.5d0)) - t_0
end if
code = tmp
end function
public static double code(double x) {
double t_0 = Math.pow((1.0 + x), -0.5);
double tmp;
if (((1.0 / Math.sqrt(x)) - (1.0 / Math.sqrt((1.0 + x)))) <= 4e-13) {
tmp = (1.0 / (x * x)) / (Math.pow(x, -0.5) + t_0);
} else {
tmp = Math.pow(x, -0.5) - t_0;
}
return tmp;
}
def code(x): t_0 = math.pow((1.0 + x), -0.5) tmp = 0 if ((1.0 / math.sqrt(x)) - (1.0 / math.sqrt((1.0 + x)))) <= 4e-13: tmp = (1.0 / (x * x)) / (math.pow(x, -0.5) + t_0) else: tmp = math.pow(x, -0.5) - t_0 return tmp
function code(x) t_0 = Float64(1.0 + x) ^ -0.5 tmp = 0.0 if (Float64(Float64(1.0 / sqrt(x)) - Float64(1.0 / sqrt(Float64(1.0 + x)))) <= 4e-13) tmp = Float64(Float64(1.0 / Float64(x * x)) / Float64((x ^ -0.5) + t_0)); else tmp = Float64((x ^ -0.5) - t_0); end return tmp end
function tmp_2 = code(x) t_0 = (1.0 + x) ^ -0.5; tmp = 0.0; if (((1.0 / sqrt(x)) - (1.0 / sqrt((1.0 + x)))) <= 4e-13) tmp = (1.0 / (x * x)) / ((x ^ -0.5) + t_0); else tmp = (x ^ -0.5) - t_0; end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[Power[N[(1.0 + x), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] - N[(1.0 / N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 4e-13], N[(N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] / N[(N[Power[x, -0.5], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[Power[x, -0.5], $MachinePrecision] - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(1 + x\right)}^{-0.5}\\
\mathbf{if}\;\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{1 + x}} \leq 4 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{1}{x \cdot x}}{{x}^{-0.5} + t_0}\\
\mathbf{else}:\\
\;\;\;\;{x}^{-0.5} - t_0\\
\end{array}
\end{array}
if (-.f64 (/.f64 1 (sqrt.f64 x)) (/.f64 1 (sqrt.f64 (+.f64 x 1)))) < 4.0000000000000001e-13Initial program 37.7%
*-un-lft-identity37.7%
clear-num37.7%
associate-/r/37.7%
prod-diff37.7%
*-un-lft-identity37.7%
fma-neg37.7%
*-un-lft-identity37.7%
inv-pow37.6%
sqrt-pow232.9%
metadata-eval32.9%
pow1/232.9%
pow-flip37.7%
+-commutative37.7%
metadata-eval37.7%
Applied egg-rr37.7%
fma-udef37.7%
neg-mul-137.7%
rem-log-exp5.6%
log-rec5.7%
+-commutative5.7%
log-rec5.6%
rem-log-exp37.7%
sub-neg37.7%
+-inverses37.7%
+-rgt-identity37.7%
Simplified37.7%
flip--37.7%
+-commutative37.7%
+-commutative37.7%
+-commutative37.7%
Applied egg-rr37.7%
pow-sqr20.0%
metadata-eval20.0%
unpow-120.0%
pow-sqr37.8%
metadata-eval37.8%
unpow-137.8%
Simplified37.8%
Taylor expanded in x around inf 86.7%
unpow286.7%
Simplified86.7%
if 4.0000000000000001e-13 < (-.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 simplification93.8%
(FPCore (x) :precision binary64 (if (<= (- (/ 1.0 (sqrt x)) (/ 1.0 (sqrt (+ 1.0 x)))) 4e-13) (* 0.5 (sqrt (/ 1.0 (pow x 3.0)))) (- (pow x -0.5) (pow (+ 1.0 x) -0.5))))
double code(double x) {
double tmp;
if (((1.0 / sqrt(x)) - (1.0 / sqrt((1.0 + x)))) <= 4e-13) {
tmp = 0.5 * sqrt((1.0 / pow(x, 3.0)));
} 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) :: tmp
if (((1.0d0 / sqrt(x)) - (1.0d0 / sqrt((1.0d0 + x)))) <= 4d-13) then
tmp = 0.5d0 * sqrt((1.0d0 / (x ** 3.0d0)))
else
tmp = (x ** (-0.5d0)) - ((1.0d0 + x) ** (-0.5d0))
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (((1.0 / Math.sqrt(x)) - (1.0 / Math.sqrt((1.0 + x)))) <= 4e-13) {
tmp = 0.5 * Math.sqrt((1.0 / Math.pow(x, 3.0)));
} else {
tmp = Math.pow(x, -0.5) - Math.pow((1.0 + x), -0.5);
}
return tmp;
}
def code(x): tmp = 0 if ((1.0 / math.sqrt(x)) - (1.0 / math.sqrt((1.0 + x)))) <= 4e-13: tmp = 0.5 * math.sqrt((1.0 / math.pow(x, 3.0))) else: tmp = math.pow(x, -0.5) - math.pow((1.0 + x), -0.5) return tmp
function code(x) tmp = 0.0 if (Float64(Float64(1.0 / sqrt(x)) - Float64(1.0 / sqrt(Float64(1.0 + x)))) <= 4e-13) tmp = Float64(0.5 * sqrt(Float64(1.0 / (x ^ 3.0)))); else tmp = Float64((x ^ -0.5) - (Float64(1.0 + x) ^ -0.5)); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (((1.0 / sqrt(x)) - (1.0 / sqrt((1.0 + x)))) <= 4e-13) tmp = 0.5 * sqrt((1.0 / (x ^ 3.0))); else tmp = (x ^ -0.5) - ((1.0 + x) ^ -0.5); end tmp_2 = tmp; end
code[x_] := If[LessEqual[N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] - N[(1.0 / N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 4e-13], N[(0.5 * N[Sqrt[N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]], $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}
\mathbf{if}\;\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{1 + x}} \leq 4 \cdot 10^{-13}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{{x}^{3}}}\\
\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)))) < 4.0000000000000001e-13Initial program 37.7%
*-un-lft-identity37.7%
clear-num37.7%
associate-/r/37.7%
prod-diff37.7%
*-un-lft-identity37.7%
fma-neg37.7%
*-un-lft-identity37.7%
inv-pow37.6%
sqrt-pow232.9%
metadata-eval32.9%
pow1/232.9%
pow-flip37.7%
+-commutative37.7%
metadata-eval37.7%
Applied egg-rr37.7%
fma-udef37.7%
neg-mul-137.7%
rem-log-exp5.6%
log-rec5.7%
+-commutative5.7%
log-rec5.6%
rem-log-exp37.7%
sub-neg37.7%
+-inverses37.7%
+-rgt-identity37.7%
Simplified37.7%
Taylor expanded in x around inf 69.9%
if 4.0000000000000001e-13 < (-.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 simplification86.1%
(FPCore (x) :precision binary64 (/ (/ 1.0 (* x (+ 1.0 x))) (+ (pow x -0.5) (pow (+ 1.0 x) -0.5))))
double code(double x) {
return (1.0 / (x * (1.0 + x))) / (pow(x, -0.5) + pow((1.0 + x), -0.5));
}
real(8) function code(x)
real(8), intent (in) :: x
code = (1.0d0 / (x * (1.0d0 + x))) / ((x ** (-0.5d0)) + ((1.0d0 + x) ** (-0.5d0)))
end function
public static double code(double x) {
return (1.0 / (x * (1.0 + x))) / (Math.pow(x, -0.5) + Math.pow((1.0 + x), -0.5));
}
def code(x): return (1.0 / (x * (1.0 + x))) / (math.pow(x, -0.5) + math.pow((1.0 + x), -0.5))
function code(x) return Float64(Float64(1.0 / Float64(x * Float64(1.0 + x))) / Float64((x ^ -0.5) + (Float64(1.0 + x) ^ -0.5))) end
function tmp = code(x) tmp = (1.0 / (x * (1.0 + x))) / ((x ^ -0.5) + ((1.0 + x) ^ -0.5)); end
code[x_] := N[(N[(1.0 / N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[x, -0.5], $MachinePrecision] + N[Power[N[(1.0 + x), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{1}{x \cdot \left(1 + x\right)}}{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}
\end{array}
Initial program 71.2%
*-un-lft-identity71.2%
clear-num71.2%
associate-/r/71.2%
prod-diff71.2%
*-un-lft-identity71.2%
fma-neg71.2%
*-un-lft-identity71.2%
inv-pow71.2%
sqrt-pow269.2%
metadata-eval69.2%
pow1/269.2%
pow-flip71.5%
+-commutative71.5%
metadata-eval71.5%
Applied egg-rr71.5%
fma-udef71.5%
neg-mul-171.5%
rem-log-exp56.8%
log-rec56.8%
+-commutative56.8%
log-rec56.8%
rem-log-exp71.5%
sub-neg71.5%
+-inverses71.5%
+-rgt-identity71.5%
Simplified71.5%
flip--71.4%
+-commutative71.4%
+-commutative71.4%
+-commutative71.4%
Applied egg-rr71.4%
pow-sqr63.0%
metadata-eval63.0%
unpow-163.0%
pow-sqr71.1%
metadata-eval71.1%
unpow-171.1%
Simplified71.1%
frac-sub71.5%
*-un-lft-identity71.5%
+-commutative71.5%
+-commutative71.5%
Applied egg-rr71.5%
*-rgt-identity71.5%
associate--l+93.7%
+-inverses93.7%
metadata-eval93.7%
Simplified93.7%
Final simplification93.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.5%
*-un-lft-identity99.5%
clear-num99.5%
associate-/r/99.5%
prod-diff99.5%
*-un-lft-identity99.5%
fma-neg99.5%
*-un-lft-identity99.5%
inv-pow99.5%
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.3%
*-commutative99.3%
Simplified99.3%
if 1 < x Initial program 38.6%
*-un-lft-identity38.6%
clear-num38.6%
associate-/r/38.6%
prod-diff38.6%
*-un-lft-identity38.6%
fma-neg38.6%
*-un-lft-identity38.6%
inv-pow38.6%
sqrt-pow233.9%
metadata-eval33.9%
pow1/233.9%
pow-flip38.7%
+-commutative38.7%
metadata-eval38.7%
Applied egg-rr38.7%
fma-udef38.7%
neg-mul-138.7%
rem-log-exp7.0%
log-rec7.1%
+-commutative7.1%
log-rec7.0%
rem-log-exp38.7%
sub-neg38.7%
+-inverses38.7%
+-rgt-identity38.7%
Simplified38.7%
Taylor expanded in x around inf 69.1%
Final simplification85.3%
(FPCore (x) :precision binary64 (if (<= x 1.25) (- (pow x -0.5) (exp (* x -0.5))) (* 0.5 (sqrt (/ 1.0 (pow x 3.0))))))
double code(double x) {
double tmp;
if (x <= 1.25) {
tmp = pow(x, -0.5) - exp((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.25d0) then
tmp = (x ** (-0.5d0)) - exp((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.25) {
tmp = Math.pow(x, -0.5) - Math.exp((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.25: tmp = math.pow(x, -0.5) - math.exp((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.25) tmp = Float64((x ^ -0.5) - exp(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.25) tmp = (x ^ -0.5) - exp((x * -0.5)); else tmp = 0.5 * sqrt((1.0 / (x ^ 3.0))); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 1.25], N[(N[Power[x, -0.5], $MachinePrecision] - N[Exp[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.25:\\
\;\;\;\;{x}^{-0.5} - e^{x \cdot -0.5}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \sqrt{\frac{1}{{x}^{3}}}\\
\end{array}
\end{array}
if x < 1.25Initial program 99.5%
*-un-lft-identity99.5%
clear-num99.5%
associate-/r/99.5%
prod-diff99.5%
*-un-lft-identity99.5%
fma-neg99.5%
*-un-lft-identity99.5%
inv-pow99.5%
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%
pow-to-exp100.0%
log1p-udef100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 99.3%
if 1.25 < x Initial program 38.6%
*-un-lft-identity38.6%
clear-num38.6%
associate-/r/38.6%
prod-diff38.6%
*-un-lft-identity38.6%
fma-neg38.6%
*-un-lft-identity38.6%
inv-pow38.6%
sqrt-pow233.9%
metadata-eval33.9%
pow1/233.9%
pow-flip38.7%
+-commutative38.7%
metadata-eval38.7%
Applied egg-rr38.7%
fma-udef38.7%
neg-mul-138.7%
rem-log-exp7.0%
log-rec7.1%
+-commutative7.1%
log-rec7.0%
rem-log-exp38.7%
sub-neg38.7%
+-inverses38.7%
+-rgt-identity38.7%
Simplified38.7%
Taylor expanded in x around inf 69.1%
Final simplification85.3%
(FPCore (x) :precision binary64 (/ (- (/ 1.0 x) (/ 1.0 (+ 1.0 x))) (+ 1.0 (+ (pow x -0.5) (* x -0.5)))))
double code(double x) {
return ((1.0 / x) - (1.0 / (1.0 + x))) / (1.0 + (pow(x, -0.5) + (x * -0.5)));
}
real(8) function code(x)
real(8), intent (in) :: x
code = ((1.0d0 / x) - (1.0d0 / (1.0d0 + x))) / (1.0d0 + ((x ** (-0.5d0)) + (x * (-0.5d0))))
end function
public static double code(double x) {
return ((1.0 / x) - (1.0 / (1.0 + x))) / (1.0 + (Math.pow(x, -0.5) + (x * -0.5)));
}
def code(x): return ((1.0 / x) - (1.0 / (1.0 + x))) / (1.0 + (math.pow(x, -0.5) + (x * -0.5)))
function code(x) return Float64(Float64(Float64(1.0 / x) - Float64(1.0 / Float64(1.0 + x))) / Float64(1.0 + Float64((x ^ -0.5) + Float64(x * -0.5)))) end
function tmp = code(x) tmp = ((1.0 / x) - (1.0 / (1.0 + x))) / (1.0 + ((x ^ -0.5) + (x * -0.5))); end
code[x_] := N[(N[(N[(1.0 / x), $MachinePrecision] - N[(1.0 / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[Power[x, -0.5], $MachinePrecision] + N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{1}{x} - \frac{1}{1 + x}}{1 + \left({x}^{-0.5} + x \cdot -0.5\right)}
\end{array}
Initial program 71.2%
*-un-lft-identity71.2%
clear-num71.2%
associate-/r/71.2%
prod-diff71.2%
*-un-lft-identity71.2%
fma-neg71.2%
*-un-lft-identity71.2%
inv-pow71.2%
sqrt-pow269.2%
metadata-eval69.2%
pow1/269.2%
pow-flip71.5%
+-commutative71.5%
metadata-eval71.5%
Applied egg-rr71.5%
fma-udef71.5%
neg-mul-171.5%
rem-log-exp56.8%
log-rec56.8%
+-commutative56.8%
log-rec56.8%
rem-log-exp71.5%
sub-neg71.5%
+-inverses71.5%
+-rgt-identity71.5%
Simplified71.5%
flip--71.4%
+-commutative71.4%
+-commutative71.4%
+-commutative71.4%
Applied egg-rr71.4%
pow-sqr63.0%
metadata-eval63.0%
unpow-163.0%
pow-sqr71.1%
metadata-eval71.1%
unpow-171.1%
Simplified71.1%
Taylor expanded in x around 0 69.7%
Final simplification69.7%
(FPCore (x) :precision binary64 (/ (- (/ 1.0 x) (/ 1.0 (+ 1.0 x))) (+ 1.0 (pow x -0.5))))
double code(double x) {
return ((1.0 / x) - (1.0 / (1.0 + x))) / (1.0 + pow(x, -0.5));
}
real(8) function code(x)
real(8), intent (in) :: x
code = ((1.0d0 / x) - (1.0d0 / (1.0d0 + x))) / (1.0d0 + (x ** (-0.5d0)))
end function
public static double code(double x) {
return ((1.0 / x) - (1.0 / (1.0 + x))) / (1.0 + Math.pow(x, -0.5));
}
def code(x): return ((1.0 / x) - (1.0 / (1.0 + x))) / (1.0 + math.pow(x, -0.5))
function code(x) return Float64(Float64(Float64(1.0 / x) - Float64(1.0 / Float64(1.0 + x))) / Float64(1.0 + (x ^ -0.5))) end
function tmp = code(x) tmp = ((1.0 / x) - (1.0 / (1.0 + x))) / (1.0 + (x ^ -0.5)); end
code[x_] := N[(N[(N[(1.0 / x), $MachinePrecision] - N[(1.0 / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{1}{x} - \frac{1}{1 + x}}{1 + {x}^{-0.5}}
\end{array}
Initial program 71.2%
*-un-lft-identity71.2%
clear-num71.2%
associate-/r/71.2%
prod-diff71.2%
*-un-lft-identity71.2%
fma-neg71.2%
*-un-lft-identity71.2%
inv-pow71.2%
sqrt-pow269.2%
metadata-eval69.2%
pow1/269.2%
pow-flip71.5%
+-commutative71.5%
metadata-eval71.5%
Applied egg-rr71.5%
fma-udef71.5%
neg-mul-171.5%
rem-log-exp56.8%
log-rec56.8%
+-commutative56.8%
log-rec56.8%
rem-log-exp71.5%
sub-neg71.5%
+-inverses71.5%
+-rgt-identity71.5%
Simplified71.5%
flip--71.4%
+-commutative71.4%
+-commutative71.4%
+-commutative71.4%
Applied egg-rr71.4%
pow-sqr63.0%
metadata-eval63.0%
unpow-163.0%
pow-sqr71.1%
metadata-eval71.1%
unpow-171.1%
Simplified71.1%
Taylor expanded in x around 0 69.5%
Final simplification69.5%
(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 83.0%
*-un-lft-identity83.0%
clear-num83.0%
associate-/r/83.0%
prod-diff83.0%
*-un-lft-identity83.0%
fma-neg83.0%
*-un-lft-identity83.0%
inv-pow83.0%
sqrt-pow283.4%
metadata-eval83.4%
pow1/283.4%
pow-flip83.4%
+-commutative83.4%
metadata-eval83.4%
Applied egg-rr83.4%
fma-udef83.4%
neg-mul-183.4%
rem-log-exp83.6%
log-rec83.6%
+-commutative83.6%
log-rec83.6%
rem-log-exp83.4%
sub-neg83.4%
+-inverses83.4%
+-rgt-identity83.4%
Simplified83.4%
Taylor expanded in x around 0 81.7%
*-commutative81.7%
Simplified81.7%
if 8.1999999999999997e76 < x Initial program 48.3%
*-un-lft-identity48.3%
clear-num48.3%
associate-/r/48.3%
prod-diff48.3%
*-un-lft-identity48.3%
fma-neg48.3%
*-un-lft-identity48.3%
inv-pow48.2%
sqrt-pow241.7%
metadata-eval41.7%
pow1/241.7%
pow-flip48.3%
+-commutative48.3%
metadata-eval48.3%
Applied egg-rr48.3%
fma-udef48.3%
neg-mul-148.3%
rem-log-exp4.7%
log-rec4.7%
+-commutative4.7%
log-rec4.7%
rem-log-exp48.3%
sub-neg48.3%
+-inverses48.3%
+-rgt-identity48.3%
Simplified48.3%
sqr-pow22.6%
fma-neg4.4%
metadata-eval4.4%
metadata-eval4.4%
+-commutative4.4%
Applied egg-rr4.4%
Taylor expanded in x around inf 48.3%
unpow1/248.3%
+-inverses48.3%
Simplified48.3%
Final simplification70.4%
(FPCore (x) :precision binary64 (if (<= x 4.8e+153) (/ 1.0 (+ x (pow x 0.5))) 0.0))
double code(double x) {
double tmp;
if (x <= 4.8e+153) {
tmp = 1.0 / (x + pow(x, 0.5));
} else {
tmp = 0.0;
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= 4.8d+153) then
tmp = 1.0d0 / (x + (x ** 0.5d0))
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= 4.8e+153) {
tmp = 1.0 / (x + Math.pow(x, 0.5));
} else {
tmp = 0.0;
}
return tmp;
}
def code(x): tmp = 0 if x <= 4.8e+153: tmp = 1.0 / (x + math.pow(x, 0.5)) else: tmp = 0.0 return tmp
function code(x) tmp = 0.0 if (x <= 4.8e+153) tmp = Float64(1.0 / Float64(x + (x ^ 0.5))); else tmp = 0.0; end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 4.8e+153) tmp = 1.0 / (x + (x ^ 0.5)); else tmp = 0.0; end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 4.8e+153], N[(1.0 / N[(x + N[Power[x, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.8 \cdot 10^{+153}:\\
\;\;\;\;\frac{1}{x + {x}^{0.5}}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < 4.79999999999999985e153Initial program 70.6%
*-un-lft-identity70.6%
clear-num70.6%
associate-/r/70.6%
prod-diff70.6%
*-un-lft-identity70.6%
fma-neg70.6%
*-un-lft-identity70.6%
inv-pow70.6%
sqrt-pow271.0%
metadata-eval71.0%
pow1/271.0%
pow-flip70.9%
+-commutative70.9%
metadata-eval70.9%
Applied egg-rr70.9%
fma-udef70.9%
neg-mul-170.9%
rem-log-exp71.1%
log-rec71.1%
+-commutative71.1%
log-rec71.1%
rem-log-exp70.9%
sub-neg70.9%
+-inverses70.9%
+-rgt-identity70.9%
Simplified70.9%
flip--70.8%
+-commutative70.8%
+-commutative70.8%
+-commutative70.8%
Applied egg-rr70.8%
pow-sqr70.4%
metadata-eval70.4%
unpow-170.4%
pow-sqr70.4%
metadata-eval70.4%
unpow-170.4%
Simplified70.4%
Taylor expanded in x around 0 68.9%
distribute-rgt-in68.9%
*-lft-identity68.9%
pow-plus69.1%
metadata-eval69.1%
Simplified69.1%
if 4.79999999999999985e153 < x Initial program 73.5%
*-un-lft-identity73.5%
clear-num73.5%
associate-/r/73.5%
prod-diff73.5%
*-un-lft-identity73.5%
fma-neg73.5%
*-un-lft-identity73.5%
inv-pow73.3%
sqrt-pow262.9%
metadata-eval62.9%
pow1/262.9%
pow-flip73.5%
+-commutative73.5%
metadata-eval73.5%
Applied egg-rr73.5%
fma-udef73.5%
neg-mul-173.5%
rem-log-exp4.4%
log-rec4.4%
+-commutative4.4%
log-rec4.4%
rem-log-exp73.5%
sub-neg73.5%
+-inverses73.5%
+-rgt-identity73.5%
Simplified73.5%
sqr-pow33.2%
fma-neg4.5%
metadata-eval4.5%
metadata-eval4.5%
+-commutative4.5%
Applied egg-rr4.5%
Taylor expanded in x around inf 73.5%
unpow1/273.5%
+-inverses73.5%
Simplified73.5%
Final simplification70.1%
(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.5%
*-un-lft-identity99.5%
clear-num99.5%
associate-/r/99.5%
prod-diff99.5%
*-un-lft-identity99.5%
fma-neg99.5%
*-un-lft-identity99.5%
inv-pow99.5%
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.7%
if 1 < x Initial program 38.6%
*-un-lft-identity38.6%
clear-num38.6%
associate-/r/38.6%
prod-diff38.6%
*-un-lft-identity38.6%
fma-neg38.6%
*-un-lft-identity38.6%
inv-pow38.6%
sqrt-pow233.9%
metadata-eval33.9%
pow1/233.9%
pow-flip38.7%
+-commutative38.7%
metadata-eval38.7%
Applied egg-rr38.7%
fma-udef38.7%
neg-mul-138.7%
rem-log-exp7.0%
log-rec7.1%
+-commutative7.1%
log-rec7.0%
rem-log-exp38.7%
sub-neg38.7%
+-inverses38.7%
+-rgt-identity38.7%
Simplified38.7%
sqr-pow20.2%
fma-neg7.0%
metadata-eval7.0%
metadata-eval7.0%
+-commutative7.0%
Applied egg-rr7.0%
Taylor expanded in x around inf 36.3%
unpow1/236.3%
+-inverses36.3%
Simplified36.3%
Final simplification69.7%
(FPCore (x) :precision binary64 (if (<= x 8.5e+122) (sqrt (/ 1.0 x)) 0.0))
double code(double x) {
double tmp;
if (x <= 8.5e+122) {
tmp = sqrt((1.0 / x));
} 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 = sqrt((1.0d0 / x))
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= 8.5e+122) {
tmp = Math.sqrt((1.0 / x));
} else {
tmp = 0.0;
}
return tmp;
}
def code(x): tmp = 0 if x <= 8.5e+122: tmp = math.sqrt((1.0 / x)) else: tmp = 0.0 return tmp
function code(x) tmp = 0.0 if (x <= 8.5e+122) tmp = sqrt(Float64(1.0 / x)); else tmp = 0.0; end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 8.5e+122) tmp = sqrt((1.0 / x)); else tmp = 0.0; end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 8.5e+122], N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.5 \cdot 10^{+122}:\\
\;\;\;\;\sqrt{\frac{1}{x}}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < 8.50000000000000003e122Initial program 75.5%
*-un-lft-identity75.5%
clear-num75.5%
associate-/r/75.5%
prod-diff75.5%
*-un-lft-identity75.5%
fma-neg75.5%
*-un-lft-identity75.5%
inv-pow75.5%
sqrt-pow275.9%
metadata-eval75.9%
pow1/275.9%
pow-flip75.8%
+-commutative75.8%
metadata-eval75.8%
Applied egg-rr75.8%
fma-udef75.8%
neg-mul-175.8%
rem-log-exp76.0%
log-rec76.1%
+-commutative76.1%
log-rec76.0%
rem-log-exp75.8%
sub-neg75.8%
+-inverses75.8%
+-rgt-identity75.8%
Simplified75.8%
pow-to-exp75.8%
log1p-udef75.8%
Applied egg-rr75.8%
log1p-udef75.8%
+-commutative75.8%
pow-to-exp75.8%
add-cbrt-cube76.1%
unpow376.1%
pow-pow76.1%
metadata-eval76.1%
Applied egg-rr76.1%
Taylor expanded in x around inf 72.1%
if 8.50000000000000003e122 < x Initial program 59.7%
*-un-lft-identity59.7%
clear-num59.7%
associate-/r/59.7%
prod-diff59.7%
*-un-lft-identity59.7%
fma-neg59.7%
*-un-lft-identity59.7%
inv-pow59.6%
sqrt-pow251.3%
metadata-eval51.3%
pow1/251.3%
pow-flip59.7%
+-commutative59.7%
metadata-eval59.7%
Applied egg-rr59.7%
fma-udef59.7%
neg-mul-159.7%
rem-log-exp4.5%
log-rec4.5%
+-commutative4.5%
log-rec4.5%
rem-log-exp59.7%
sub-neg59.7%
+-inverses59.7%
+-rgt-identity59.7%
Simplified59.7%
sqr-pow27.4%
fma-neg4.4%
metadata-eval4.4%
metadata-eval4.4%
+-commutative4.4%
Applied egg-rr4.4%
Taylor expanded in x around inf 59.7%
unpow1/259.7%
+-inverses59.7%
Simplified59.7%
Final simplification68.7%
(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 71.2%
Taylor expanded in x around 0 53.7%
Taylor expanded in x around inf 1.9%
Final simplification1.9%
(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 71.2%
*-un-lft-identity71.2%
clear-num71.2%
associate-/r/71.2%
prod-diff71.2%
*-un-lft-identity71.2%
fma-neg71.2%
*-un-lft-identity71.2%
inv-pow71.2%
sqrt-pow269.2%
metadata-eval69.2%
pow1/269.2%
pow-flip71.5%
+-commutative71.5%
metadata-eval71.5%
Applied egg-rr71.5%
fma-udef71.5%
neg-mul-171.5%
rem-log-exp56.8%
log-rec56.8%
+-commutative56.8%
log-rec56.8%
rem-log-exp71.5%
sub-neg71.5%
+-inverses71.5%
+-rgt-identity71.5%
Simplified71.5%
sqr-pow62.5%
fma-neg56.4%
metadata-eval56.4%
metadata-eval56.4%
+-commutative56.4%
Applied egg-rr56.4%
Taylor expanded in x around inf 18.3%
unpow1/218.3%
+-inverses18.3%
Simplified18.3%
Final simplification18.3%
(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 2023271
(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)))))