(sqrt(((x+1)/2)^2-(sqrt(x))^2)/acosh(((x+1)/2)/(sqrt(x))))

Percentage Accurate: 97.3% → 97.9%
Time: 5.7s
Alternatives: 11
Speedup: 1.9×

Specification

?
\[1 \leq x \land x \leq 10\]
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x + 1}{2}\\ \frac{\sqrt{{t\_0}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{t\_0}{\sqrt{x}}\right)} \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (/ (+ x 1.0) 2.0)))
   (/ (sqrt (- (pow t_0 2.0) (pow (sqrt x) 2.0))) (acosh (/ t_0 (sqrt x))))))
double code(double x) {
	double t_0 = (x + 1.0) / 2.0;
	return sqrt((pow(t_0, 2.0) - pow(sqrt(x), 2.0))) / acosh((t_0 / sqrt(x)));
}
def code(x):
	t_0 = (x + 1.0) / 2.0
	return math.sqrt((math.pow(t_0, 2.0) - math.pow(math.sqrt(x), 2.0))) / math.acosh((t_0 / math.sqrt(x)))
function code(x)
	t_0 = Float64(Float64(x + 1.0) / 2.0)
	return Float64(sqrt(Float64((t_0 ^ 2.0) - (sqrt(x) ^ 2.0))) / acosh(Float64(t_0 / sqrt(x))))
end
function tmp = code(x)
	t_0 = (x + 1.0) / 2.0;
	tmp = sqrt(((t_0 ^ 2.0) - (sqrt(x) ^ 2.0))) / acosh((t_0 / sqrt(x)));
end
code[x_] := Block[{t$95$0 = N[(N[(x + 1.0), $MachinePrecision] / 2.0), $MachinePrecision]}, N[(N[Sqrt[N[(N[Power[t$95$0, 2.0], $MachinePrecision] - N[Power[N[Sqrt[x], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[ArcCosh[N[(t$95$0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x + 1}{2}\\
\frac{\sqrt{{t\_0}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{t\_0}{\sqrt{x}}\right)}
\end{array}
\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 11 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: 97.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x + 1}{2}\\ \frac{\sqrt{{t\_0}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{t\_0}{\sqrt{x}}\right)} \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (/ (+ x 1.0) 2.0)))
   (/ (sqrt (- (pow t_0 2.0) (pow (sqrt x) 2.0))) (acosh (/ t_0 (sqrt x))))))
double code(double x) {
	double t_0 = (x + 1.0) / 2.0;
	return sqrt((pow(t_0, 2.0) - pow(sqrt(x), 2.0))) / acosh((t_0 / sqrt(x)));
}
def code(x):
	t_0 = (x + 1.0) / 2.0
	return math.sqrt((math.pow(t_0, 2.0) - math.pow(math.sqrt(x), 2.0))) / math.acosh((t_0 / math.sqrt(x)))
function code(x)
	t_0 = Float64(Float64(x + 1.0) / 2.0)
	return Float64(sqrt(Float64((t_0 ^ 2.0) - (sqrt(x) ^ 2.0))) / acosh(Float64(t_0 / sqrt(x))))
end
function tmp = code(x)
	t_0 = (x + 1.0) / 2.0;
	tmp = sqrt(((t_0 ^ 2.0) - (sqrt(x) ^ 2.0))) / acosh((t_0 / sqrt(x)));
end
code[x_] := Block[{t$95$0 = N[(N[(x + 1.0), $MachinePrecision] / 2.0), $MachinePrecision]}, N[(N[Sqrt[N[(N[Power[t$95$0, 2.0], $MachinePrecision] - N[Power[N[Sqrt[x], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[ArcCosh[N[(t$95$0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x + 1}{2}\\
\frac{\sqrt{{t\_0}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{t\_0}{\sqrt{x}}\right)}
\end{array}
\end{array}

Alternative 1: 97.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\mathsf{fma}\left({\left(1 + x\right)}^{2}, {\left(2 \cdot \sqrt{x}\right)}^{-2}, -1\right)}\right)\right)} \end{array} \]
(FPCore (x)
 :precision binary64
 (/
  (sqrt (- (pow (/ (+ x 1.0) 2.0) 2.0) (pow (sqrt x) 2.0)))
  (log
   (fma
    (/ 0.5 (sqrt x))
    (+ 1.0 x)
    (sqrt (fma (pow (+ 1.0 x) 2.0) (pow (* 2.0 (sqrt x)) -2.0) -1.0))))))
double code(double x) {
	return sqrt((pow(((x + 1.0) / 2.0), 2.0) - pow(sqrt(x), 2.0))) / log(fma((0.5 / sqrt(x)), (1.0 + x), sqrt(fma(pow((1.0 + x), 2.0), pow((2.0 * sqrt(x)), -2.0), -1.0))));
}
function code(x)
	return Float64(sqrt(Float64((Float64(Float64(x + 1.0) / 2.0) ^ 2.0) - (sqrt(x) ^ 2.0))) / log(fma(Float64(0.5 / sqrt(x)), Float64(1.0 + x), sqrt(fma((Float64(1.0 + x) ^ 2.0), (Float64(2.0 * sqrt(x)) ^ -2.0), -1.0)))))
end
code[x_] := N[(N[Sqrt[N[(N[Power[N[(N[(x + 1.0), $MachinePrecision] / 2.0), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[Sqrt[x], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Log[N[(N[(0.5 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(1.0 + x), $MachinePrecision] + N[Sqrt[N[(N[Power[N[(1.0 + x), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\mathsf{fma}\left({\left(1 + x\right)}^{2}, {\left(2 \cdot \sqrt{x}\right)}^{-2}, -1\right)}\right)\right)}
\end{array}
Derivation
  1. Initial program 97.2%

    \[\frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-acosh.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)}} \]
    2. acosh-defN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\log \left(\frac{\frac{x + 1}{2}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)}} \]
    3. lower-log.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\log \left(\frac{\frac{x + 1}{2}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)}} \]
    4. lift-/.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\color{blue}{\frac{\frac{x + 1}{2}}{\sqrt{x}}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    5. lift-/.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\frac{\color{blue}{\frac{x + 1}{2}}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    6. div-invN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\frac{\color{blue}{\left(x + 1\right) \cdot \frac{1}{2}}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    7. metadata-evalN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\frac{\left(x + 1\right) \cdot \color{blue}{\frac{1}{2}}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    8. associate-/l*N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\color{blue}{\left(x + 1\right) \cdot \frac{\frac{1}{2}}{\sqrt{x}}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    9. *-commutativeN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\color{blue}{\frac{\frac{1}{2}}{\sqrt{x}} \cdot \left(x + 1\right)} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    10. lower-fma.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \color{blue}{\left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, x + 1, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)}} \]
    11. lower-/.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\color{blue}{\frac{\frac{1}{2}}{\sqrt{x}}}, x + 1, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    12. lift-+.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, \color{blue}{x + 1}, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    13. +-commutativeN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, \color{blue}{1 + x}, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    14. lower-+.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, \color{blue}{1 + x}, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    15. lower-sqrt.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \color{blue}{\sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}}\right)\right)} \]
  4. Applied rewrites97.6%

    \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}}{x} - 1}\right)\right)}} \]
  5. Applied rewrites97.9%

    \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\color{blue}{\mathsf{fma}\left({\left(1 + x\right)}^{2}, {\left(2 \cdot \sqrt{x}\right)}^{-2}, -1\right)}}\right)\right)} \]
  6. Add Preprocessing

Alternative 2: 98.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}\\ \frac{\sqrt{t\_0 - x}}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{t\_0}{x} - 1}\right)\right)} \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (pow (fma 0.5 x 0.5) 2.0)))
   (/
    (sqrt (- t_0 x))
    (log (fma (/ 0.5 (sqrt x)) (+ 1.0 x) (sqrt (- (/ t_0 x) 1.0)))))))
double code(double x) {
	double t_0 = pow(fma(0.5, x, 0.5), 2.0);
	return sqrt((t_0 - x)) / log(fma((0.5 / sqrt(x)), (1.0 + x), sqrt(((t_0 / x) - 1.0))));
}
function code(x)
	t_0 = fma(0.5, x, 0.5) ^ 2.0
	return Float64(sqrt(Float64(t_0 - x)) / log(fma(Float64(0.5 / sqrt(x)), Float64(1.0 + x), sqrt(Float64(Float64(t_0 / x) - 1.0)))))
end
code[x_] := Block[{t$95$0 = N[Power[N[(0.5 * x + 0.5), $MachinePrecision], 2.0], $MachinePrecision]}, N[(N[Sqrt[N[(t$95$0 - x), $MachinePrecision]], $MachinePrecision] / N[Log[N[(N[(0.5 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(1.0 + x), $MachinePrecision] + N[Sqrt[N[(N[(t$95$0 / x), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}\\
\frac{\sqrt{t\_0 - x}}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{t\_0}{x} - 1}\right)\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 97.2%

    \[\frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-acosh.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)}} \]
    2. acosh-defN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\log \left(\frac{\frac{x + 1}{2}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)}} \]
    3. lower-log.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\log \left(\frac{\frac{x + 1}{2}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)}} \]
    4. lift-/.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\color{blue}{\frac{\frac{x + 1}{2}}{\sqrt{x}}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    5. lift-/.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\frac{\color{blue}{\frac{x + 1}{2}}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    6. div-invN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\frac{\color{blue}{\left(x + 1\right) \cdot \frac{1}{2}}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    7. metadata-evalN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\frac{\left(x + 1\right) \cdot \color{blue}{\frac{1}{2}}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    8. associate-/l*N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\color{blue}{\left(x + 1\right) \cdot \frac{\frac{1}{2}}{\sqrt{x}}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    9. *-commutativeN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\color{blue}{\frac{\frac{1}{2}}{\sqrt{x}} \cdot \left(x + 1\right)} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    10. lower-fma.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \color{blue}{\left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, x + 1, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)}} \]
    11. lower-/.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\color{blue}{\frac{\frac{1}{2}}{\sqrt{x}}}, x + 1, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    12. lift-+.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, \color{blue}{x + 1}, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    13. +-commutativeN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, \color{blue}{1 + x}, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    14. lower-+.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, \color{blue}{1 + x}, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    15. lower-sqrt.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \color{blue}{\sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}}\right)\right)} \]
  4. Applied rewrites97.6%

    \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}}{x} - 1}\right)\right)}} \]
  5. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - \color{blue}{{\left(\sqrt{x}\right)}^{2}}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    2. lift-sqrt.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\color{blue}{\left(\sqrt{x}\right)}}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    3. sqrt-pow2N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - \color{blue}{{x}^{\left(\frac{2}{2}\right)}}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    4. metadata-evalN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {x}^{\color{blue}{1}}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    5. unpow197.9

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - \color{blue}{x}}}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    6. lift-/.f64N/A

      \[\leadsto \frac{\sqrt{{\color{blue}{\left(\frac{x + 1}{2}\right)}}^{2} - x}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    7. div-invN/A

      \[\leadsto \frac{\sqrt{{\color{blue}{\left(\left(x + 1\right) \cdot \frac{1}{2}\right)}}^{2} - x}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    8. lift-+.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\color{blue}{\left(x + 1\right)} \cdot \frac{1}{2}\right)}^{2} - x}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    9. metadata-evalN/A

      \[\leadsto \frac{\sqrt{{\left(\left(x + 1\right) \cdot \color{blue}{\frac{1}{2}}\right)}^{2} - x}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    10. distribute-lft1-inN/A

      \[\leadsto \frac{\sqrt{{\color{blue}{\left(x \cdot \frac{1}{2} + \frac{1}{2}\right)}}^{2} - x}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    11. *-commutativeN/A

      \[\leadsto \frac{\sqrt{{\left(\color{blue}{\frac{1}{2} \cdot x} + \frac{1}{2}\right)}^{2} - x}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    12. lift-fma.f6497.9

      \[\leadsto \frac{\sqrt{{\color{blue}{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}}^{2} - x}}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}}{x} - 1}\right)\right)} \]
  6. Applied rewrites97.9%

    \[\leadsto \frac{\color{blue}{\sqrt{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2} - x}}}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}}{x} - 1}\right)\right)} \]
  7. Add Preprocessing

Alternative 3: 97.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \frac{\sqrt{\mathsf{fma}\left(0.5, 1 + x, \sqrt{x}\right)} \cdot \sqrt{\mathsf{fma}\left(0.5, x, 0.5\right) - \sqrt{x}}}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}}{x} - 1}\right)\right)} \end{array} \]
(FPCore (x)
 :precision binary64
 (/
  (* (sqrt (fma 0.5 (+ 1.0 x) (sqrt x))) (sqrt (- (fma 0.5 x 0.5) (sqrt x))))
  (log
   (fma
    (/ 0.5 (sqrt x))
    (+ 1.0 x)
    (sqrt (- (/ (pow (fma 0.5 x 0.5) 2.0) x) 1.0))))))
double code(double x) {
	return (sqrt(fma(0.5, (1.0 + x), sqrt(x))) * sqrt((fma(0.5, x, 0.5) - sqrt(x)))) / log(fma((0.5 / sqrt(x)), (1.0 + x), sqrt(((pow(fma(0.5, x, 0.5), 2.0) / x) - 1.0))));
}
function code(x)
	return Float64(Float64(sqrt(fma(0.5, Float64(1.0 + x), sqrt(x))) * sqrt(Float64(fma(0.5, x, 0.5) - sqrt(x)))) / log(fma(Float64(0.5 / sqrt(x)), Float64(1.0 + x), sqrt(Float64(Float64((fma(0.5, x, 0.5) ^ 2.0) / x) - 1.0)))))
end
code[x_] := N[(N[(N[Sqrt[N[(0.5 * N[(1.0 + x), $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[(0.5 * x + 0.5), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Log[N[(N[(0.5 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(1.0 + x), $MachinePrecision] + N[Sqrt[N[(N[(N[Power[N[(0.5 * x + 0.5), $MachinePrecision], 2.0], $MachinePrecision] / x), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\sqrt{\mathsf{fma}\left(0.5, 1 + x, \sqrt{x}\right)} \cdot \sqrt{\mathsf{fma}\left(0.5, x, 0.5\right) - \sqrt{x}}}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}}{x} - 1}\right)\right)}
\end{array}
Derivation
  1. Initial program 97.2%

    \[\frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-acosh.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)}} \]
    2. acosh-defN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\log \left(\frac{\frac{x + 1}{2}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)}} \]
    3. lower-log.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\log \left(\frac{\frac{x + 1}{2}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)}} \]
    4. lift-/.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\color{blue}{\frac{\frac{x + 1}{2}}{\sqrt{x}}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    5. lift-/.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\frac{\color{blue}{\frac{x + 1}{2}}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    6. div-invN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\frac{\color{blue}{\left(x + 1\right) \cdot \frac{1}{2}}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    7. metadata-evalN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\frac{\left(x + 1\right) \cdot \color{blue}{\frac{1}{2}}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    8. associate-/l*N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\color{blue}{\left(x + 1\right) \cdot \frac{\frac{1}{2}}{\sqrt{x}}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    9. *-commutativeN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\color{blue}{\frac{\frac{1}{2}}{\sqrt{x}} \cdot \left(x + 1\right)} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    10. lower-fma.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \color{blue}{\left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, x + 1, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)}} \]
    11. lower-/.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\color{blue}{\frac{\frac{1}{2}}{\sqrt{x}}}, x + 1, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    12. lift-+.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, \color{blue}{x + 1}, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    13. +-commutativeN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, \color{blue}{1 + x}, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    14. lower-+.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, \color{blue}{1 + x}, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    15. lower-sqrt.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \color{blue}{\sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}}\right)\right)} \]
  4. Applied rewrites97.6%

    \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}}{x} - 1}\right)\right)}} \]
  5. Applied rewrites97.6%

    \[\leadsto \frac{\color{blue}{\sqrt{\mathsf{fma}\left(0.5, 1 + x, \sqrt{x}\right)} \cdot \sqrt{\mathsf{fma}\left(0.5, x, 0.5\right) - \sqrt{x}}}}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}}{x} - 1}\right)\right)} \]
  6. Add Preprocessing

Alternative 4: 97.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \frac{\left(0.5 - \frac{0.5}{x}\right) \cdot x}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}}{x} - 1}\right)\right)} \end{array} \]
(FPCore (x)
 :precision binary64
 (/
  (* (- 0.5 (/ 0.5 x)) x)
  (log
   (fma
    (/ 0.5 (sqrt x))
    (+ 1.0 x)
    (sqrt (- (/ (pow (fma 0.5 x 0.5) 2.0) x) 1.0))))))
double code(double x) {
	return ((0.5 - (0.5 / x)) * x) / log(fma((0.5 / sqrt(x)), (1.0 + x), sqrt(((pow(fma(0.5, x, 0.5), 2.0) / x) - 1.0))));
}
function code(x)
	return Float64(Float64(Float64(0.5 - Float64(0.5 / x)) * x) / log(fma(Float64(0.5 / sqrt(x)), Float64(1.0 + x), sqrt(Float64(Float64((fma(0.5, x, 0.5) ^ 2.0) / x) - 1.0)))))
end
code[x_] := N[(N[(N[(0.5 - N[(0.5 / x), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / N[Log[N[(N[(0.5 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(1.0 + x), $MachinePrecision] + N[Sqrt[N[(N[(N[Power[N[(0.5 * x + 0.5), $MachinePrecision], 2.0], $MachinePrecision] / x), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(0.5 - \frac{0.5}{x}\right) \cdot x}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}}{x} - 1}\right)\right)}
\end{array}
Derivation
  1. Initial program 97.2%

    \[\frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-acosh.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)}} \]
    2. acosh-defN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\log \left(\frac{\frac{x + 1}{2}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)}} \]
    3. lower-log.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\log \left(\frac{\frac{x + 1}{2}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)}} \]
    4. lift-/.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\color{blue}{\frac{\frac{x + 1}{2}}{\sqrt{x}}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    5. lift-/.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\frac{\color{blue}{\frac{x + 1}{2}}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    6. div-invN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\frac{\color{blue}{\left(x + 1\right) \cdot \frac{1}{2}}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    7. metadata-evalN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\frac{\left(x + 1\right) \cdot \color{blue}{\frac{1}{2}}}{\sqrt{x}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    8. associate-/l*N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\color{blue}{\left(x + 1\right) \cdot \frac{\frac{1}{2}}{\sqrt{x}}} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    9. *-commutativeN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\color{blue}{\frac{\frac{1}{2}}{\sqrt{x}} \cdot \left(x + 1\right)} + \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)} \]
    10. lower-fma.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \color{blue}{\left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, x + 1, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)}} \]
    11. lower-/.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\color{blue}{\frac{\frac{1}{2}}{\sqrt{x}}}, x + 1, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    12. lift-+.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, \color{blue}{x + 1}, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    13. +-commutativeN/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, \color{blue}{1 + x}, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    14. lower-+.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, \color{blue}{1 + x}, \sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}\right)\right)} \]
    15. lower-sqrt.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \color{blue}{\sqrt{\frac{\frac{x + 1}{2}}{\sqrt{x}} \cdot \frac{\frac{x + 1}{2}}{\sqrt{x}} - 1}}\right)\right)} \]
  4. Applied rewrites97.6%

    \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\color{blue}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}}{x} - 1}\right)\right)}} \]
  5. Taylor expanded in x around inf

    \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \frac{1}{x}\right)}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \frac{\color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \frac{1}{x}\right) \cdot x}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    2. lower-*.f64N/A

      \[\leadsto \frac{\color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \frac{1}{x}\right) \cdot x}}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    3. lower--.f64N/A

      \[\leadsto \frac{\color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \frac{1}{x}\right)} \cdot x}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    4. associate-*r/N/A

      \[\leadsto \frac{\left(\frac{1}{2} - \color{blue}{\frac{\frac{1}{2} \cdot 1}{x}}\right) \cdot x}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    5. metadata-evalN/A

      \[\leadsto \frac{\left(\frac{1}{2} - \frac{\color{blue}{\frac{1}{2}}}{x}\right) \cdot x}{\log \left(\mathsf{fma}\left(\frac{\frac{1}{2}}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(\frac{1}{2}, x, \frac{1}{2}\right)\right)}^{2}}{x} - 1}\right)\right)} \]
    6. lower-/.f6497.5

      \[\leadsto \frac{\left(0.5 - \color{blue}{\frac{0.5}{x}}\right) \cdot x}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}}{x} - 1}\right)\right)} \]
  7. Applied rewrites97.5%

    \[\leadsto \frac{\color{blue}{\left(0.5 - \frac{0.5}{x}\right) \cdot x}}{\log \left(\mathsf{fma}\left(\frac{0.5}{\sqrt{x}}, 1 + x, \sqrt{\frac{{\left(\mathsf{fma}\left(0.5, x, 0.5\right)\right)}^{2}}{x} - 1}\right)\right)} \]
  8. Add Preprocessing

Alternative 5: 97.3% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \frac{\sqrt{\mathsf{fma}\left(-0.5, -1 - x, \sqrt{x}\right)} \cdot \sqrt{\mathsf{fma}\left(0.5, x, 0.5\right) - \sqrt{x}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \end{array} \]
(FPCore (x)
 :precision binary64
 (/
  (* (sqrt (fma -0.5 (- -1.0 x) (sqrt x))) (sqrt (- (fma 0.5 x 0.5) (sqrt x))))
  (acosh (/ (/ (+ x 1.0) 2.0) (sqrt x)))))
double code(double x) {
	return (sqrt(fma(-0.5, (-1.0 - x), sqrt(x))) * sqrt((fma(0.5, x, 0.5) - sqrt(x)))) / acosh((((x + 1.0) / 2.0) / sqrt(x)));
}
function code(x)
	return Float64(Float64(sqrt(fma(-0.5, Float64(-1.0 - x), sqrt(x))) * sqrt(Float64(fma(0.5, x, 0.5) - sqrt(x)))) / acosh(Float64(Float64(Float64(x + 1.0) / 2.0) / sqrt(x))))
end
code[x_] := N[(N[(N[Sqrt[N[(-0.5 * N[(-1.0 - x), $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[(0.5 * x + 0.5), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[ArcCosh[N[(N[(N[(x + 1.0), $MachinePrecision] / 2.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\sqrt{\mathsf{fma}\left(-0.5, -1 - x, \sqrt{x}\right)} \cdot \sqrt{\mathsf{fma}\left(0.5, x, 0.5\right) - \sqrt{x}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)}
\end{array}
Derivation
  1. Initial program 97.2%

    \[\frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-sqrt.f64N/A

      \[\leadsto \frac{\color{blue}{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    2. lift--.f64N/A

      \[\leadsto \frac{\sqrt{\color{blue}{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    3. lift-pow.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - \color{blue}{{\left(\sqrt{x}\right)}^{2}}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    4. unpow2N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - \color{blue}{\sqrt{x} \cdot \sqrt{x}}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    5. lift-pow.f64N/A

      \[\leadsto \frac{\sqrt{\color{blue}{{\left(\frac{x + 1}{2}\right)}^{2}} - \sqrt{x} \cdot \sqrt{x}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    6. unpow2N/A

      \[\leadsto \frac{\sqrt{\color{blue}{\frac{x + 1}{2} \cdot \frac{x + 1}{2}} - \sqrt{x} \cdot \sqrt{x}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    7. difference-of-squaresN/A

      \[\leadsto \frac{\sqrt{\color{blue}{\left(\frac{x + 1}{2} + \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    8. sqrt-prodN/A

      \[\leadsto \frac{\color{blue}{\sqrt{\frac{x + 1}{2} + \sqrt{x}} \cdot \sqrt{\frac{x + 1}{2} - \sqrt{x}}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    9. lower-*.f64N/A

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

    \[\leadsto \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-0.5, -1 - x, \sqrt{x}\right)} \cdot \sqrt{\mathsf{fma}\left(0.5, x, 0.5\right) - \sqrt{x}}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  5. Add Preprocessing

Alternative 6: 97.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \frac{\sqrt{\mathsf{fma}\left(-0.5, -1 - x, \sqrt{x}\right) \cdot \left(\mathsf{fma}\left(0.5, x, 0.5\right) - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \end{array} \]
(FPCore (x)
 :precision binary64
 (/
  (sqrt (* (fma -0.5 (- -1.0 x) (sqrt x)) (- (fma 0.5 x 0.5) (sqrt x))))
  (acosh (/ (/ (+ x 1.0) 2.0) (sqrt x)))))
double code(double x) {
	return sqrt((fma(-0.5, (-1.0 - x), sqrt(x)) * (fma(0.5, x, 0.5) - sqrt(x)))) / acosh((((x + 1.0) / 2.0) / sqrt(x)));
}
function code(x)
	return Float64(sqrt(Float64(fma(-0.5, Float64(-1.0 - x), sqrt(x)) * Float64(fma(0.5, x, 0.5) - sqrt(x)))) / acosh(Float64(Float64(Float64(x + 1.0) / 2.0) / sqrt(x))))
end
code[x_] := N[(N[Sqrt[N[(N[(-0.5 * N[(-1.0 - x), $MachinePrecision] + N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(N[(0.5 * x + 0.5), $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[ArcCosh[N[(N[(N[(x + 1.0), $MachinePrecision] / 2.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\sqrt{\mathsf{fma}\left(-0.5, -1 - x, \sqrt{x}\right) \cdot \left(\mathsf{fma}\left(0.5, x, 0.5\right) - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)}
\end{array}
Derivation
  1. Initial program 97.2%

    \[\frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift--.f64N/A

      \[\leadsto \frac{\sqrt{\color{blue}{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    2. lift-pow.f64N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - \color{blue}{{\left(\sqrt{x}\right)}^{2}}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    3. unpow2N/A

      \[\leadsto \frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - \color{blue}{\sqrt{x} \cdot \sqrt{x}}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    4. lift-pow.f64N/A

      \[\leadsto \frac{\sqrt{\color{blue}{{\left(\frac{x + 1}{2}\right)}^{2}} - \sqrt{x} \cdot \sqrt{x}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    5. unpow2N/A

      \[\leadsto \frac{\sqrt{\color{blue}{\frac{x + 1}{2} \cdot \frac{x + 1}{2}} - \sqrt{x} \cdot \sqrt{x}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    6. difference-of-squaresN/A

      \[\leadsto \frac{\sqrt{\color{blue}{\left(\frac{x + 1}{2} + \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    7. lower-*.f64N/A

      \[\leadsto \frac{\sqrt{\color{blue}{\left(\frac{x + 1}{2} + \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    8. lift-/.f64N/A

      \[\leadsto \frac{\sqrt{\left(\color{blue}{\frac{x + 1}{2}} + \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    9. clear-numN/A

      \[\leadsto \frac{\sqrt{\left(\color{blue}{\frac{1}{\frac{2}{x + 1}}} + \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    10. frac-2negN/A

      \[\leadsto \frac{\sqrt{\left(\frac{1}{\color{blue}{\frac{\mathsf{neg}\left(2\right)}{\mathsf{neg}\left(\left(x + 1\right)\right)}}} + \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    11. associate-/r/N/A

      \[\leadsto \frac{\sqrt{\left(\color{blue}{\frac{1}{\mathsf{neg}\left(2\right)} \cdot \left(\mathsf{neg}\left(\left(x + 1\right)\right)\right)} + \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    12. metadata-evalN/A

      \[\leadsto \frac{\sqrt{\left(\frac{1}{\color{blue}{-2}} \cdot \left(\mathsf{neg}\left(\left(x + 1\right)\right)\right) + \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    13. metadata-evalN/A

      \[\leadsto \frac{\sqrt{\left(\color{blue}{\frac{-1}{2}} \cdot \left(\mathsf{neg}\left(\left(x + 1\right)\right)\right) + \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    14. metadata-evalN/A

      \[\leadsto \frac{\sqrt{\left(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(\left(x + 1\right)\right)\right) + \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    15. lower-fma.f64N/A

      \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{1}{2}\right), \mathsf{neg}\left(\left(x + 1\right)\right), \sqrt{x}\right)} \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    16. metadata-evalN/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2}}, \mathsf{neg}\left(\left(x + 1\right)\right), \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    17. lift-+.f64N/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\frac{-1}{2}, \mathsf{neg}\left(\color{blue}{\left(x + 1\right)}\right), \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    18. +-commutativeN/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\frac{-1}{2}, \mathsf{neg}\left(\color{blue}{\left(1 + x\right)}\right), \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    19. distribute-neg-inN/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}, \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    20. metadata-evalN/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right), \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    21. unsub-negN/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{-1 - x}, \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    22. lower--.f64N/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{-1 - x}, \sqrt{x}\right) \cdot \left(\frac{x + 1}{2} - \sqrt{x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  4. Applied rewrites97.3%

    \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(-0.5, -1 - x, \sqrt{x}\right) \cdot \left(\mathsf{fma}\left(0.5, x, 0.5\right) - \sqrt{x}\right)}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  5. Add Preprocessing

Alternative 7: 97.2% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \frac{\sqrt{\mathsf{fma}\left(1 + x, \left(1 + x\right) \cdot 0.25, -x\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \end{array} \]
(FPCore (x)
 :precision binary64
 (/
  (sqrt (fma (+ 1.0 x) (* (+ 1.0 x) 0.25) (- x)))
  (acosh (/ (/ (+ x 1.0) 2.0) (sqrt x)))))
double code(double x) {
	return sqrt(fma((1.0 + x), ((1.0 + x) * 0.25), -x)) / acosh((((x + 1.0) / 2.0) / sqrt(x)));
}
function code(x)
	return Float64(sqrt(fma(Float64(1.0 + x), Float64(Float64(1.0 + x) * 0.25), Float64(-x))) / acosh(Float64(Float64(Float64(x + 1.0) / 2.0) / sqrt(x))))
end
code[x_] := N[(N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] * N[(N[(1.0 + x), $MachinePrecision] * 0.25), $MachinePrecision] + (-x)), $MachinePrecision]], $MachinePrecision] / N[ArcCosh[N[(N[(N[(x + 1.0), $MachinePrecision] / 2.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\sqrt{\mathsf{fma}\left(1 + x, \left(1 + x\right) \cdot 0.25, -x\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)}
\end{array}
Derivation
  1. Initial program 97.2%

    \[\frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift--.f64N/A

      \[\leadsto \frac{\sqrt{\color{blue}{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    2. sub-negN/A

      \[\leadsto \frac{\sqrt{\color{blue}{{\left(\frac{x + 1}{2}\right)}^{2} + \left(\mathsf{neg}\left({\left(\sqrt{x}\right)}^{2}\right)\right)}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    3. lift-pow.f64N/A

      \[\leadsto \frac{\sqrt{\color{blue}{{\left(\frac{x + 1}{2}\right)}^{2}} + \left(\mathsf{neg}\left({\left(\sqrt{x}\right)}^{2}\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    4. lift-/.f64N/A

      \[\leadsto \frac{\sqrt{{\color{blue}{\left(\frac{x + 1}{2}\right)}}^{2} + \left(\mathsf{neg}\left({\left(\sqrt{x}\right)}^{2}\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    5. div-invN/A

      \[\leadsto \frac{\sqrt{{\color{blue}{\left(\left(x + 1\right) \cdot \frac{1}{2}\right)}}^{2} + \left(\mathsf{neg}\left({\left(\sqrt{x}\right)}^{2}\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    6. metadata-evalN/A

      \[\leadsto \frac{\sqrt{{\left(\left(x + 1\right) \cdot \color{blue}{\frac{1}{2}}\right)}^{2} + \left(\mathsf{neg}\left({\left(\sqrt{x}\right)}^{2}\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    7. unpow-prod-downN/A

      \[\leadsto \frac{\sqrt{\color{blue}{{\left(x + 1\right)}^{2} \cdot {\frac{1}{2}}^{2}} + \left(\mathsf{neg}\left({\left(\sqrt{x}\right)}^{2}\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    8. pow2N/A

      \[\leadsto \frac{\sqrt{\color{blue}{\left(\left(x + 1\right) \cdot \left(x + 1\right)\right)} \cdot {\frac{1}{2}}^{2} + \left(\mathsf{neg}\left({\left(\sqrt{x}\right)}^{2}\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    9. associate-*l*N/A

      \[\leadsto \frac{\sqrt{\color{blue}{\left(x + 1\right) \cdot \left(\left(x + 1\right) \cdot {\frac{1}{2}}^{2}\right)} + \left(\mathsf{neg}\left({\left(\sqrt{x}\right)}^{2}\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    10. lift-pow.f64N/A

      \[\leadsto \frac{\sqrt{\left(x + 1\right) \cdot \left(\left(x + 1\right) \cdot {\frac{1}{2}}^{2}\right) + \left(\mathsf{neg}\left(\color{blue}{{\left(\sqrt{x}\right)}^{2}}\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    11. lift-sqrt.f64N/A

      \[\leadsto \frac{\sqrt{\left(x + 1\right) \cdot \left(\left(x + 1\right) \cdot {\frac{1}{2}}^{2}\right) + \left(\mathsf{neg}\left({\color{blue}{\left(\sqrt{x}\right)}}^{2}\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    12. sqrt-pow2N/A

      \[\leadsto \frac{\sqrt{\left(x + 1\right) \cdot \left(\left(x + 1\right) \cdot {\frac{1}{2}}^{2}\right) + \left(\mathsf{neg}\left(\color{blue}{{x}^{\left(\frac{2}{2}\right)}}\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    13. metadata-evalN/A

      \[\leadsto \frac{\sqrt{\left(x + 1\right) \cdot \left(\left(x + 1\right) \cdot {\frac{1}{2}}^{2}\right) + \left(\mathsf{neg}\left({x}^{\color{blue}{1}}\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    14. unpow1N/A

      \[\leadsto \frac{\sqrt{\left(x + 1\right) \cdot \left(\left(x + 1\right) \cdot {\frac{1}{2}}^{2}\right) + \left(\mathsf{neg}\left(\color{blue}{x}\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    15. lower-fma.f64N/A

      \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(x + 1, \left(x + 1\right) \cdot {\frac{1}{2}}^{2}, \mathsf{neg}\left(x\right)\right)}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    16. lift-+.f64N/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\color{blue}{x + 1}, \left(x + 1\right) \cdot {\frac{1}{2}}^{2}, \mathsf{neg}\left(x\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    17. +-commutativeN/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\color{blue}{1 + x}, \left(x + 1\right) \cdot {\frac{1}{2}}^{2}, \mathsf{neg}\left(x\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    18. lower-+.f64N/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\color{blue}{1 + x}, \left(x + 1\right) \cdot {\frac{1}{2}}^{2}, \mathsf{neg}\left(x\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    19. lower-*.f64N/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(1 + x, \color{blue}{\left(x + 1\right) \cdot {\frac{1}{2}}^{2}}, \mathsf{neg}\left(x\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    20. lift-+.f64N/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(1 + x, \color{blue}{\left(x + 1\right)} \cdot {\frac{1}{2}}^{2}, \mathsf{neg}\left(x\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    21. +-commutativeN/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(1 + x, \color{blue}{\left(1 + x\right)} \cdot {\frac{1}{2}}^{2}, \mathsf{neg}\left(x\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    22. lower-+.f64N/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(1 + x, \color{blue}{\left(1 + x\right)} \cdot {\frac{1}{2}}^{2}, \mathsf{neg}\left(x\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    23. metadata-evalN/A

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(1 + x, \left(1 + x\right) \cdot \color{blue}{\frac{1}{4}}, \mathsf{neg}\left(x\right)\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
    24. lower-neg.f6497.2

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(1 + x, \left(1 + x\right) \cdot 0.25, \color{blue}{-x}\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  4. Applied rewrites97.2%

    \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(1 + x, \left(1 + x\right) \cdot 0.25, -x\right)}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  5. Add Preprocessing

Alternative 8: 97.0% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \frac{\mathsf{fma}\left(0.5, x, -0.5\right)}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \end{array} \]
(FPCore (x)
 :precision binary64
 (/ (fma 0.5 x -0.5) (acosh (/ (/ (+ x 1.0) 2.0) (sqrt x)))))
double code(double x) {
	return fma(0.5, x, -0.5) / acosh((((x + 1.0) / 2.0) / sqrt(x)));
}
function code(x)
	return Float64(fma(0.5, x, -0.5) / acosh(Float64(Float64(Float64(x + 1.0) / 2.0) / sqrt(x))))
end
code[x_] := N[(N[(0.5 * x + -0.5), $MachinePrecision] / N[ArcCosh[N[(N[(N[(x + 1.0), $MachinePrecision] / 2.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\mathsf{fma}\left(0.5, x, -0.5\right)}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)}
\end{array}
Derivation
  1. Initial program 97.2%

    \[\frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf

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

    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(0.5, x, -0.5\right)}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  5. Add Preprocessing

Alternative 9: 1.6% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \frac{-0.5 \cdot x}{\cosh^{-1} \left(\frac{\mathsf{fma}\left(x, 0.5, 0.5\right)}{\sqrt{x}}\right)} \end{array} \]
(FPCore (x)
 :precision binary64
 (/ (* -0.5 x) (acosh (/ (fma x 0.5 0.5) (sqrt x)))))
double code(double x) {
	return (-0.5 * x) / acosh((fma(x, 0.5, 0.5) / sqrt(x)));
}
function code(x)
	return Float64(Float64(-0.5 * x) / acosh(Float64(fma(x, 0.5, 0.5) / sqrt(x))))
end
code[x_] := N[(N[(-0.5 * x), $MachinePrecision] / N[ArcCosh[N[(N[(x * 0.5 + 0.5), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{-0.5 \cdot x}{\cosh^{-1} \left(\frac{\mathsf{fma}\left(x, 0.5, 0.5\right)}{\sqrt{x}}\right)}
\end{array}
Derivation
  1. Initial program 97.2%

    \[\frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in x around -inf

    \[\leadsto \frac{\color{blue}{\frac{-1}{2} \cdot x}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  4. Step-by-step derivation
    1. lower-*.f641.6

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

    \[\leadsto \frac{\color{blue}{-0.5 \cdot x}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  6. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \frac{\frac{-1}{2} \cdot x}{\cosh^{-1} \left(\frac{\color{blue}{\frac{x + 1}{2}}}{\sqrt{x}}\right)} \]
    2. div-invN/A

      \[\leadsto \frac{\frac{-1}{2} \cdot x}{\cosh^{-1} \left(\frac{\color{blue}{\left(x + 1\right) \cdot \frac{1}{2}}}{\sqrt{x}}\right)} \]
    3. lift-+.f64N/A

      \[\leadsto \frac{\frac{-1}{2} \cdot x}{\cosh^{-1} \left(\frac{\color{blue}{\left(x + 1\right)} \cdot \frac{1}{2}}{\sqrt{x}}\right)} \]
    4. metadata-evalN/A

      \[\leadsto \frac{\frac{-1}{2} \cdot x}{\cosh^{-1} \left(\frac{\left(x + 1\right) \cdot \color{blue}{\frac{1}{2}}}{\sqrt{x}}\right)} \]
    5. distribute-lft1-inN/A

      \[\leadsto \frac{\frac{-1}{2} \cdot x}{\cosh^{-1} \left(\frac{\color{blue}{x \cdot \frac{1}{2} + \frac{1}{2}}}{\sqrt{x}}\right)} \]
    6. lower-fma.f641.6

      \[\leadsto \frac{-0.5 \cdot x}{\cosh^{-1} \left(\frac{\color{blue}{\mathsf{fma}\left(x, 0.5, 0.5\right)}}{\sqrt{x}}\right)} \]
  7. Applied rewrites1.6%

    \[\leadsto \frac{-0.5 \cdot x}{\cosh^{-1} \left(\frac{\color{blue}{\mathsf{fma}\left(x, 0.5, 0.5\right)}}{\sqrt{x}}\right)} \]
  8. Add Preprocessing

Alternative 10: 0.6% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \frac{-0.5 \cdot x}{\cosh^{-1} \left(\frac{0.5 \cdot x}{\sqrt{x}}\right)} \end{array} \]
(FPCore (x) :precision binary64 (/ (* -0.5 x) (acosh (/ (* 0.5 x) (sqrt x)))))
double code(double x) {
	return (-0.5 * x) / acosh(((0.5 * x) / sqrt(x)));
}
def code(x):
	return (-0.5 * x) / math.acosh(((0.5 * x) / math.sqrt(x)))
function code(x)
	return Float64(Float64(-0.5 * x) / acosh(Float64(Float64(0.5 * x) / sqrt(x))))
end
function tmp = code(x)
	tmp = (-0.5 * x) / acosh(((0.5 * x) / sqrt(x)));
end
code[x_] := N[(N[(-0.5 * x), $MachinePrecision] / N[ArcCosh[N[(N[(0.5 * x), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

    \[\frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in x around -inf

    \[\leadsto \frac{\color{blue}{\frac{-1}{2} \cdot x}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  4. Step-by-step derivation
    1. lower-*.f641.6

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

    \[\leadsto \frac{\color{blue}{-0.5 \cdot x}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  6. Taylor expanded in x around inf

    \[\leadsto \frac{\frac{-1}{2} \cdot x}{\cosh^{-1} \left(\frac{\color{blue}{\frac{1}{2} \cdot x}}{\sqrt{x}}\right)} \]
  7. Step-by-step derivation
    1. lower-*.f640.5

      \[\leadsto \frac{-0.5 \cdot x}{\cosh^{-1} \left(\frac{\color{blue}{0.5 \cdot x}}{\sqrt{x}}\right)} \]
  8. Applied rewrites0.5%

    \[\leadsto \frac{-0.5 \cdot x}{\cosh^{-1} \left(\frac{\color{blue}{0.5 \cdot x}}{\sqrt{x}}\right)} \]
  9. Add Preprocessing

Alternative 11: 0.0% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \frac{-0.5 \cdot x}{\cosh^{-1} \left(\frac{0.5}{\sqrt{x}}\right)} \end{array} \]
(FPCore (x) :precision binary64 (/ (* -0.5 x) (acosh (/ 0.5 (sqrt x)))))
double code(double x) {
	return (-0.5 * x) / acosh((0.5 / sqrt(x)));
}
def code(x):
	return (-0.5 * x) / math.acosh((0.5 / math.sqrt(x)))
function code(x)
	return Float64(Float64(-0.5 * x) / acosh(Float64(0.5 / sqrt(x))))
end
function tmp = code(x)
	tmp = (-0.5 * x) / acosh((0.5 / sqrt(x)));
end
code[x_] := N[(N[(-0.5 * x), $MachinePrecision] / N[ArcCosh[N[(0.5 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

    \[\frac{\sqrt{{\left(\frac{x + 1}{2}\right)}^{2} - {\left(\sqrt{x}\right)}^{2}}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in x around -inf

    \[\leadsto \frac{\color{blue}{\frac{-1}{2} \cdot x}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  4. Step-by-step derivation
    1. lower-*.f641.6

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

    \[\leadsto \frac{\color{blue}{-0.5 \cdot x}}{\cosh^{-1} \left(\frac{\frac{x + 1}{2}}{\sqrt{x}}\right)} \]
  6. Taylor expanded in x around 0

    \[\leadsto \frac{\frac{-1}{2} \cdot x}{\cosh^{-1} \left(\frac{\color{blue}{\frac{1}{2}}}{\sqrt{x}}\right)} \]
  7. Step-by-step derivation
    1. Applied rewrites0.0%

      \[\leadsto \frac{-0.5 \cdot x}{\cosh^{-1} \left(\frac{\color{blue}{0.5}}{\sqrt{x}}\right)} \]
    2. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 1 
    (FPCore (x)
      :name "  (sqrt(((x+1)/2)^2-(sqrt(x))^2)/acosh(((x+1)/2)/(sqrt(x)))) "
      :precision binary64
      :pre (and (<= 1.0 x) (<= x 10.0))
      (/ (sqrt (- (pow (/ (+ x 1.0) 2.0) 2.0) (pow (sqrt x) 2.0))) (acosh (/ (/ (+ x 1.0) 2.0) (sqrt x)))))