2isqrt (example 3.6)

Percentage Accurate: 38.4% → 99.0%
Time: 15.1s
Alternatives: 5
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 5 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: 38.4% 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.0% accurate, 0.5× speedup?

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

\\
\frac{\left(0.5 \cdot \sqrt{\frac{1}{x}} + {x}^{-2.5} \cdot 0.3125\right) + \sqrt{{x}^{-3}} \cdot -0.375}{x}
\end{array}
Derivation
  1. Initial program 39.0%

    \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. expm1-log1p-u39.0%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{x}}\right)\right)} - \frac{1}{\sqrt{x + 1}} \]
    2. expm1-undefine4.7%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{1}{\sqrt{x}}\right)} - 1\right)} - \frac{1}{\sqrt{x + 1}} \]
    3. inv-pow4.7%

      \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{{\left(\sqrt{x}\right)}^{-1}}\right)} - 1\right) - \frac{1}{\sqrt{x + 1}} \]
    4. sqrt-pow24.7%

      \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{{x}^{\left(\frac{-1}{2}\right)}}\right)} - 1\right) - \frac{1}{\sqrt{x + 1}} \]
    5. metadata-eval4.7%

      \[\leadsto \left(e^{\mathsf{log1p}\left({x}^{\color{blue}{-0.5}}\right)} - 1\right) - \frac{1}{\sqrt{x + 1}} \]
  4. Applied egg-rr4.7%

    \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left({x}^{-0.5}\right)} - 1\right)} - \frac{1}{\sqrt{x + 1}} \]
  5. Step-by-step derivation
    1. sub-neg4.7%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left({x}^{-0.5}\right)} + \left(-1\right)\right)} - \frac{1}{\sqrt{x + 1}} \]
    2. log1p-undefine4.7%

      \[\leadsto \left(e^{\color{blue}{\log \left(1 + {x}^{-0.5}\right)}} + \left(-1\right)\right) - \frac{1}{\sqrt{x + 1}} \]
    3. rem-exp-log4.7%

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

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

      \[\leadsto \left(\left({x}^{-0.5} + 1\right) + \color{blue}{-1}\right) - \frac{1}{\sqrt{x + 1}} \]
    6. associate-+l+31.1%

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

      \[\leadsto \left({x}^{-0.5} + \color{blue}{0}\right) - \frac{1}{\sqrt{x + 1}} \]
    8. +-rgt-identity31.1%

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

    \[\leadsto \color{blue}{{x}^{-0.5}} - \frac{1}{\sqrt{x + 1}} \]
  7. Step-by-step derivation
    1. metadata-eval31.1%

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

      \[\leadsto \color{blue}{{\left({x}^{0.25}\right)}^{-2}} - \frac{1}{\sqrt{x + 1}} \]
    3. sqr-pow21.7%

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

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

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

      \[\leadsto \left({\left({x}^{0.25}\right)}^{\color{blue}{-1}} + \sqrt{\frac{1}{\sqrt{x + 1}}}\right) \cdot \left({\left({x}^{0.25}\right)}^{\left(\frac{-2}{2}\right)} - \sqrt{\frac{1}{\sqrt{x + 1}}}\right) \]
    7. pow-pow32.1%

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

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

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

      \[\leadsto \left({x}^{-0.25} + \sqrt{{\left(\sqrt{\color{blue}{1 + x}}\right)}^{-1}}\right) \cdot \left({\left({x}^{0.25}\right)}^{\left(\frac{-2}{2}\right)} - \sqrt{\frac{1}{\sqrt{x + 1}}}\right) \]
    11. sqrt-pow232.1%

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

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

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

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

    \[\leadsto \color{blue}{\left({x}^{-0.25} + {\left(1 + x\right)}^{-0.25}\right) \cdot \left({x}^{-0.25} - {\left(1 + x\right)}^{-0.25}\right)} \]
  9. Taylor expanded in x around inf 99.4%

    \[\leadsto \color{blue}{\frac{-0.3125 \cdot \sqrt{\frac{1}{{x}^{3}}} + \left(-0.0625 \cdot \sqrt{\frac{1}{{x}^{3}}} + \left(0.078125 \cdot \sqrt{\frac{1}{{x}^{5}}} + \left(0.234375 \cdot \sqrt{\frac{1}{{x}^{5}}} + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)\right)}{x}} \]
  10. Step-by-step derivation
    1. Simplified99.4%

      \[\leadsto \color{blue}{\frac{\left(0.5 \cdot \sqrt{\frac{1}{x}} + \sqrt{\frac{1}{{x}^{5}}} \cdot 0.3125\right) + \sqrt{{x}^{-3}} \cdot -0.375}{x}} \]
    2. Step-by-step derivation
      1. *-un-lft-identity99.4%

        \[\leadsto \frac{\left(0.5 \cdot \sqrt{\frac{1}{x}} + \color{blue}{\left(1 \cdot \sqrt{\frac{1}{{x}^{5}}}\right)} \cdot 0.3125\right) + \sqrt{{x}^{-3}} \cdot -0.375}{x} \]
      2. pow1/299.4%

        \[\leadsto \frac{\left(0.5 \cdot \sqrt{\frac{1}{x}} + \left(1 \cdot \color{blue}{{\left(\frac{1}{{x}^{5}}\right)}^{0.5}}\right) \cdot 0.3125\right) + \sqrt{{x}^{-3}} \cdot -0.375}{x} \]
      3. pow-flip99.4%

        \[\leadsto \frac{\left(0.5 \cdot \sqrt{\frac{1}{x}} + \left(1 \cdot {\color{blue}{\left({x}^{\left(-5\right)}\right)}}^{0.5}\right) \cdot 0.3125\right) + \sqrt{{x}^{-3}} \cdot -0.375}{x} \]
      4. pow-pow99.4%

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

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

        \[\leadsto \frac{\left(0.5 \cdot \sqrt{\frac{1}{x}} + \left(1 \cdot {x}^{\color{blue}{-2.5}}\right) \cdot 0.3125\right) + \sqrt{{x}^{-3}} \cdot -0.375}{x} \]
    3. Applied egg-rr99.4%

      \[\leadsto \frac{\left(0.5 \cdot \sqrt{\frac{1}{x}} + \color{blue}{\left(1 \cdot {x}^{-2.5}\right)} \cdot 0.3125\right) + \sqrt{{x}^{-3}} \cdot -0.375}{x} \]
    4. Step-by-step derivation
      1. *-lft-identity99.4%

        \[\leadsto \frac{\left(0.5 \cdot \sqrt{\frac{1}{x}} + \color{blue}{{x}^{-2.5}} \cdot 0.3125\right) + \sqrt{{x}^{-3}} \cdot -0.375}{x} \]
    5. Simplified99.4%

      \[\leadsto \frac{\left(0.5 \cdot \sqrt{\frac{1}{x}} + \color{blue}{{x}^{-2.5}} \cdot 0.3125\right) + \sqrt{{x}^{-3}} \cdot -0.375}{x} \]
    6. Final simplification99.4%

      \[\leadsto \frac{\left(0.5 \cdot \sqrt{\frac{1}{x}} + {x}^{-2.5} \cdot 0.3125\right) + \sqrt{{x}^{-3}} \cdot -0.375}{x} \]
    7. Add Preprocessing

    Alternative 2: 98.6% accurate, 0.7× speedup?

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

      \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. expm1-log1p-u39.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{x}}\right)\right)} - \frac{1}{\sqrt{x + 1}} \]
      2. expm1-undefine4.7%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{1}{\sqrt{x}}\right)} - 1\right)} - \frac{1}{\sqrt{x + 1}} \]
      3. inv-pow4.7%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{{\left(\sqrt{x}\right)}^{-1}}\right)} - 1\right) - \frac{1}{\sqrt{x + 1}} \]
      4. sqrt-pow24.7%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{{x}^{\left(\frac{-1}{2}\right)}}\right)} - 1\right) - \frac{1}{\sqrt{x + 1}} \]
      5. metadata-eval4.7%

        \[\leadsto \left(e^{\mathsf{log1p}\left({x}^{\color{blue}{-0.5}}\right)} - 1\right) - \frac{1}{\sqrt{x + 1}} \]
    4. Applied egg-rr4.7%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left({x}^{-0.5}\right)} - 1\right)} - \frac{1}{\sqrt{x + 1}} \]
    5. Step-by-step derivation
      1. sub-neg4.7%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left({x}^{-0.5}\right)} + \left(-1\right)\right)} - \frac{1}{\sqrt{x + 1}} \]
      2. log1p-undefine4.7%

        \[\leadsto \left(e^{\color{blue}{\log \left(1 + {x}^{-0.5}\right)}} + \left(-1\right)\right) - \frac{1}{\sqrt{x + 1}} \]
      3. rem-exp-log4.7%

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

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

        \[\leadsto \left(\left({x}^{-0.5} + 1\right) + \color{blue}{-1}\right) - \frac{1}{\sqrt{x + 1}} \]
      6. associate-+l+31.1%

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

        \[\leadsto \left({x}^{-0.5} + \color{blue}{0}\right) - \frac{1}{\sqrt{x + 1}} \]
      8. +-rgt-identity31.1%

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

      \[\leadsto \color{blue}{{x}^{-0.5}} - \frac{1}{\sqrt{x + 1}} \]
    7. Step-by-step derivation
      1. metadata-eval31.1%

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

        \[\leadsto \color{blue}{{\left({x}^{0.25}\right)}^{-2}} - \frac{1}{\sqrt{x + 1}} \]
      3. sqr-pow21.7%

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

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

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

        \[\leadsto \left({\left({x}^{0.25}\right)}^{\color{blue}{-1}} + \sqrt{\frac{1}{\sqrt{x + 1}}}\right) \cdot \left({\left({x}^{0.25}\right)}^{\left(\frac{-2}{2}\right)} - \sqrt{\frac{1}{\sqrt{x + 1}}}\right) \]
      7. pow-pow32.1%

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

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

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

        \[\leadsto \left({x}^{-0.25} + \sqrt{{\left(\sqrt{\color{blue}{1 + x}}\right)}^{-1}}\right) \cdot \left({\left({x}^{0.25}\right)}^{\left(\frac{-2}{2}\right)} - \sqrt{\frac{1}{\sqrt{x + 1}}}\right) \]
      11. sqrt-pow232.1%

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

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

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

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

      \[\leadsto \color{blue}{\left({x}^{-0.25} + {\left(1 + x\right)}^{-0.25}\right) \cdot \left({x}^{-0.25} - {\left(1 + x\right)}^{-0.25}\right)} \]
    9. Taylor expanded in x around inf 99.2%

      \[\leadsto \color{blue}{\frac{-0.3125 \cdot \sqrt{\frac{1}{{x}^{3}}} + \left(-0.0625 \cdot \sqrt{\frac{1}{{x}^{3}}} + 0.5 \cdot \sqrt{\frac{1}{x}}\right)}{x}} \]
    10. Step-by-step derivation
      1. associate-+r+99.2%

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

        \[\leadsto \frac{\color{blue}{0.5 \cdot \sqrt{\frac{1}{x}} + \left(-0.3125 \cdot \sqrt{\frac{1}{{x}^{3}}} + -0.0625 \cdot \sqrt{\frac{1}{{x}^{3}}}\right)}}{x} \]
      3. distribute-rgt-out99.2%

        \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{x}} + \color{blue}{\sqrt{\frac{1}{{x}^{3}}} \cdot \left(-0.3125 + -0.0625\right)}}{x} \]
      4. exp-to-pow99.2%

        \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{x}} + \sqrt{\frac{1}{\color{blue}{e^{\log x \cdot 3}}}} \cdot \left(-0.3125 + -0.0625\right)}{x} \]
      5. *-commutative99.2%

        \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{x}} + \sqrt{\frac{1}{e^{\color{blue}{3 \cdot \log x}}}} \cdot \left(-0.3125 + -0.0625\right)}{x} \]
      6. rec-exp99.2%

        \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{x}} + \sqrt{\color{blue}{e^{-3 \cdot \log x}}} \cdot \left(-0.3125 + -0.0625\right)}{x} \]
      7. mul-1-neg99.2%

        \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{x}} + \sqrt{e^{\color{blue}{-1 \cdot \left(3 \cdot \log x\right)}}} \cdot \left(-0.3125 + -0.0625\right)}{x} \]
      8. associate-*r*99.2%

        \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{x}} + \sqrt{e^{\color{blue}{\left(-1 \cdot 3\right) \cdot \log x}}} \cdot \left(-0.3125 + -0.0625\right)}{x} \]
      9. metadata-eval99.2%

        \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{x}} + \sqrt{e^{\color{blue}{-3} \cdot \log x}} \cdot \left(-0.3125 + -0.0625\right)}{x} \]
      10. *-commutative99.2%

        \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{x}} + \sqrt{e^{\color{blue}{\log x \cdot -3}}} \cdot \left(-0.3125 + -0.0625\right)}{x} \]
      11. exp-to-pow99.2%

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

        \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{x}} + \sqrt{{x}^{-3}} \cdot \color{blue}{-0.375}}{x} \]
    11. Simplified99.2%

      \[\leadsto \color{blue}{\frac{0.5 \cdot \sqrt{\frac{1}{x}} + \sqrt{{x}^{-3}} \cdot -0.375}{x}} \]
    12. Final simplification99.2%

      \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{x}} + \sqrt{{x}^{-3}} \cdot -0.375}{x} \]
    13. Add Preprocessing

    Alternative 3: 98.0% accurate, 1.0× speedup?

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

      \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. expm1-log1p-u39.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{x}}\right)\right)} - \frac{1}{\sqrt{x + 1}} \]
      2. expm1-undefine4.7%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{1}{\sqrt{x}}\right)} - 1\right)} - \frac{1}{\sqrt{x + 1}} \]
      3. inv-pow4.7%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{{\left(\sqrt{x}\right)}^{-1}}\right)} - 1\right) - \frac{1}{\sqrt{x + 1}} \]
      4. sqrt-pow24.7%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{{x}^{\left(\frac{-1}{2}\right)}}\right)} - 1\right) - \frac{1}{\sqrt{x + 1}} \]
      5. metadata-eval4.7%

        \[\leadsto \left(e^{\mathsf{log1p}\left({x}^{\color{blue}{-0.5}}\right)} - 1\right) - \frac{1}{\sqrt{x + 1}} \]
    4. Applied egg-rr4.7%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left({x}^{-0.5}\right)} - 1\right)} - \frac{1}{\sqrt{x + 1}} \]
    5. Step-by-step derivation
      1. sub-neg4.7%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left({x}^{-0.5}\right)} + \left(-1\right)\right)} - \frac{1}{\sqrt{x + 1}} \]
      2. log1p-undefine4.7%

        \[\leadsto \left(e^{\color{blue}{\log \left(1 + {x}^{-0.5}\right)}} + \left(-1\right)\right) - \frac{1}{\sqrt{x + 1}} \]
      3. rem-exp-log4.7%

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

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

        \[\leadsto \left(\left({x}^{-0.5} + 1\right) + \color{blue}{-1}\right) - \frac{1}{\sqrt{x + 1}} \]
      6. associate-+l+31.1%

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

        \[\leadsto \left({x}^{-0.5} + \color{blue}{0}\right) - \frac{1}{\sqrt{x + 1}} \]
      8. +-rgt-identity31.1%

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

      \[\leadsto \color{blue}{{x}^{-0.5}} - \frac{1}{\sqrt{x + 1}} \]
    7. Taylor expanded in x around inf 85.0%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot \sqrt{\frac{1}{x}} - -0.5 \cdot \sqrt{x}}{{x}^{2}}} \]
    8. Step-by-step derivation
      1. distribute-lft-out--85.0%

        \[\leadsto \frac{\color{blue}{-0.5 \cdot \left(\sqrt{\frac{1}{x}} - \sqrt{x}\right)}}{{x}^{2}} \]
      2. associate-/l*85.0%

        \[\leadsto \color{blue}{-0.5 \cdot \frac{\sqrt{\frac{1}{x}} - \sqrt{x}}{{x}^{2}}} \]
      3. unpow1/285.0%

        \[\leadsto -0.5 \cdot \frac{\color{blue}{{\left(\frac{1}{x}\right)}^{0.5}} - \sqrt{x}}{{x}^{2}} \]
      4. exp-to-pow85.0%

        \[\leadsto -0.5 \cdot \frac{\color{blue}{e^{\log \left(\frac{1}{x}\right) \cdot 0.5}} - \sqrt{x}}{{x}^{2}} \]
      5. log-rec85.0%

        \[\leadsto -0.5 \cdot \frac{e^{\color{blue}{\left(-\log x\right)} \cdot 0.5} - \sqrt{x}}{{x}^{2}} \]
      6. distribute-lft-neg-out85.0%

        \[\leadsto -0.5 \cdot \frac{e^{\color{blue}{-\log x \cdot 0.5}} - \sqrt{x}}{{x}^{2}} \]
      7. distribute-rgt-neg-in85.0%

        \[\leadsto -0.5 \cdot \frac{e^{\color{blue}{\log x \cdot \left(-0.5\right)}} - \sqrt{x}}{{x}^{2}} \]
      8. metadata-eval85.0%

        \[\leadsto -0.5 \cdot \frac{e^{\log x \cdot \color{blue}{-0.5}} - \sqrt{x}}{{x}^{2}} \]
      9. exp-to-pow85.0%

        \[\leadsto -0.5 \cdot \frac{\color{blue}{{x}^{-0.5}} - \sqrt{x}}{{x}^{2}} \]
    9. Simplified85.0%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{{x}^{-0.5} - \sqrt{x}}{{x}^{2}}} \]
    10. Step-by-step derivation
      1. div-sub85.0%

        \[\leadsto -0.5 \cdot \color{blue}{\left(\frac{{x}^{-0.5}}{{x}^{2}} - \frac{\sqrt{x}}{{x}^{2}}\right)} \]
      2. pow1/285.0%

        \[\leadsto -0.5 \cdot \left(\frac{{x}^{-0.5}}{{x}^{2}} - \frac{\color{blue}{{x}^{0.5}}}{{x}^{2}}\right) \]
      3. pow-div98.7%

        \[\leadsto -0.5 \cdot \left(\frac{{x}^{-0.5}}{{x}^{2}} - \color{blue}{{x}^{\left(0.5 - 2\right)}}\right) \]
      4. metadata-eval98.7%

        \[\leadsto -0.5 \cdot \left(\frac{{x}^{-0.5}}{{x}^{2}} - {x}^{\color{blue}{-1.5}}\right) \]
      5. metadata-eval98.7%

        \[\leadsto -0.5 \cdot \left(\frac{{x}^{-0.5}}{{x}^{2}} - {x}^{\color{blue}{\left(\frac{-3}{2}\right)}}\right) \]
      6. sqrt-pow171.3%

        \[\leadsto -0.5 \cdot \left(\frac{{x}^{-0.5}}{{x}^{2}} - \color{blue}{\sqrt{{x}^{-3}}}\right) \]
      7. pow-div71.3%

        \[\leadsto -0.5 \cdot \left(\color{blue}{{x}^{\left(-0.5 - 2\right)}} - \sqrt{{x}^{-3}}\right) \]
      8. metadata-eval71.3%

        \[\leadsto -0.5 \cdot \left({x}^{\color{blue}{-2.5}} - \sqrt{{x}^{-3}}\right) \]
      9. metadata-eval71.3%

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

        \[\leadsto -0.5 \cdot \left({x}^{\left(\frac{\color{blue}{-5}}{2}\right)} - \sqrt{{x}^{-3}}\right) \]
      11. sqrt-pow171.3%

        \[\leadsto -0.5 \cdot \left(\color{blue}{\sqrt{{x}^{\left(-5\right)}}} - \sqrt{{x}^{-3}}\right) \]
      12. pow-flip71.3%

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

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

        \[\leadsto -0.5 \cdot \left(\sqrt{\color{blue}{{x}^{\left(-5\right)}}} + \left(-\sqrt{{x}^{-3}}\right)\right) \]
      15. sqrt-pow171.3%

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

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

        \[\leadsto -0.5 \cdot \left({x}^{\color{blue}{-2.5}} + \left(-\sqrt{{x}^{-3}}\right)\right) \]
      18. sqrt-pow198.7%

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

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

      \[\leadsto -0.5 \cdot \color{blue}{\left({x}^{-2.5} + \left(-{x}^{-1.5}\right)\right)} \]
    12. Step-by-step derivation
      1. sub-neg98.7%

        \[\leadsto -0.5 \cdot \color{blue}{\left({x}^{-2.5} - {x}^{-1.5}\right)} \]
    13. Simplified98.7%

      \[\leadsto -0.5 \cdot \color{blue}{\left({x}^{-2.5} - {x}^{-1.5}\right)} \]
    14. Final simplification98.7%

      \[\leadsto -0.5 \cdot \left({x}^{-2.5} - {x}^{-1.5}\right) \]
    15. Add Preprocessing

    Alternative 4: 97.9% 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.0%

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

      \[\leadsto \color{blue}{0.5 \cdot \sqrt{\frac{1}{{x}^{3}}}} \]
    4. Step-by-step derivation
      1. pow170.3%

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

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

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

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

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

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

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

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

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

    Alternative 5: 5.6% accurate, 2.0× speedup?

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

      \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. expm1-log1p-u39.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{x}}\right)\right)} - \frac{1}{\sqrt{x + 1}} \]
      2. expm1-undefine4.7%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{1}{\sqrt{x}}\right)} - 1\right)} - \frac{1}{\sqrt{x + 1}} \]
      3. inv-pow4.7%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{{\left(\sqrt{x}\right)}^{-1}}\right)} - 1\right) - \frac{1}{\sqrt{x + 1}} \]
      4. sqrt-pow24.7%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{{x}^{\left(\frac{-1}{2}\right)}}\right)} - 1\right) - \frac{1}{\sqrt{x + 1}} \]
      5. metadata-eval4.7%

        \[\leadsto \left(e^{\mathsf{log1p}\left({x}^{\color{blue}{-0.5}}\right)} - 1\right) - \frac{1}{\sqrt{x + 1}} \]
    4. Applied egg-rr4.7%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left({x}^{-0.5}\right)} - 1\right)} - \frac{1}{\sqrt{x + 1}} \]
    5. Step-by-step derivation
      1. sub-neg4.7%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left({x}^{-0.5}\right)} + \left(-1\right)\right)} - \frac{1}{\sqrt{x + 1}} \]
      2. log1p-undefine4.7%

        \[\leadsto \left(e^{\color{blue}{\log \left(1 + {x}^{-0.5}\right)}} + \left(-1\right)\right) - \frac{1}{\sqrt{x + 1}} \]
      3. rem-exp-log4.7%

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

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

        \[\leadsto \left(\left({x}^{-0.5} + 1\right) + \color{blue}{-1}\right) - \frac{1}{\sqrt{x + 1}} \]
      6. associate-+l+31.1%

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

        \[\leadsto \left({x}^{-0.5} + \color{blue}{0}\right) - \frac{1}{\sqrt{x + 1}} \]
      8. +-rgt-identity31.1%

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

      \[\leadsto \color{blue}{{x}^{-0.5}} - \frac{1}{\sqrt{x + 1}} \]
    7. Taylor expanded in x around 0 5.6%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{x}}} \]
    8. Step-by-step derivation
      1. unpow1/25.6%

        \[\leadsto \color{blue}{{\left(\frac{1}{x}\right)}^{0.5}} \]
      2. exp-to-pow5.6%

        \[\leadsto \color{blue}{e^{\log \left(\frac{1}{x}\right) \cdot 0.5}} \]
      3. log-rec5.6%

        \[\leadsto e^{\color{blue}{\left(-\log x\right)} \cdot 0.5} \]
      4. distribute-lft-neg-out5.6%

        \[\leadsto e^{\color{blue}{-\log x \cdot 0.5}} \]
      5. distribute-rgt-neg-in5.6%

        \[\leadsto e^{\color{blue}{\log x \cdot \left(-0.5\right)}} \]
      6. metadata-eval5.6%

        \[\leadsto e^{\log x \cdot \color{blue}{-0.5}} \]
      7. exp-to-pow5.6%

        \[\leadsto \color{blue}{{x}^{-0.5}} \]
    9. Simplified5.6%

      \[\leadsto \color{blue}{{x}^{-0.5}} \]
    10. Final simplification5.6%

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

    Developer target: 98.1% 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 2024080 
    (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)))))