2isqrt (example 3.6)

Percentage Accurate: 38.3% → 98.8%
Time: 9.3s
Alternatives: 6
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 6 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.3% 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: 98.8% accurate, 1.0× speedup?

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

\\
\frac{0.5 \cdot {x}^{-0.5} - {x}^{-0.5} \cdot \frac{0.375}{x}}{x}
\end{array}
Derivation
  1. Initial program 38.6%

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

    \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{5}}} \cdot \left(1 + 0.5 \cdot x\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}}} \]
  4. Step-by-step derivation
    1. distribute-rgt-in85.2%

      \[\leadsto \frac{-0.5 \cdot \color{blue}{\left(1 \cdot \sqrt{\frac{1}{{x}^{5}}} + \left(0.5 \cdot x\right) \cdot \sqrt{\frac{1}{{x}^{5}}}\right)} - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
    2. *-un-lft-identity85.2%

      \[\leadsto \frac{-0.5 \cdot \left(\color{blue}{\sqrt{\frac{1}{{x}^{5}}}} + \left(0.5 \cdot x\right) \cdot \sqrt{\frac{1}{{x}^{5}}}\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
    3. distribute-lft-in85.2%

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

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

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

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

      \[\leadsto \frac{\left(-0.5 \cdot {x}^{\color{blue}{-2.5}} + -0.5 \cdot \left(\left(0.5 \cdot x\right) \cdot \sqrt{\frac{1}{{x}^{5}}}\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
    8. *-commutative85.2%

      \[\leadsto \frac{\left(-0.5 \cdot {x}^{-2.5} + -0.5 \cdot \left(\color{blue}{\left(x \cdot 0.5\right)} \cdot \sqrt{\frac{1}{{x}^{5}}}\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
    9. pow-flip85.2%

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

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

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

      \[\leadsto \frac{\left(-0.5 \cdot {x}^{-2.5} + -0.5 \cdot \left(\left(x \cdot 0.5\right) \cdot {x}^{\color{blue}{-2.5}}\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
  5. Applied egg-rr85.2%

    \[\leadsto \frac{\color{blue}{\left(-0.5 \cdot {x}^{-2.5} + -0.5 \cdot \left(\left(x \cdot 0.5\right) \cdot {x}^{-2.5}\right)\right)} - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
  6. Step-by-step derivation
    1. associate-*r*85.2%

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

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

      \[\leadsto \frac{{x}^{-2.5} \cdot \left(-0.5 + -0.5 \cdot \color{blue}{\left(0.5 \cdot x\right)}\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
    4. associate-*r*85.2%

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

      \[\leadsto \frac{{x}^{-2.5} \cdot \left(-0.5 + \color{blue}{-0.25} \cdot x\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
    6. *-commutative85.2%

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

    \[\leadsto \frac{\color{blue}{{x}^{-2.5} \cdot \left(-0.5 + x \cdot -0.25\right)} - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
  8. Taylor expanded in x around inf 98.8%

    \[\leadsto \color{blue}{\frac{-1 \cdot \frac{-0.125 \cdot \sqrt{\frac{1}{x}} + 0.5 \cdot \sqrt{\frac{1}{x}}}{x} + 0.5 \cdot \sqrt{\frac{1}{x}}}{x}} \]
  9. Step-by-step derivation
    1. Simplified98.8%

      \[\leadsto \color{blue}{\frac{0.5 \cdot {x}^{-0.5} - {x}^{-0.5} \cdot \frac{0.375}{x}}{x}} \]
    2. Add Preprocessing

    Alternative 2: 98.8% accurate, 1.9× speedup?

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

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

      \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{5}}} \cdot \left(1 + 0.5 \cdot x\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}}} \]
    4. Step-by-step derivation
      1. distribute-rgt-in85.2%

        \[\leadsto \frac{-0.5 \cdot \color{blue}{\left(1 \cdot \sqrt{\frac{1}{{x}^{5}}} + \left(0.5 \cdot x\right) \cdot \sqrt{\frac{1}{{x}^{5}}}\right)} - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
      2. *-un-lft-identity85.2%

        \[\leadsto \frac{-0.5 \cdot \left(\color{blue}{\sqrt{\frac{1}{{x}^{5}}}} + \left(0.5 \cdot x\right) \cdot \sqrt{\frac{1}{{x}^{5}}}\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
      3. distribute-lft-in85.2%

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

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

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

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

        \[\leadsto \frac{\left(-0.5 \cdot {x}^{\color{blue}{-2.5}} + -0.5 \cdot \left(\left(0.5 \cdot x\right) \cdot \sqrt{\frac{1}{{x}^{5}}}\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
      8. *-commutative85.2%

        \[\leadsto \frac{\left(-0.5 \cdot {x}^{-2.5} + -0.5 \cdot \left(\color{blue}{\left(x \cdot 0.5\right)} \cdot \sqrt{\frac{1}{{x}^{5}}}\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
      9. pow-flip85.2%

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

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

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

        \[\leadsto \frac{\left(-0.5 \cdot {x}^{-2.5} + -0.5 \cdot \left(\left(x \cdot 0.5\right) \cdot {x}^{\color{blue}{-2.5}}\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
    5. Applied egg-rr85.2%

      \[\leadsto \frac{\color{blue}{\left(-0.5 \cdot {x}^{-2.5} + -0.5 \cdot \left(\left(x \cdot 0.5\right) \cdot {x}^{-2.5}\right)\right)} - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
    6. Step-by-step derivation
      1. associate-*r*85.2%

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

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

        \[\leadsto \frac{{x}^{-2.5} \cdot \left(-0.5 + -0.5 \cdot \color{blue}{\left(0.5 \cdot x\right)}\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
      4. associate-*r*85.2%

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

        \[\leadsto \frac{{x}^{-2.5} \cdot \left(-0.5 + \color{blue}{-0.25} \cdot x\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
      6. *-commutative85.2%

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

      \[\leadsto \frac{\color{blue}{{x}^{-2.5} \cdot \left(-0.5 + x \cdot -0.25\right)} - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
    8. Taylor expanded in x around inf 98.8%

      \[\leadsto \color{blue}{\frac{-1 \cdot \frac{-0.125 \cdot \sqrt{\frac{1}{x}} + 0.5 \cdot \sqrt{\frac{1}{x}}}{x} + 0.5 \cdot \sqrt{\frac{1}{x}}}{x}} \]
    9. Step-by-step derivation
      1. Simplified98.8%

        \[\leadsto \color{blue}{\frac{0.5 \cdot {x}^{-0.5} - {x}^{-0.5} \cdot \frac{0.375}{x}}{x}} \]
      2. Step-by-step derivation
        1. div-inv98.7%

          \[\leadsto \color{blue}{\left(0.5 \cdot {x}^{-0.5} - {x}^{-0.5} \cdot \frac{0.375}{x}\right) \cdot \frac{1}{x}} \]
        2. *-commutative98.7%

          \[\leadsto \left(\color{blue}{{x}^{-0.5} \cdot 0.5} - {x}^{-0.5} \cdot \frac{0.375}{x}\right) \cdot \frac{1}{x} \]
        3. distribute-lft-out--98.7%

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

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

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

          \[\leadsto \frac{\color{blue}{{x}^{-0.5} \cdot \left(0.5 - \frac{0.375}{x}\right)}}{x} \]
      5. Simplified98.8%

        \[\leadsto \color{blue}{\frac{{x}^{-0.5} \cdot \left(0.5 - \frac{0.375}{x}\right)}{x}} \]
      6. Add Preprocessing

      Alternative 3: 98.7% accurate, 1.9× speedup?

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

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

        \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{5}}} \cdot \left(1 + 0.5 \cdot x\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}}} \]
      4. Step-by-step derivation
        1. distribute-rgt-in85.2%

          \[\leadsto \frac{-0.5 \cdot \color{blue}{\left(1 \cdot \sqrt{\frac{1}{{x}^{5}}} + \left(0.5 \cdot x\right) \cdot \sqrt{\frac{1}{{x}^{5}}}\right)} - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
        2. *-un-lft-identity85.2%

          \[\leadsto \frac{-0.5 \cdot \left(\color{blue}{\sqrt{\frac{1}{{x}^{5}}}} + \left(0.5 \cdot x\right) \cdot \sqrt{\frac{1}{{x}^{5}}}\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
        3. distribute-lft-in85.2%

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

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

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

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

          \[\leadsto \frac{\left(-0.5 \cdot {x}^{\color{blue}{-2.5}} + -0.5 \cdot \left(\left(0.5 \cdot x\right) \cdot \sqrt{\frac{1}{{x}^{5}}}\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
        8. *-commutative85.2%

          \[\leadsto \frac{\left(-0.5 \cdot {x}^{-2.5} + -0.5 \cdot \left(\color{blue}{\left(x \cdot 0.5\right)} \cdot \sqrt{\frac{1}{{x}^{5}}}\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
        9. pow-flip85.2%

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

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

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

          \[\leadsto \frac{\left(-0.5 \cdot {x}^{-2.5} + -0.5 \cdot \left(\left(x \cdot 0.5\right) \cdot {x}^{\color{blue}{-2.5}}\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
      5. Applied egg-rr85.2%

        \[\leadsto \frac{\color{blue}{\left(-0.5 \cdot {x}^{-2.5} + -0.5 \cdot \left(\left(x \cdot 0.5\right) \cdot {x}^{-2.5}\right)\right)} - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
      6. Step-by-step derivation
        1. associate-*r*85.2%

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

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

          \[\leadsto \frac{{x}^{-2.5} \cdot \left(-0.5 + -0.5 \cdot \color{blue}{\left(0.5 \cdot x\right)}\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
        4. associate-*r*85.2%

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

          \[\leadsto \frac{{x}^{-2.5} \cdot \left(-0.5 + \color{blue}{-0.25} \cdot x\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
        6. *-commutative85.2%

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

        \[\leadsto \frac{\color{blue}{{x}^{-2.5} \cdot \left(-0.5 + x \cdot -0.25\right)} - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
      8. Taylor expanded in x around inf 98.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot \frac{-0.125 \cdot \sqrt{\frac{1}{x}} + 0.5 \cdot \sqrt{\frac{1}{x}}}{x} + 0.5 \cdot \sqrt{\frac{1}{x}}}{x}} \]
      9. Step-by-step derivation
        1. Simplified98.8%

          \[\leadsto \color{blue}{\frac{0.5 \cdot {x}^{-0.5} - {x}^{-0.5} \cdot \frac{0.375}{x}}{x}} \]
        2. Step-by-step derivation
          1. div-inv98.7%

            \[\leadsto \color{blue}{\left(0.5 \cdot {x}^{-0.5} - {x}^{-0.5} \cdot \frac{0.375}{x}\right) \cdot \frac{1}{x}} \]
          2. *-commutative98.7%

            \[\leadsto \left(\color{blue}{{x}^{-0.5} \cdot 0.5} - {x}^{-0.5} \cdot \frac{0.375}{x}\right) \cdot \frac{1}{x} \]
          3. distribute-lft-out--98.7%

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

          \[\leadsto \color{blue}{\left({x}^{-0.5} \cdot \left(0.5 - \frac{0.375}{x}\right)\right) \cdot \frac{1}{x}} \]
        4. Step-by-step derivation
          1. associate-*l*98.7%

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

            \[\leadsto {x}^{-0.5} \cdot \color{blue}{\frac{\left(0.5 - \frac{0.375}{x}\right) \cdot 1}{x}} \]
          3. *-rgt-identity98.7%

            \[\leadsto {x}^{-0.5} \cdot \frac{\color{blue}{0.5 - \frac{0.375}{x}}}{x} \]
          4. sub-neg98.7%

            \[\leadsto {x}^{-0.5} \cdot \frac{\color{blue}{0.5 + \left(-\frac{0.375}{x}\right)}}{x} \]
          5. distribute-neg-frac98.7%

            \[\leadsto {x}^{-0.5} \cdot \frac{0.5 + \color{blue}{\frac{-0.375}{x}}}{x} \]
          6. metadata-eval98.7%

            \[\leadsto {x}^{-0.5} \cdot \frac{0.5 + \frac{\color{blue}{-0.375}}{x}}{x} \]
        5. Simplified98.7%

          \[\leadsto \color{blue}{{x}^{-0.5} \cdot \frac{0.5 + \frac{-0.375}{x}}{x}} \]
        6. Add Preprocessing

        Alternative 4: 97.7% accurate, 2.0× speedup?

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

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

          \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{5}}} \cdot \left(1 + 0.5 \cdot x\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}}} \]
        4. Step-by-step derivation
          1. distribute-rgt-in85.2%

            \[\leadsto \frac{-0.5 \cdot \color{blue}{\left(1 \cdot \sqrt{\frac{1}{{x}^{5}}} + \left(0.5 \cdot x\right) \cdot \sqrt{\frac{1}{{x}^{5}}}\right)} - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
          2. *-un-lft-identity85.2%

            \[\leadsto \frac{-0.5 \cdot \left(\color{blue}{\sqrt{\frac{1}{{x}^{5}}}} + \left(0.5 \cdot x\right) \cdot \sqrt{\frac{1}{{x}^{5}}}\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
          3. distribute-lft-in85.2%

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

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

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

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

            \[\leadsto \frac{\left(-0.5 \cdot {x}^{\color{blue}{-2.5}} + -0.5 \cdot \left(\left(0.5 \cdot x\right) \cdot \sqrt{\frac{1}{{x}^{5}}}\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
          8. *-commutative85.2%

            \[\leadsto \frac{\left(-0.5 \cdot {x}^{-2.5} + -0.5 \cdot \left(\color{blue}{\left(x \cdot 0.5\right)} \cdot \sqrt{\frac{1}{{x}^{5}}}\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
          9. pow-flip85.2%

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

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

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

            \[\leadsto \frac{\left(-0.5 \cdot {x}^{-2.5} + -0.5 \cdot \left(\left(x \cdot 0.5\right) \cdot {x}^{\color{blue}{-2.5}}\right)\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
        5. Applied egg-rr85.2%

          \[\leadsto \frac{\color{blue}{\left(-0.5 \cdot {x}^{-2.5} + -0.5 \cdot \left(\left(x \cdot 0.5\right) \cdot {x}^{-2.5}\right)\right)} - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
        6. Step-by-step derivation
          1. associate-*r*85.2%

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

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

            \[\leadsto \frac{{x}^{-2.5} \cdot \left(-0.5 + -0.5 \cdot \color{blue}{\left(0.5 \cdot x\right)}\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
          4. associate-*r*85.2%

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

            \[\leadsto \frac{{x}^{-2.5} \cdot \left(-0.5 + \color{blue}{-0.25} \cdot x\right) - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
          6. *-commutative85.2%

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

          \[\leadsto \frac{\color{blue}{{x}^{-2.5} \cdot \left(-0.5 + x \cdot -0.25\right)} - \left(-0.5 \cdot \sqrt{x} + \left(-0.5 \cdot \left(\sqrt{\frac{1}{{x}^{3}}} \cdot \left(1 + 0.25 \cdot x\right)\right) + 0.5 \cdot \sqrt{\frac{1}{x}}\right)\right)}{{x}^{2}} \]
        8. Taylor expanded in x around inf 98.8%

          \[\leadsto \color{blue}{\frac{-1 \cdot \frac{-0.125 \cdot \sqrt{\frac{1}{x}} + 0.5 \cdot \sqrt{\frac{1}{x}}}{x} + 0.5 \cdot \sqrt{\frac{1}{x}}}{x}} \]
        9. Step-by-step derivation
          1. Simplified98.8%

            \[\leadsto \color{blue}{\frac{0.5 \cdot {x}^{-0.5} - {x}^{-0.5} \cdot \frac{0.375}{x}}{x}} \]
          2. Taylor expanded in x around inf 97.9%

            \[\leadsto \frac{\color{blue}{0.5 \cdot \sqrt{\frac{1}{x}}}}{x} \]
          3. Add Preprocessing

          Alternative 5: 36.8% accurate, 2.0× speedup?

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

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

            \[\leadsto \color{blue}{\sqrt{\frac{1}{x}}} \]
          4. Step-by-step derivation
            1. inv-pow5.6%

              \[\leadsto \sqrt{\color{blue}{{x}^{-1}}} \]
            2. sqrt-pow15.6%

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

              \[\leadsto {x}^{\color{blue}{-0.5}} \]
            4. sqr-pow5.6%

              \[\leadsto \color{blue}{{x}^{\left(\frac{-0.5}{2}\right)} \cdot {x}^{\left(\frac{-0.5}{2}\right)}} \]
            5. pow-prod-down37.2%

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

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

              \[\leadsto {\left({x}^{2}\right)}^{\color{blue}{-0.25}} \]
          5. Applied egg-rr37.2%

            \[\leadsto \color{blue}{{\left({x}^{2}\right)}^{-0.25}} \]
          6. Step-by-step derivation
            1. unpow237.2%

              \[\leadsto {\color{blue}{\left(x \cdot x\right)}}^{-0.25} \]
          7. Applied egg-rr37.2%

            \[\leadsto {\color{blue}{\left(x \cdot x\right)}}^{-0.25} \]
          8. Add Preprocessing

          Alternative 6: 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 38.6%

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

              \[\leadsto \color{blue}{\frac{1}{\sqrt{x}} + \left(-\frac{1}{\sqrt{x + 1}}\right)} \]
            2. inv-pow38.6%

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

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

              \[\leadsto {x}^{\color{blue}{-0.5}} + \left(-\frac{1}{\sqrt{x + 1}}\right) \]
            5. distribute-neg-frac27.4%

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

              \[\leadsto {x}^{-0.5} + \frac{\color{blue}{-1}}{\sqrt{x + 1}} \]
            7. +-commutative27.4%

              \[\leadsto {x}^{-0.5} + \frac{-1}{\sqrt{\color{blue}{1 + x}}} \]
          4. Applied egg-rr27.4%

            \[\leadsto \color{blue}{{x}^{-0.5} + \frac{-1}{\sqrt{1 + x}}} \]
          5. Step-by-step derivation
            1. *-rgt-identity27.4%

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

              \[\leadsto {x}^{-0.5} + \frac{-1}{\sqrt{1 + x}} \cdot \color{blue}{\left(--1\right)} \]
            3. distribute-rgt-neg-in27.4%

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

              \[\leadsto \color{blue}{{x}^{-0.5} - \frac{-1}{\sqrt{1 + x}} \cdot -1} \]
            5. associate-*l/27.4%

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

              \[\leadsto {x}^{-0.5} - \frac{\color{blue}{1}}{\sqrt{1 + x}} \]
            7. unpow1/227.4%

              \[\leadsto {x}^{-0.5} - \frac{1}{\color{blue}{{\left(1 + x\right)}^{0.5}}} \]
            8. exp-to-pow6.9%

              \[\leadsto {x}^{-0.5} - \frac{1}{\color{blue}{e^{\log \left(1 + x\right) \cdot 0.5}}} \]
            9. log1p-undefine6.9%

              \[\leadsto {x}^{-0.5} - \frac{1}{e^{\color{blue}{\mathsf{log1p}\left(x\right)} \cdot 0.5}} \]
            10. *-commutative6.9%

              \[\leadsto {x}^{-0.5} - \frac{1}{e^{\color{blue}{0.5 \cdot \mathsf{log1p}\left(x\right)}}} \]
            11. exp-neg6.9%

              \[\leadsto {x}^{-0.5} - \color{blue}{e^{-0.5 \cdot \mathsf{log1p}\left(x\right)}} \]
            12. *-commutative6.9%

              \[\leadsto {x}^{-0.5} - e^{-\color{blue}{\mathsf{log1p}\left(x\right) \cdot 0.5}} \]
            13. distribute-rgt-neg-in6.9%

              \[\leadsto {x}^{-0.5} - e^{\color{blue}{\mathsf{log1p}\left(x\right) \cdot \left(-0.5\right)}} \]
            14. log1p-undefine6.9%

              \[\leadsto {x}^{-0.5} - e^{\color{blue}{\log \left(1 + x\right)} \cdot \left(-0.5\right)} \]
            15. metadata-eval6.9%

              \[\leadsto {x}^{-0.5} - e^{\log \left(1 + x\right) \cdot \color{blue}{-0.5}} \]
            16. exp-to-pow38.6%

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

            \[\leadsto \color{blue}{{x}^{-0.5} - {\left(1 + x\right)}^{-0.5}} \]
          7. Taylor expanded in x around 0 5.6%

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

              \[\leadsto \sqrt{\color{blue}{{x}^{-1}}} \]
            2. metadata-eval5.6%

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

              \[\leadsto \sqrt{\color{blue}{{x}^{-0.5} \cdot {x}^{-0.5}}} \]
            4. rem-sqrt-square5.6%

              \[\leadsto \color{blue}{\left|{x}^{-0.5}\right|} \]
            5. metadata-eval5.6%

              \[\leadsto \left|{x}^{\color{blue}{\left(2 \cdot -0.25\right)}}\right| \]
            6. pow-sqr5.6%

              \[\leadsto \left|\color{blue}{{x}^{-0.25} \cdot {x}^{-0.25}}\right| \]
            7. fabs-sqr5.6%

              \[\leadsto \color{blue}{{x}^{-0.25} \cdot {x}^{-0.25}} \]
            8. pow-sqr5.6%

              \[\leadsto \color{blue}{{x}^{\left(2 \cdot -0.25\right)}} \]
            9. metadata-eval5.6%

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

            \[\leadsto \color{blue}{{x}^{-0.5}} \]
          10. Add Preprocessing

          Developer Target 1: 98.3% 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}
          

          Developer Target 2: 38.4% accurate, 1.0× speedup?

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

          Reproduce

          ?
          herbie shell --seed 2024181 
          (FPCore (x)
            :name "2isqrt (example 3.6)"
            :precision binary64
            :pre (and (> x 1.0) (< x 1e+308))
          
            :alt
            (! :herbie-platform default (/ 1 (+ (* (+ x 1) (sqrt x)) (* x (sqrt (+ x 1))))))
          
            :alt
            (! :herbie-platform default (- (pow x -1/2) (pow (+ x 1) -1/2)))
          
            (- (/ 1.0 (sqrt x)) (/ 1.0 (sqrt (+ x 1.0)))))