2isqrt (example 3.6)

Percentage Accurate: 37.8% → 99.9%
Time: 11.9s
Alternatives: 4
Speedup: 2.0×

Specification

?
\[x > 1 \land x < 10^{+308}\]
\[\begin{array}{l} \\ \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \end{array} \]
(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:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 4 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 37.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \end{array} \]
(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}

Alternative 1: 99.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{1}{\sqrt{x}} + \frac{-1}{\sqrt{1 + x}} \leq 0:\\ \;\;\;\;0.5 \cdot {x}^{-1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left({\left(1 + x\right)}^{-0.5} + {x}^{-0.5}\right) \cdot \left(x \cdot \left(1 + x\right)\right)}\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= (+ (/ 1.0 (sqrt x)) (/ -1.0 (sqrt (+ 1.0 x)))) 0.0)
   (* 0.5 (pow x -1.5))
   (/ 1.0 (* (+ (pow (+ 1.0 x) -0.5) (pow x -0.5)) (* x (+ 1.0 x))))))
double code(double x) {
	double tmp;
	if (((1.0 / sqrt(x)) + (-1.0 / sqrt((1.0 + x)))) <= 0.0) {
		tmp = 0.5 * pow(x, -1.5);
	} else {
		tmp = 1.0 / ((pow((1.0 + x), -0.5) + pow(x, -0.5)) * (x * (1.0 + x)));
	}
	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)))) <= 0.0d0) then
        tmp = 0.5d0 * (x ** (-1.5d0))
    else
        tmp = 1.0d0 / ((((1.0d0 + x) ** (-0.5d0)) + (x ** (-0.5d0))) * (x * (1.0d0 + x)))
    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)))) <= 0.0) {
		tmp = 0.5 * Math.pow(x, -1.5);
	} else {
		tmp = 1.0 / ((Math.pow((1.0 + x), -0.5) + Math.pow(x, -0.5)) * (x * (1.0 + x)));
	}
	return tmp;
}
def code(x):
	tmp = 0
	if ((1.0 / math.sqrt(x)) + (-1.0 / math.sqrt((1.0 + x)))) <= 0.0:
		tmp = 0.5 * math.pow(x, -1.5)
	else:
		tmp = 1.0 / ((math.pow((1.0 + x), -0.5) + math.pow(x, -0.5)) * (x * (1.0 + x)))
	return tmp
function code(x)
	tmp = 0.0
	if (Float64(Float64(1.0 / sqrt(x)) + Float64(-1.0 / sqrt(Float64(1.0 + x)))) <= 0.0)
		tmp = Float64(0.5 * (x ^ -1.5));
	else
		tmp = Float64(1.0 / Float64(Float64((Float64(1.0 + x) ^ -0.5) + (x ^ -0.5)) * Float64(x * Float64(1.0 + x))));
	end
	return tmp
end
function tmp_2 = code(x)
	tmp = 0.0;
	if (((1.0 / sqrt(x)) + (-1.0 / sqrt((1.0 + x)))) <= 0.0)
		tmp = 0.5 * (x ^ -1.5);
	else
		tmp = 1.0 / ((((1.0 + x) ^ -0.5) + (x ^ -0.5)) * (x * (1.0 + x)));
	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], 0.0], N[(0.5 * N[Power[x, -1.5], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(N[Power[N[(1.0 + x), $MachinePrecision], -0.5], $MachinePrecision] + N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] * N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{1}{\sqrt{x}} + \frac{-1}{\sqrt{1 + x}} \leq 0:\\
\;\;\;\;0.5 \cdot {x}^{-1.5}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\left({\left(1 + x\right)}^{-0.5} + {x}^{-0.5}\right) \cdot \left(x \cdot \left(1 + x\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (/.f64 1 (sqrt.f64 x)) (/.f64 1 (sqrt.f64 (+.f64 x 1)))) < 0.0

    1. Initial program 38.1%

      \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. flip--38.1%

        \[\leadsto \color{blue}{\frac{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}} \]
      2. clear-num38.1%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}}} \]
      3. inv-pow38.1%

        \[\leadsto \frac{1}{\frac{\color{blue}{{\left(\sqrt{x}\right)}^{-1}} + \frac{1}{\sqrt{x + 1}}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
      4. sqrt-pow238.1%

        \[\leadsto \frac{1}{\frac{\color{blue}{{x}^{\left(\frac{-1}{2}\right)}} + \frac{1}{\sqrt{x + 1}}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
      5. metadata-eval38.1%

        \[\leadsto \frac{1}{\frac{{x}^{\color{blue}{-0.5}} + \frac{1}{\sqrt{x + 1}}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
      6. inv-pow38.1%

        \[\leadsto \frac{1}{\frac{{x}^{-0.5} + \color{blue}{{\left(\sqrt{x + 1}\right)}^{-1}}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
      7. sqrt-pow238.1%

        \[\leadsto \frac{1}{\frac{{x}^{-0.5} + \color{blue}{{\left(x + 1\right)}^{\left(\frac{-1}{2}\right)}}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
      8. +-commutative38.1%

        \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\color{blue}{\left(1 + x\right)}}^{\left(\frac{-1}{2}\right)}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
      9. metadata-eval38.1%

        \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{\color{blue}{-0.5}}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
      10. frac-times20.3%

        \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\color{blue}{\frac{1 \cdot 1}{\sqrt{x} \cdot \sqrt{x}}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
      11. metadata-eval20.3%

        \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\frac{\color{blue}{1}}{\sqrt{x} \cdot \sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
      12. add-sqr-sqrt16.8%

        \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\frac{1}{\color{blue}{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
      13. frac-times20.3%

        \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\frac{1}{x} - \color{blue}{\frac{1 \cdot 1}{\sqrt{x + 1} \cdot \sqrt{x + 1}}}}} \]
      14. metadata-eval20.3%

        \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\frac{1}{x} - \frac{\color{blue}{1}}{\sqrt{x + 1} \cdot \sqrt{x + 1}}}} \]
      15. add-sqr-sqrt38.2%

        \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\frac{1}{x} - \frac{1}{\color{blue}{x + 1}}}} \]
      16. +-commutative38.2%

        \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\frac{1}{x} - \frac{1}{\color{blue}{1 + x}}}} \]
    4. Applied egg-rr38.2%

      \[\leadsto \color{blue}{\frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\frac{1}{x} - \frac{1}{1 + x}}}} \]
    5. Taylor expanded in x around inf 66.7%

      \[\leadsto \frac{1}{\color{blue}{2 \cdot \sqrt{{x}^{3}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity66.7%

        \[\leadsto \color{blue}{1 \cdot \frac{1}{2 \cdot \sqrt{{x}^{3}}}} \]
      2. associate-/r*66.7%

        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{1}{2}}{\sqrt{{x}^{3}}}} \]
      3. metadata-eval66.7%

        \[\leadsto 1 \cdot \frac{\color{blue}{0.5}}{\sqrt{{x}^{3}}} \]
      4. div-inv66.7%

        \[\leadsto 1 \cdot \color{blue}{\left(0.5 \cdot \frac{1}{\sqrt{{x}^{3}}}\right)} \]
      5. metadata-eval66.7%

        \[\leadsto 1 \cdot \left(0.5 \cdot \frac{\color{blue}{1 \cdot 1}}{\sqrt{{x}^{3}}}\right) \]
      6. unpow366.7%

        \[\leadsto 1 \cdot \left(0.5 \cdot \frac{1 \cdot 1}{\sqrt{\color{blue}{\left(x \cdot x\right) \cdot x}}}\right) \]
      7. sqrt-prod81.3%

        \[\leadsto 1 \cdot \left(0.5 \cdot \frac{1 \cdot 1}{\color{blue}{\sqrt{x \cdot x} \cdot \sqrt{x}}}\right) \]
      8. sqrt-unprod97.4%

        \[\leadsto 1 \cdot \left(0.5 \cdot \frac{1 \cdot 1}{\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \sqrt{x}}\right) \]
      9. add-sqr-sqrt97.7%

        \[\leadsto 1 \cdot \left(0.5 \cdot \frac{1 \cdot 1}{\color{blue}{x} \cdot \sqrt{x}}\right) \]
      10. /-rgt-identity97.7%

        \[\leadsto 1 \cdot \left(0.5 \cdot \frac{1 \cdot 1}{\color{blue}{\frac{x}{1}} \cdot \sqrt{x}}\right) \]
      11. frac-times99.6%

        \[\leadsto 1 \cdot \left(0.5 \cdot \color{blue}{\left(\frac{1}{\frac{x}{1}} \cdot \frac{1}{\sqrt{x}}\right)}\right) \]
      12. clear-num99.6%

        \[\leadsto 1 \cdot \left(0.5 \cdot \left(\color{blue}{\frac{1}{x}} \cdot \frac{1}{\sqrt{x}}\right)\right) \]
      13. metadata-eval99.6%

        \[\leadsto 1 \cdot \left(0.5 \cdot \left(\frac{1}{x} \cdot \frac{\color{blue}{\sqrt{1}}}{\sqrt{x}}\right)\right) \]
      14. sqrt-div99.6%

        \[\leadsto 1 \cdot \left(0.5 \cdot \left(\frac{1}{x} \cdot \color{blue}{\sqrt{\frac{1}{x}}}\right)\right) \]
      15. add-sqr-sqrt99.2%

        \[\leadsto 1 \cdot \left(0.5 \cdot \left(\color{blue}{\left(\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}\right)} \cdot \sqrt{\frac{1}{x}}\right)\right) \]
      16. pow399.2%

        \[\leadsto 1 \cdot \left(0.5 \cdot \color{blue}{{\left(\sqrt{\frac{1}{x}}\right)}^{3}}\right) \]
      17. inv-pow99.2%

        \[\leadsto 1 \cdot \left(0.5 \cdot {\left(\sqrt{\color{blue}{{x}^{-1}}}\right)}^{3}\right) \]
      18. sqrt-pow199.2%

        \[\leadsto 1 \cdot \left(0.5 \cdot {\color{blue}{\left({x}^{\left(\frac{-1}{2}\right)}\right)}}^{3}\right) \]
      19. metadata-eval99.2%

        \[\leadsto 1 \cdot \left(0.5 \cdot {\left({x}^{\color{blue}{-0.5}}\right)}^{3}\right) \]
      20. pow-pow100.0%

        \[\leadsto 1 \cdot \left(0.5 \cdot \color{blue}{{x}^{\left(-0.5 \cdot 3\right)}}\right) \]
      21. metadata-eval100.0%

        \[\leadsto 1 \cdot \left(0.5 \cdot {x}^{\color{blue}{-1.5}}\right) \]
    7. Applied egg-rr100.0%

      \[\leadsto \color{blue}{1 \cdot \left(0.5 \cdot {x}^{-1.5}\right)} \]
    8. Step-by-step derivation
      1. *-lft-identity100.0%

        \[\leadsto \color{blue}{0.5 \cdot {x}^{-1.5}} \]
    9. Simplified100.0%

      \[\leadsto \color{blue}{0.5 \cdot {x}^{-1.5}} \]

    if 0.0 < (-.f64 (/.f64 1 (sqrt.f64 x)) (/.f64 1 (sqrt.f64 (+.f64 x 1))))

    1. Initial program 60.9%

      \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube58.3%

        \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{\color{blue}{\sqrt[3]{\left(\sqrt{x + 1} \cdot \sqrt{x + 1}\right) \cdot \sqrt{x + 1}}}} \]
      2. pow1/354.4%

        \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{\color{blue}{{\left(\left(\sqrt{x + 1} \cdot \sqrt{x + 1}\right) \cdot \sqrt{x + 1}\right)}^{0.3333333333333333}}} \]
      3. add-sqr-sqrt54.4%

        \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{{\left(\color{blue}{\left(x + 1\right)} \cdot \sqrt{x + 1}\right)}^{0.3333333333333333}} \]
      4. pow154.4%

        \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{{\left(\color{blue}{{\left(x + 1\right)}^{1}} \cdot \sqrt{x + 1}\right)}^{0.3333333333333333}} \]
      5. pow1/254.4%

        \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{{\left({\left(x + 1\right)}^{1} \cdot \color{blue}{{\left(x + 1\right)}^{0.5}}\right)}^{0.3333333333333333}} \]
      6. pow-prod-up54.4%

        \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{{\color{blue}{\left({\left(x + 1\right)}^{\left(1 + 0.5\right)}\right)}}^{0.3333333333333333}} \]
      7. +-commutative54.4%

        \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{{\left({\color{blue}{\left(1 + x\right)}}^{\left(1 + 0.5\right)}\right)}^{0.3333333333333333}} \]
      8. metadata-eval54.4%

        \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{{\left({\left(1 + x\right)}^{\color{blue}{1.5}}\right)}^{0.3333333333333333}} \]
    4. Applied egg-rr54.4%

      \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{\color{blue}{{\left({\left(1 + x\right)}^{1.5}\right)}^{0.3333333333333333}}} \]
    5. Step-by-step derivation
      1. unpow1/357.9%

        \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{\color{blue}{\sqrt[3]{{\left(1 + x\right)}^{1.5}}}} \]
    6. Simplified57.9%

      \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{\color{blue}{\sqrt[3]{{\left(1 + x\right)}^{1.5}}}} \]
    7. Applied egg-rr99.6%

      \[\leadsto \color{blue}{\frac{\left(1 + x\right) - x}{\left({x}^{-0.5} + {\left(1 + x\right)}^{-0.5}\right) \cdot \left(x \cdot \left(1 + x\right)\right)}} \]
    8. Step-by-step derivation
      1. associate--l+99.6%

        \[\leadsto \frac{\color{blue}{1 + \left(x - x\right)}}{\left({x}^{-0.5} + {\left(1 + x\right)}^{-0.5}\right) \cdot \left(x \cdot \left(1 + x\right)\right)} \]
      2. +-inverses99.6%

        \[\leadsto \frac{1 + \color{blue}{0}}{\left({x}^{-0.5} + {\left(1 + x\right)}^{-0.5}\right) \cdot \left(x \cdot \left(1 + x\right)\right)} \]
      3. metadata-eval99.6%

        \[\leadsto \frac{\color{blue}{1}}{\left({x}^{-0.5} + {\left(1 + x\right)}^{-0.5}\right) \cdot \left(x \cdot \left(1 + x\right)\right)} \]
    9. Simplified99.6%

      \[\leadsto \color{blue}{\frac{1}{\left({x}^{-0.5} + {\left(1 + x\right)}^{-0.5}\right) \cdot \left(x \cdot \left(1 + x\right)\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification100.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{1}{\sqrt{x}} + \frac{-1}{\sqrt{1 + x}} \leq 0:\\ \;\;\;\;0.5 \cdot {x}^{-1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left({\left(1 + x\right)}^{-0.5} + {x}^{-0.5}\right) \cdot \left(x \cdot \left(1 + x\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 99.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\frac{1}{{x}^{0.5} + x \cdot {\left(1 + x\right)}^{-0.5}}}{1 + x} \end{array} \]
(FPCore (x)
 :precision binary64
 (/ (/ 1.0 (+ (pow x 0.5) (* x (pow (+ 1.0 x) -0.5)))) (+ 1.0 x)))
double code(double x) {
	return (1.0 / (pow(x, 0.5) + (x * pow((1.0 + x), -0.5)))) / (1.0 + x);
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = (1.0d0 / ((x ** 0.5d0) + (x * ((1.0d0 + x) ** (-0.5d0))))) / (1.0d0 + x)
end function
public static double code(double x) {
	return (1.0 / (Math.pow(x, 0.5) + (x * Math.pow((1.0 + x), -0.5)))) / (1.0 + x);
}
def code(x):
	return (1.0 / (math.pow(x, 0.5) + (x * math.pow((1.0 + x), -0.5)))) / (1.0 + x)
function code(x)
	return Float64(Float64(1.0 / Float64((x ^ 0.5) + Float64(x * (Float64(1.0 + x) ^ -0.5)))) / Float64(1.0 + x))
end
function tmp = code(x)
	tmp = (1.0 / ((x ^ 0.5) + (x * ((1.0 + x) ^ -0.5)))) / (1.0 + x);
end
code[x_] := N[(N[(1.0 / N[(N[Power[x, 0.5], $MachinePrecision] + N[(x * N[Power[N[(1.0 + x), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{1}{{x}^{0.5} + x \cdot {\left(1 + x\right)}^{-0.5}}}{1 + x}
\end{array}
Derivation
  1. Initial program 39.2%

    \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cbrt-cube7.6%

      \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{\color{blue}{\sqrt[3]{\left(\sqrt{x + 1} \cdot \sqrt{x + 1}\right) \cdot \sqrt{x + 1}}}} \]
    2. pow1/35.7%

      \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{\color{blue}{{\left(\left(\sqrt{x + 1} \cdot \sqrt{x + 1}\right) \cdot \sqrt{x + 1}\right)}^{0.3333333333333333}}} \]
    3. add-sqr-sqrt5.7%

      \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{{\left(\color{blue}{\left(x + 1\right)} \cdot \sqrt{x + 1}\right)}^{0.3333333333333333}} \]
    4. pow15.7%

      \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{{\left(\color{blue}{{\left(x + 1\right)}^{1}} \cdot \sqrt{x + 1}\right)}^{0.3333333333333333}} \]
    5. pow1/25.7%

      \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{{\left({\left(x + 1\right)}^{1} \cdot \color{blue}{{\left(x + 1\right)}^{0.5}}\right)}^{0.3333333333333333}} \]
    6. pow-prod-up5.7%

      \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{{\color{blue}{\left({\left(x + 1\right)}^{\left(1 + 0.5\right)}\right)}}^{0.3333333333333333}} \]
    7. +-commutative5.7%

      \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{{\left({\color{blue}{\left(1 + x\right)}}^{\left(1 + 0.5\right)}\right)}^{0.3333333333333333}} \]
    8. metadata-eval5.7%

      \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{{\left({\left(1 + x\right)}^{\color{blue}{1.5}}\right)}^{0.3333333333333333}} \]
  4. Applied egg-rr5.7%

    \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{\color{blue}{{\left({\left(1 + x\right)}^{1.5}\right)}^{0.3333333333333333}}} \]
  5. Step-by-step derivation
    1. unpow1/37.5%

      \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{\color{blue}{\sqrt[3]{{\left(1 + x\right)}^{1.5}}}} \]
  6. Simplified7.5%

    \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{\color{blue}{\sqrt[3]{{\left(1 + x\right)}^{1.5}}}} \]
  7. Applied egg-rr41.1%

    \[\leadsto \color{blue}{\frac{\left(1 + x\right) - x}{\left({x}^{-0.5} + {\left(1 + x\right)}^{-0.5}\right) \cdot \left(x \cdot \left(1 + x\right)\right)}} \]
  8. Step-by-step derivation
    1. associate--l+82.2%

      \[\leadsto \frac{\color{blue}{1 + \left(x - x\right)}}{\left({x}^{-0.5} + {\left(1 + x\right)}^{-0.5}\right) \cdot \left(x \cdot \left(1 + x\right)\right)} \]
    2. +-inverses82.2%

      \[\leadsto \frac{1 + \color{blue}{0}}{\left({x}^{-0.5} + {\left(1 + x\right)}^{-0.5}\right) \cdot \left(x \cdot \left(1 + x\right)\right)} \]
    3. metadata-eval82.2%

      \[\leadsto \frac{\color{blue}{1}}{\left({x}^{-0.5} + {\left(1 + x\right)}^{-0.5}\right) \cdot \left(x \cdot \left(1 + x\right)\right)} \]
  9. Simplified82.2%

    \[\leadsto \color{blue}{\frac{1}{\left({x}^{-0.5} + {\left(1 + x\right)}^{-0.5}\right) \cdot \left(x \cdot \left(1 + x\right)\right)}} \]
  10. Step-by-step derivation
    1. inv-pow82.2%

      \[\leadsto \color{blue}{{\left(\left({x}^{-0.5} + {\left(1 + x\right)}^{-0.5}\right) \cdot \left(x \cdot \left(1 + x\right)\right)\right)}^{-1}} \]
    2. associate-*r*97.8%

      \[\leadsto {\color{blue}{\left(\left(\left({x}^{-0.5} + {\left(1 + x\right)}^{-0.5}\right) \cdot x\right) \cdot \left(1 + x\right)\right)}}^{-1} \]
    3. unpow-prod-down99.5%

      \[\leadsto \color{blue}{{\left(\left({x}^{-0.5} + {\left(1 + x\right)}^{-0.5}\right) \cdot x\right)}^{-1} \cdot {\left(1 + x\right)}^{-1}} \]
    4. +-commutative99.5%

      \[\leadsto {\left(\left({x}^{-0.5} + {\color{blue}{\left(x + 1\right)}}^{-0.5}\right) \cdot x\right)}^{-1} \cdot {\left(1 + x\right)}^{-1} \]
    5. inv-pow99.5%

      \[\leadsto {\left(\left({x}^{-0.5} + {\left(x + 1\right)}^{-0.5}\right) \cdot x\right)}^{-1} \cdot \color{blue}{\frac{1}{1 + x}} \]
    6. +-commutative99.5%

      \[\leadsto {\left(\left({x}^{-0.5} + {\left(x + 1\right)}^{-0.5}\right) \cdot x\right)}^{-1} \cdot \frac{1}{\color{blue}{x + 1}} \]
  11. Applied egg-rr99.5%

    \[\leadsto \color{blue}{{\left(\left({x}^{-0.5} + {\left(x + 1\right)}^{-0.5}\right) \cdot x\right)}^{-1} \cdot \frac{1}{x + 1}} \]
  12. Step-by-step derivation
    1. associate-*r/99.5%

      \[\leadsto \color{blue}{\frac{{\left(\left({x}^{-0.5} + {\left(x + 1\right)}^{-0.5}\right) \cdot x\right)}^{-1} \cdot 1}{x + 1}} \]
    2. *-rgt-identity99.5%

      \[\leadsto \frac{\color{blue}{{\left(\left({x}^{-0.5} + {\left(x + 1\right)}^{-0.5}\right) \cdot x\right)}^{-1}}}{x + 1} \]
    3. unpow-199.5%

      \[\leadsto \frac{\color{blue}{\frac{1}{\left({x}^{-0.5} + {\left(x + 1\right)}^{-0.5}\right) \cdot x}}}{x + 1} \]
    4. *-commutative99.5%

      \[\leadsto \frac{\frac{1}{\color{blue}{x \cdot \left({x}^{-0.5} + {\left(x + 1\right)}^{-0.5}\right)}}}{x + 1} \]
    5. distribute-rgt-in99.5%

      \[\leadsto \frac{\frac{1}{\color{blue}{{x}^{-0.5} \cdot x + {\left(x + 1\right)}^{-0.5} \cdot x}}}{x + 1} \]
    6. pow-plus99.5%

      \[\leadsto \frac{\frac{1}{\color{blue}{{x}^{\left(-0.5 + 1\right)}} + {\left(x + 1\right)}^{-0.5} \cdot x}}{x + 1} \]
    7. metadata-eval99.5%

      \[\leadsto \frac{\frac{1}{{x}^{\color{blue}{0.5}} + {\left(x + 1\right)}^{-0.5} \cdot x}}{x + 1} \]
  13. Simplified99.5%

    \[\leadsto \color{blue}{\frac{\frac{1}{{x}^{0.5} + {\left(x + 1\right)}^{-0.5} \cdot x}}{x + 1}} \]
  14. Final simplification99.5%

    \[\leadsto \frac{\frac{1}{{x}^{0.5} + x \cdot {\left(1 + x\right)}^{-0.5}}}{1 + x} \]
  15. Add Preprocessing

Alternative 3: 98.0% accurate, 2.0× speedup?

\[\begin{array}{l} \\ 0.5 \cdot {x}^{-1.5} \end{array} \]
(FPCore (x) :precision binary64 (* 0.5 (pow x -1.5)))
double code(double x) {
	return 0.5 * pow(x, -1.5);
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = 0.5d0 * (x ** (-1.5d0))
end function
public static double code(double x) {
	return 0.5 * Math.pow(x, -1.5);
}
def code(x):
	return 0.5 * math.pow(x, -1.5)
function code(x)
	return Float64(0.5 * (x ^ -1.5))
end
function tmp = code(x)
	tmp = 0.5 * (x ^ -1.5);
end
code[x_] := N[(0.5 * N[Power[x, -1.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
0.5 \cdot {x}^{-1.5}
\end{array}
Derivation
  1. Initial program 39.2%

    \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. flip--39.1%

      \[\leadsto \color{blue}{\frac{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}} \]
    2. clear-num39.1%

      \[\leadsto \color{blue}{\frac{1}{\frac{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}}} \]
    3. inv-pow39.1%

      \[\leadsto \frac{1}{\frac{\color{blue}{{\left(\sqrt{x}\right)}^{-1}} + \frac{1}{\sqrt{x + 1}}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
    4. sqrt-pow239.1%

      \[\leadsto \frac{1}{\frac{\color{blue}{{x}^{\left(\frac{-1}{2}\right)}} + \frac{1}{\sqrt{x + 1}}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
    5. metadata-eval39.1%

      \[\leadsto \frac{1}{\frac{{x}^{\color{blue}{-0.5}} + \frac{1}{\sqrt{x + 1}}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
    6. inv-pow39.1%

      \[\leadsto \frac{1}{\frac{{x}^{-0.5} + \color{blue}{{\left(\sqrt{x + 1}\right)}^{-1}}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
    7. sqrt-pow239.1%

      \[\leadsto \frac{1}{\frac{{x}^{-0.5} + \color{blue}{{\left(x + 1\right)}^{\left(\frac{-1}{2}\right)}}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
    8. +-commutative39.1%

      \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\color{blue}{\left(1 + x\right)}}^{\left(\frac{-1}{2}\right)}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
    9. metadata-eval39.1%

      \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{\color{blue}{-0.5}}}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
    10. frac-times22.1%

      \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\color{blue}{\frac{1 \cdot 1}{\sqrt{x} \cdot \sqrt{x}}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
    11. metadata-eval22.1%

      \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\frac{\color{blue}{1}}{\sqrt{x} \cdot \sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
    12. add-sqr-sqrt18.7%

      \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\frac{1}{\color{blue}{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}} \]
    13. frac-times22.1%

      \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\frac{1}{x} - \color{blue}{\frac{1 \cdot 1}{\sqrt{x + 1} \cdot \sqrt{x + 1}}}}} \]
    14. metadata-eval22.1%

      \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\frac{1}{x} - \frac{\color{blue}{1}}{\sqrt{x + 1} \cdot \sqrt{x + 1}}}} \]
    15. add-sqr-sqrt39.3%

      \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\frac{1}{x} - \frac{1}{\color{blue}{x + 1}}}} \]
    16. +-commutative39.3%

      \[\leadsto \frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\frac{1}{x} - \frac{1}{\color{blue}{1 + x}}}} \]
  4. Applied egg-rr39.3%

    \[\leadsto \color{blue}{\frac{1}{\frac{{x}^{-0.5} + {\left(1 + x\right)}^{-0.5}}{\frac{1}{x} - \frac{1}{1 + x}}}} \]
  5. Taylor expanded in x around inf 66.4%

    \[\leadsto \frac{1}{\color{blue}{2 \cdot \sqrt{{x}^{3}}}} \]
  6. Step-by-step derivation
    1. *-un-lft-identity66.4%

      \[\leadsto \color{blue}{1 \cdot \frac{1}{2 \cdot \sqrt{{x}^{3}}}} \]
    2. associate-/r*66.4%

      \[\leadsto 1 \cdot \color{blue}{\frac{\frac{1}{2}}{\sqrt{{x}^{3}}}} \]
    3. metadata-eval66.4%

      \[\leadsto 1 \cdot \frac{\color{blue}{0.5}}{\sqrt{{x}^{3}}} \]
    4. div-inv66.4%

      \[\leadsto 1 \cdot \color{blue}{\left(0.5 \cdot \frac{1}{\sqrt{{x}^{3}}}\right)} \]
    5. metadata-eval66.4%

      \[\leadsto 1 \cdot \left(0.5 \cdot \frac{\color{blue}{1 \cdot 1}}{\sqrt{{x}^{3}}}\right) \]
    6. unpow366.4%

      \[\leadsto 1 \cdot \left(0.5 \cdot \frac{1 \cdot 1}{\sqrt{\color{blue}{\left(x \cdot x\right) \cdot x}}}\right) \]
    7. sqrt-prod80.3%

      \[\leadsto 1 \cdot \left(0.5 \cdot \frac{1 \cdot 1}{\color{blue}{\sqrt{x \cdot x} \cdot \sqrt{x}}}\right) \]
    8. sqrt-unprod95.6%

      \[\leadsto 1 \cdot \left(0.5 \cdot \frac{1 \cdot 1}{\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \sqrt{x}}\right) \]
    9. add-sqr-sqrt96.0%

      \[\leadsto 1 \cdot \left(0.5 \cdot \frac{1 \cdot 1}{\color{blue}{x} \cdot \sqrt{x}}\right) \]
    10. /-rgt-identity96.0%

      \[\leadsto 1 \cdot \left(0.5 \cdot \frac{1 \cdot 1}{\color{blue}{\frac{x}{1}} \cdot \sqrt{x}}\right) \]
    11. frac-times97.7%

      \[\leadsto 1 \cdot \left(0.5 \cdot \color{blue}{\left(\frac{1}{\frac{x}{1}} \cdot \frac{1}{\sqrt{x}}\right)}\right) \]
    12. clear-num97.7%

      \[\leadsto 1 \cdot \left(0.5 \cdot \left(\color{blue}{\frac{1}{x}} \cdot \frac{1}{\sqrt{x}}\right)\right) \]
    13. metadata-eval97.7%

      \[\leadsto 1 \cdot \left(0.5 \cdot \left(\frac{1}{x} \cdot \frac{\color{blue}{\sqrt{1}}}{\sqrt{x}}\right)\right) \]
    14. sqrt-div97.7%

      \[\leadsto 1 \cdot \left(0.5 \cdot \left(\frac{1}{x} \cdot \color{blue}{\sqrt{\frac{1}{x}}}\right)\right) \]
    15. add-sqr-sqrt97.3%

      \[\leadsto 1 \cdot \left(0.5 \cdot \left(\color{blue}{\left(\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}\right)} \cdot \sqrt{\frac{1}{x}}\right)\right) \]
    16. pow397.3%

      \[\leadsto 1 \cdot \left(0.5 \cdot \color{blue}{{\left(\sqrt{\frac{1}{x}}\right)}^{3}}\right) \]
    17. inv-pow97.3%

      \[\leadsto 1 \cdot \left(0.5 \cdot {\left(\sqrt{\color{blue}{{x}^{-1}}}\right)}^{3}\right) \]
    18. sqrt-pow197.4%

      \[\leadsto 1 \cdot \left(0.5 \cdot {\color{blue}{\left({x}^{\left(\frac{-1}{2}\right)}\right)}}^{3}\right) \]
    19. metadata-eval97.4%

      \[\leadsto 1 \cdot \left(0.5 \cdot {\left({x}^{\color{blue}{-0.5}}\right)}^{3}\right) \]
    20. pow-pow98.1%

      \[\leadsto 1 \cdot \left(0.5 \cdot \color{blue}{{x}^{\left(-0.5 \cdot 3\right)}}\right) \]
    21. metadata-eval98.1%

      \[\leadsto 1 \cdot \left(0.5 \cdot {x}^{\color{blue}{-1.5}}\right) \]
  7. Applied egg-rr98.1%

    \[\leadsto \color{blue}{1 \cdot \left(0.5 \cdot {x}^{-1.5}\right)} \]
  8. Step-by-step derivation
    1. *-lft-identity98.1%

      \[\leadsto \color{blue}{0.5 \cdot {x}^{-1.5}} \]
  9. Simplified98.1%

    \[\leadsto \color{blue}{0.5 \cdot {x}^{-1.5}} \]
  10. Final simplification98.1%

    \[\leadsto 0.5 \cdot {x}^{-1.5} \]
  11. Add Preprocessing

Alternative 4: 35.1% accurate, 209.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(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}
Derivation
  1. Initial program 39.2%

    \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf 36.5%

    \[\leadsto \color{blue}{0} \]
  4. Final simplification36.5%

    \[\leadsto 0 \]
  5. Add Preprocessing

Developer target: 98.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{1}{\left(x + 1\right) \cdot \sqrt{x} + x \cdot \sqrt{x + 1}} \end{array} \]
(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}

Reproduce

?
herbie shell --seed 2024040 
(FPCore (x)
  :name "2isqrt (example 3.6)"
  :precision binary64
  :pre (and (> x 1.0) (< x 1e+308))

  :herbie-target
  (/ 1.0 (+ (* (+ x 1.0) (sqrt x)) (* x (sqrt (+ x 1.0)))))

  (- (/ 1.0 (sqrt x)) (/ 1.0 (sqrt (+ x 1.0)))))