
(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 9 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 (/ (/ 1.0 (hypot (sqrt x) x)) (+ (sqrt x) (sqrt (+ x 1.0)))))
double code(double x) {
return (1.0 / hypot(sqrt(x), x)) / (sqrt(x) + sqrt((x + 1.0)));
}
public static double code(double x) {
return (1.0 / Math.hypot(Math.sqrt(x), x)) / (Math.sqrt(x) + Math.sqrt((x + 1.0)));
}
def code(x): return (1.0 / math.hypot(math.sqrt(x), x)) / (math.sqrt(x) + math.sqrt((x + 1.0)))
function code(x) return Float64(Float64(1.0 / hypot(sqrt(x), x)) / Float64(sqrt(x) + sqrt(Float64(x + 1.0)))) end
function tmp = code(x) tmp = (1.0 / hypot(sqrt(x), x)) / (sqrt(x) + sqrt((x + 1.0))); end
code[x_] := N[(N[(1.0 / N[Sqrt[N[Sqrt[x], $MachinePrecision] ^ 2 + x ^ 2], $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{1}{\mathsf{hypot}\left(\sqrt{x}, x\right)}}{\sqrt{x} + \sqrt{x + 1}}
\end{array}
Initial program 34.7%
frac-sub34.8%
*-un-lft-identity34.8%
+-commutative34.8%
*-rgt-identity34.8%
sqrt-unprod34.8%
+-commutative34.8%
Applied egg-rr34.8%
flip--35.0%
add-sqr-sqrt35.7%
add-sqr-sqrt36.3%
add-sqr-sqrt36.3%
hypot-1-def36.3%
Applied egg-rr36.3%
associate--l+80.8%
+-inverses80.8%
metadata-eval80.8%
+-commutative80.8%
Simplified80.8%
*-un-lft-identity80.8%
associate-/l/80.8%
*-commutative80.8%
hypot-undefine80.8%
metadata-eval80.8%
add-sqr-sqrt80.8%
distribute-rgt-in80.8%
*-un-lft-identity80.8%
add-sqr-sqrt80.8%
hypot-define97.2%
Applied egg-rr97.2%
*-lft-identity97.2%
*-commutative97.2%
associate-/r*99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x) :precision binary64 (/ (/ (+ (* -0.125 (sqrt (/ 1.0 x))) (* (sqrt x) 0.5)) x) (* x (+ (/ (+ 0.5 (/ -0.125 x)) x) 1.0))))
double code(double x) {
return (((-0.125 * sqrt((1.0 / x))) + (sqrt(x) * 0.5)) / x) / (x * (((0.5 + (-0.125 / x)) / x) + 1.0));
}
real(8) function code(x)
real(8), intent (in) :: x
code = ((((-0.125d0) * sqrt((1.0d0 / x))) + (sqrt(x) * 0.5d0)) / x) / (x * (((0.5d0 + ((-0.125d0) / x)) / x) + 1.0d0))
end function
public static double code(double x) {
return (((-0.125 * Math.sqrt((1.0 / x))) + (Math.sqrt(x) * 0.5)) / x) / (x * (((0.5 + (-0.125 / x)) / x) + 1.0));
}
def code(x): return (((-0.125 * math.sqrt((1.0 / x))) + (math.sqrt(x) * 0.5)) / x) / (x * (((0.5 + (-0.125 / x)) / x) + 1.0))
function code(x) return Float64(Float64(Float64(Float64(-0.125 * sqrt(Float64(1.0 / x))) + Float64(sqrt(x) * 0.5)) / x) / Float64(x * Float64(Float64(Float64(0.5 + Float64(-0.125 / x)) / x) + 1.0))) end
function tmp = code(x) tmp = (((-0.125 * sqrt((1.0 / x))) + (sqrt(x) * 0.5)) / x) / (x * (((0.5 + (-0.125 / x)) / x) + 1.0)); end
code[x_] := N[(N[(N[(N[(-0.125 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[x], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] / N[(x * N[(N[(N[(0.5 + N[(-0.125 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{-0.125 \cdot \sqrt{\frac{1}{x}} + \sqrt{x} \cdot 0.5}{x}}{x \cdot \left(\frac{0.5 + \frac{-0.125}{x}}{x} + 1\right)}
\end{array}
Initial program 34.7%
frac-sub34.8%
*-un-lft-identity34.8%
+-commutative34.8%
*-rgt-identity34.8%
sqrt-unprod34.8%
+-commutative34.8%
Applied egg-rr34.8%
Taylor expanded in x around -inf 0.0%
mul-1-neg0.0%
*-commutative0.0%
distribute-rgt-neg-in0.0%
Simplified34.5%
Taylor expanded in x around inf 99.0%
Final simplification99.0%
(FPCore (x) :precision binary64 (/ (/ (- 1.0 (/ 0.5 x)) x) (+ (sqrt x) (sqrt (+ x 1.0)))))
double code(double x) {
return ((1.0 - (0.5 / x)) / x) / (sqrt(x) + sqrt((x + 1.0)));
}
real(8) function code(x)
real(8), intent (in) :: x
code = ((1.0d0 - (0.5d0 / x)) / x) / (sqrt(x) + sqrt((x + 1.0d0)))
end function
public static double code(double x) {
return ((1.0 - (0.5 / x)) / x) / (Math.sqrt(x) + Math.sqrt((x + 1.0)));
}
def code(x): return ((1.0 - (0.5 / x)) / x) / (math.sqrt(x) + math.sqrt((x + 1.0)))
function code(x) return Float64(Float64(Float64(1.0 - Float64(0.5 / x)) / x) / Float64(sqrt(x) + sqrt(Float64(x + 1.0)))) end
function tmp = code(x) tmp = ((1.0 - (0.5 / x)) / x) / (sqrt(x) + sqrt((x + 1.0))); end
code[x_] := N[(N[(N[(1.0 - N[(0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] / N[(N[Sqrt[x], $MachinePrecision] + N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{1 - \frac{0.5}{x}}{x}}{\sqrt{x} + \sqrt{x + 1}}
\end{array}
Initial program 34.7%
frac-sub34.8%
*-un-lft-identity34.8%
+-commutative34.8%
*-rgt-identity34.8%
sqrt-unprod34.8%
+-commutative34.8%
Applied egg-rr34.8%
flip--35.0%
add-sqr-sqrt35.7%
add-sqr-sqrt36.3%
add-sqr-sqrt36.3%
hypot-1-def36.3%
Applied egg-rr36.3%
associate--l+80.8%
+-inverses80.8%
metadata-eval80.8%
+-commutative80.8%
Simplified80.8%
*-un-lft-identity80.8%
associate-/l/80.8%
*-commutative80.8%
hypot-undefine80.8%
metadata-eval80.8%
add-sqr-sqrt80.8%
distribute-rgt-in80.8%
*-un-lft-identity80.8%
add-sqr-sqrt80.8%
hypot-define97.2%
Applied egg-rr97.2%
*-lft-identity97.2%
*-commutative97.2%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in x around inf 99.0%
associate-*r/99.0%
metadata-eval99.0%
Simplified99.0%
Final simplification99.0%
(FPCore (x) :precision binary64 (/ (* (sqrt (/ 1.0 x)) 0.5) (* x (+ (/ (+ 0.5 (/ 0.125 x)) x) 1.0))))
double code(double x) {
return (sqrt((1.0 / x)) * 0.5) / (x * (((0.5 + (0.125 / x)) / x) + 1.0));
}
real(8) function code(x)
real(8), intent (in) :: x
code = (sqrt((1.0d0 / x)) * 0.5d0) / (x * (((0.5d0 + (0.125d0 / x)) / x) + 1.0d0))
end function
public static double code(double x) {
return (Math.sqrt((1.0 / x)) * 0.5) / (x * (((0.5 + (0.125 / x)) / x) + 1.0));
}
def code(x): return (math.sqrt((1.0 / x)) * 0.5) / (x * (((0.5 + (0.125 / x)) / x) + 1.0))
function code(x) return Float64(Float64(sqrt(Float64(1.0 / x)) * 0.5) / Float64(x * Float64(Float64(Float64(0.5 + Float64(0.125 / x)) / x) + 1.0))) end
function tmp = code(x) tmp = (sqrt((1.0 / x)) * 0.5) / (x * (((0.5 + (0.125 / x)) / x) + 1.0)); end
code[x_] := N[(N[(N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision] / N[(x * N[(N[(N[(0.5 + N[(0.125 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{\frac{1}{x}} \cdot 0.5}{x \cdot \left(\frac{0.5 + \frac{0.125}{x}}{x} + 1\right)}
\end{array}
Initial program 34.7%
frac-sub34.8%
*-un-lft-identity34.8%
+-commutative34.8%
*-rgt-identity34.8%
sqrt-unprod34.8%
+-commutative34.8%
Applied egg-rr34.8%
Taylor expanded in x around -inf 0.0%
mul-1-neg0.0%
*-commutative0.0%
distribute-rgt-neg-in0.0%
Simplified34.5%
Taylor expanded in x around inf 98.5%
*-commutative98.5%
sub-neg98.5%
neg-mul-198.5%
distribute-lft-in98.5%
add-sqr-sqrt0.0%
sqrt-unprod32.1%
sqr-neg32.1%
sqrt-unprod31.8%
add-sqr-sqrt31.8%
*-commutative31.8%
neg-mul-131.8%
add-sqr-sqrt0.0%
sqrt-unprod79.6%
sqr-neg79.6%
sqrt-unprod98.2%
add-sqr-sqrt98.5%
add-sqr-sqrt0.0%
sqrt-unprod79.5%
sqr-neg79.5%
sqrt-unprod98.4%
add-sqr-sqrt98.4%
neg-mul-198.4%
distribute-neg-frac298.4%
Applied egg-rr98.5%
*-commutative98.5%
distribute-rgt1-in98.5%
Simplified98.5%
Final simplification98.5%
(FPCore (x) :precision binary64 (/ (* 0.5 (pow x -0.5)) (* x (+ (/ (+ 0.5 (/ -0.125 x)) x) 1.0))))
double code(double x) {
return (0.5 * pow(x, -0.5)) / (x * (((0.5 + (-0.125 / x)) / x) + 1.0));
}
real(8) function code(x)
real(8), intent (in) :: x
code = (0.5d0 * (x ** (-0.5d0))) / (x * (((0.5d0 + ((-0.125d0) / x)) / x) + 1.0d0))
end function
public static double code(double x) {
return (0.5 * Math.pow(x, -0.5)) / (x * (((0.5 + (-0.125 / x)) / x) + 1.0));
}
def code(x): return (0.5 * math.pow(x, -0.5)) / (x * (((0.5 + (-0.125 / x)) / x) + 1.0))
function code(x) return Float64(Float64(0.5 * (x ^ -0.5)) / Float64(x * Float64(Float64(Float64(0.5 + Float64(-0.125 / x)) / x) + 1.0))) end
function tmp = code(x) tmp = (0.5 * (x ^ -0.5)) / (x * (((0.5 + (-0.125 / x)) / x) + 1.0)); end
code[x_] := N[(N[(0.5 * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] / N[(x * N[(N[(N[(0.5 + N[(-0.125 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.5 \cdot {x}^{-0.5}}{x \cdot \left(\frac{0.5 + \frac{-0.125}{x}}{x} + 1\right)}
\end{array}
Initial program 34.7%
frac-sub34.8%
*-un-lft-identity34.8%
+-commutative34.8%
*-rgt-identity34.8%
sqrt-unprod34.8%
+-commutative34.8%
Applied egg-rr34.8%
Taylor expanded in x around -inf 0.0%
mul-1-neg0.0%
*-commutative0.0%
distribute-rgt-neg-in0.0%
Simplified34.5%
Taylor expanded in x around inf 98.5%
inv-pow98.5%
sqrt-pow198.6%
metadata-eval98.6%
*-un-lft-identity98.6%
Applied egg-rr98.6%
*-lft-identity98.6%
Simplified98.6%
Final simplification98.6%
(FPCore (x) :precision binary64 (/ (* (sqrt (/ 1.0 x)) 0.5) (+ x (+ 0.5 (/ 0.125 x)))))
double code(double x) {
return (sqrt((1.0 / x)) * 0.5) / (x + (0.5 + (0.125 / x)));
}
real(8) function code(x)
real(8), intent (in) :: x
code = (sqrt((1.0d0 / x)) * 0.5d0) / (x + (0.5d0 + (0.125d0 / x)))
end function
public static double code(double x) {
return (Math.sqrt((1.0 / x)) * 0.5) / (x + (0.5 + (0.125 / x)));
}
def code(x): return (math.sqrt((1.0 / x)) * 0.5) / (x + (0.5 + (0.125 / x)))
function code(x) return Float64(Float64(sqrt(Float64(1.0 / x)) * 0.5) / Float64(x + Float64(0.5 + Float64(0.125 / x)))) end
function tmp = code(x) tmp = (sqrt((1.0 / x)) * 0.5) / (x + (0.5 + (0.125 / x))); end
code[x_] := N[(N[(N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision] / N[(x + N[(0.5 + N[(0.125 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{\frac{1}{x}} \cdot 0.5}{x + \left(0.5 + \frac{0.125}{x}\right)}
\end{array}
Initial program 34.7%
frac-sub34.8%
*-un-lft-identity34.8%
+-commutative34.8%
*-rgt-identity34.8%
sqrt-unprod34.8%
+-commutative34.8%
Applied egg-rr34.8%
Taylor expanded in x around -inf 0.0%
mul-1-neg0.0%
*-commutative0.0%
distribute-rgt-neg-in0.0%
Simplified34.5%
Taylor expanded in x around inf 98.5%
*-commutative98.5%
sub-neg98.5%
neg-mul-198.5%
distribute-lft-in98.5%
add-sqr-sqrt0.0%
sqrt-unprod32.1%
sqr-neg32.1%
sqrt-unprod31.8%
add-sqr-sqrt31.8%
*-commutative31.8%
neg-mul-131.8%
add-sqr-sqrt0.0%
sqrt-unprod79.6%
sqr-neg79.6%
sqrt-unprod98.2%
add-sqr-sqrt98.5%
add-sqr-sqrt0.0%
sqrt-unprod79.5%
sqr-neg79.5%
sqrt-unprod98.4%
add-sqr-sqrt98.4%
neg-mul-198.4%
distribute-neg-frac298.4%
Applied egg-rr98.5%
*-commutative98.5%
associate-*l/98.5%
associate-/l*98.5%
rem-square-sqrt98.5%
associate-*l/98.5%
rem-square-sqrt98.5%
associate-/l/98.5%
*-inverses98.5%
lft-mult-inverse98.5%
*-rgt-identity98.5%
Simplified98.5%
Final simplification98.5%
(FPCore (x) :precision binary64 (/ (* (sqrt (/ 1.0 x)) 0.5) (+ x 0.5)))
double code(double x) {
return (sqrt((1.0 / x)) * 0.5) / (x + 0.5);
}
real(8) function code(x)
real(8), intent (in) :: x
code = (sqrt((1.0d0 / x)) * 0.5d0) / (x + 0.5d0)
end function
public static double code(double x) {
return (Math.sqrt((1.0 / x)) * 0.5) / (x + 0.5);
}
def code(x): return (math.sqrt((1.0 / x)) * 0.5) / (x + 0.5)
function code(x) return Float64(Float64(sqrt(Float64(1.0 / x)) * 0.5) / Float64(x + 0.5)) end
function tmp = code(x) tmp = (sqrt((1.0 / x)) * 0.5) / (x + 0.5); end
code[x_] := N[(N[(N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision] / N[(x + 0.5), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{\frac{1}{x}} \cdot 0.5}{x + 0.5}
\end{array}
Initial program 34.7%
frac-sub34.8%
*-un-lft-identity34.8%
+-commutative34.8%
*-rgt-identity34.8%
sqrt-unprod34.8%
+-commutative34.8%
Applied egg-rr34.8%
Taylor expanded in x around -inf 0.0%
mul-1-neg0.0%
*-commutative0.0%
distribute-rgt-neg-in0.0%
Simplified34.5%
Taylor expanded in x around inf 98.5%
Taylor expanded in x around inf 98.5%
distribute-rgt-in98.5%
*-lft-identity98.5%
associate-*r/98.5%
metadata-eval98.5%
associate-*l/98.5%
associate-/l*98.5%
rem-square-sqrt98.5%
associate-*l/98.5%
rem-square-sqrt98.5%
associate-/l/98.5%
*-inverses98.5%
lft-mult-inverse98.5%
metadata-eval98.5%
Simplified98.5%
Final simplification98.5%
(FPCore (x) :precision binary64 (/ (* (sqrt (/ 1.0 x)) 0.5) x))
double code(double x) {
return (sqrt((1.0 / x)) * 0.5) / x;
}
real(8) function code(x)
real(8), intent (in) :: x
code = (sqrt((1.0d0 / x)) * 0.5d0) / x
end function
public static double code(double x) {
return (Math.sqrt((1.0 / x)) * 0.5) / x;
}
def code(x): return (math.sqrt((1.0 / x)) * 0.5) / x
function code(x) return Float64(Float64(sqrt(Float64(1.0 / x)) * 0.5) / x) end
function tmp = code(x) tmp = (sqrt((1.0 / x)) * 0.5) / x; end
code[x_] := N[(N[(N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{\frac{1}{x}} \cdot 0.5}{x}
\end{array}
Initial program 34.7%
frac-sub34.8%
*-un-lft-identity34.8%
+-commutative34.8%
*-rgt-identity34.8%
sqrt-unprod34.8%
+-commutative34.8%
Applied egg-rr34.8%
Taylor expanded in x around inf 34.1%
Taylor expanded in x around inf 98.4%
Final simplification98.4%
(FPCore (x) :precision binary64 (pow x -0.5))
double code(double x) {
return pow(x, -0.5);
}
real(8) function code(x)
real(8), intent (in) :: x
code = x ** (-0.5d0)
end function
public static double code(double x) {
return Math.pow(x, -0.5);
}
def code(x): return math.pow(x, -0.5)
function code(x) return x ^ -0.5 end
function tmp = code(x) tmp = x ^ -0.5; end
code[x_] := N[Power[x, -0.5], $MachinePrecision]
\begin{array}{l}
\\
{x}^{-0.5}
\end{array}
Initial program 34.7%
Taylor expanded in x around 0 5.5%
inv-pow98.5%
sqrt-pow198.6%
metadata-eval98.6%
*-un-lft-identity98.6%
Applied egg-rr5.5%
*-lft-identity98.6%
Simplified5.5%
(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 2024096
(FPCore (x)
:name "2isqrt (example 3.6)"
:precision binary64
:pre (and (> x 1.0) (< x 1e+308))
:alt
(/ 1.0 (+ (* (+ x 1.0) (sqrt x)) (* x (sqrt (+ x 1.0)))))
(- (/ 1.0 (sqrt x)) (/ 1.0 (sqrt (+ x 1.0)))))