Toniolo and Linder, Equation (7)

Percentage Accurate: 33.7% → 98.5%
Time: 24.0s
Alternatives: 10
Speedup: 225.0×

Specification

?
\[\begin{array}{l} \\ \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (/
  (* (sqrt 2.0) t)
  (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
	return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
	return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t):
	return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t)
	return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l))))
end
function tmp = code(x, l, t)
	tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\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 10 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: 33.7% accurate, 1.0× speedup?

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

\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}

Alternative 1: 98.5% accurate, 0.2× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{\sqrt{2} \cdot t\_m}{\sqrt{\frac{x + 1}{x + -1} \cdot \left(l\_m \cdot l\_m + 2 \cdot \left(t\_m \cdot t\_m\right)\right) - l\_m \cdot l\_m}} \leq 2:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\sqrt{2} \cdot \frac{t\_m}{l\_m \cdot \sqrt{\mathsf{fma}\left(2, {\left(\frac{t\_m \cdot \sqrt{1 + \frac{2}{x}}}{l\_m}\right)}^{2}, \frac{2}{x}\right)}}}\right)}^{2}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<=
       (/
        (* (sqrt 2.0) t_m)
        (sqrt
         (-
          (* (/ (+ x 1.0) (+ x -1.0)) (+ (* l_m l_m) (* 2.0 (* t_m t_m))))
          (* l_m l_m))))
       2.0)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (pow
     (sqrt
      (*
       (sqrt 2.0)
       (/
        t_m
        (*
         l_m
         (sqrt
          (fma
           2.0
           (pow (/ (* t_m (sqrt (+ 1.0 (/ 2.0 x)))) l_m) 2.0)
           (/ 2.0 x)))))))
     2.0))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (((sqrt(2.0) * t_m) / sqrt(((((x + 1.0) / (x + -1.0)) * ((l_m * l_m) + (2.0 * (t_m * t_m)))) - (l_m * l_m)))) <= 2.0) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = pow(sqrt((sqrt(2.0) * (t_m / (l_m * sqrt(fma(2.0, pow(((t_m * sqrt((1.0 + (2.0 / x)))) / l_m), 2.0), (2.0 / x))))))), 2.0);
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (Float64(Float64(sqrt(2.0) * t_m) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x + -1.0)) * Float64(Float64(l_m * l_m) + Float64(2.0 * Float64(t_m * t_m)))) - Float64(l_m * l_m)))) <= 2.0)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	else
		tmp = sqrt(Float64(sqrt(2.0) * Float64(t_m / Float64(l_m * sqrt(fma(2.0, (Float64(Float64(t_m * sqrt(Float64(1.0 + Float64(2.0 / x)))) / l_m) ^ 2.0), Float64(2.0 / x))))))) ^ 2.0;
	end
	return Float64(t_s * tmp)
end
l_m = N[Abs[l], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l$95$m * l$95$m), $MachinePrecision] + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[Sqrt[N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(l$95$m * N[Sqrt[N[(2.0 * N[Power[N[(N[(t$95$m * N[Sqrt[N[(1.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision], 2.0], $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sqrt{2} \cdot t\_m}{\sqrt{\frac{x + 1}{x + -1} \cdot \left(l\_m \cdot l\_m + 2 \cdot \left(t\_m \cdot t\_m\right)\right) - l\_m \cdot l\_m}} \leq 2:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{\sqrt{2} \cdot \frac{t\_m}{l\_m \cdot \sqrt{\mathsf{fma}\left(2, {\left(\frac{t\_m \cdot \sqrt{1 + \frac{2}{x}}}{l\_m}\right)}^{2}, \frac{2}{x}\right)}}}\right)}^{2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l l)))) < 2

    1. Initial program 49.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Simplified43.4%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(x + 1, \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1}, -\ell \cdot \ell\right)}}} \]
    3. Add Preprocessing
    4. Applied egg-rr36.3%

      \[\leadsto \sqrt{2} \cdot \color{blue}{e^{\log \left(\frac{t}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, \sqrt{2} \cdot t\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}\right)}} \]
    5. Taylor expanded in t around inf 37.5%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]

    if 2 < (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l l))))

    1. Initial program 0.8%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-exp-log0.9%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{e^{\log \left(x + 1\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      2. +-commutative0.9%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{e^{\log \color{blue}{\left(1 + x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      3. log1p-define0.9%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{e^{\color{blue}{\mathsf{log1p}\left(x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    4. Applied egg-rr0.9%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{e^{\mathsf{log1p}\left(x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    5. Taylor expanded in x around inf 0.8%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + 2 \cdot \frac{1}{x}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    6. Step-by-step derivation
      1. associate-*r/0.8%

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\left(1 + \frac{\color{blue}{2}}{x}\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    7. Simplified0.8%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + \frac{2}{x}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    8. Taylor expanded in l around inf 30.6%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{{\ell}^{2} \cdot \left(2 \cdot \frac{{t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right)}{{\ell}^{2}} + 2 \cdot \frac{1}{x}\right)}}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt30.7%

        \[\leadsto \color{blue}{\sqrt{\frac{\sqrt{2} \cdot t}{\sqrt{{\ell}^{2} \cdot \left(2 \cdot \frac{{t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right)}{{\ell}^{2}} + 2 \cdot \frac{1}{x}\right)}}} \cdot \sqrt{\frac{\sqrt{2} \cdot t}{\sqrt{{\ell}^{2} \cdot \left(2 \cdot \frac{{t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right)}{{\ell}^{2}} + 2 \cdot \frac{1}{x}\right)}}}} \]
      2. pow230.7%

        \[\leadsto \color{blue}{{\left(\sqrt{\frac{\sqrt{2} \cdot t}{\sqrt{{\ell}^{2} \cdot \left(2 \cdot \frac{{t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right)}{{\ell}^{2}} + 2 \cdot \frac{1}{x}\right)}}}\right)}^{2}} \]
    10. Applied egg-rr32.9%

      \[\leadsto \color{blue}{{\left(\sqrt{\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\mathsf{fma}\left(2, {\left(\frac{t \cdot \sqrt{1 + \frac{2}{x}}}{\ell}\right)}^{2}, \frac{2}{x}\right)}}}\right)}^{2}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x + -1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \leq 2:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\mathsf{fma}\left(2, {\left(\frac{t \cdot \sqrt{1 + \frac{2}{x}}}{\ell}\right)}^{2}, \frac{2}{x}\right)}}}\right)}^{2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 98.4% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{\sqrt{2} \cdot t\_m}{\sqrt{\frac{x + 1}{x + -1} \cdot \left(l\_m \cdot l\_m + 2 \cdot \left(t\_m \cdot t\_m\right)\right) - l\_m \cdot l\_m}} \leq 2:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t\_m}{l\_m \cdot \sqrt{\mathsf{fma}\left(2, {\left(\frac{t\_m \cdot \sqrt{1 + \frac{2}{x}}}{l\_m}\right)}^{2}, \frac{2}{x}\right)}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<=
       (/
        (* (sqrt 2.0) t_m)
        (sqrt
         (-
          (* (/ (+ x 1.0) (+ x -1.0)) (+ (* l_m l_m) (* 2.0 (* t_m t_m))))
          (* l_m l_m))))
       2.0)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (*
     (sqrt 2.0)
     (/
      t_m
      (*
       l_m
       (sqrt
        (fma
         2.0
         (pow (/ (* t_m (sqrt (+ 1.0 (/ 2.0 x)))) l_m) 2.0)
         (/ 2.0 x)))))))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (((sqrt(2.0) * t_m) / sqrt(((((x + 1.0) / (x + -1.0)) * ((l_m * l_m) + (2.0 * (t_m * t_m)))) - (l_m * l_m)))) <= 2.0) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = sqrt(2.0) * (t_m / (l_m * sqrt(fma(2.0, pow(((t_m * sqrt((1.0 + (2.0 / x)))) / l_m), 2.0), (2.0 / x)))));
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (Float64(Float64(sqrt(2.0) * t_m) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x + -1.0)) * Float64(Float64(l_m * l_m) + Float64(2.0 * Float64(t_m * t_m)))) - Float64(l_m * l_m)))) <= 2.0)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	else
		tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(l_m * sqrt(fma(2.0, (Float64(Float64(t_m * sqrt(Float64(1.0 + Float64(2.0 / x)))) / l_m) ^ 2.0), Float64(2.0 / x))))));
	end
	return Float64(t_s * tmp)
end
l_m = N[Abs[l], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l$95$m * l$95$m), $MachinePrecision] + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(l$95$m * N[Sqrt[N[(2.0 * N[Power[N[(N[(t$95$m * N[Sqrt[N[(1.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision], 2.0], $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sqrt{2} \cdot t\_m}{\sqrt{\frac{x + 1}{x + -1} \cdot \left(l\_m \cdot l\_m + 2 \cdot \left(t\_m \cdot t\_m\right)\right) - l\_m \cdot l\_m}} \leq 2:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{l\_m \cdot \sqrt{\mathsf{fma}\left(2, {\left(\frac{t\_m \cdot \sqrt{1 + \frac{2}{x}}}{l\_m}\right)}^{2}, \frac{2}{x}\right)}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l l)))) < 2

    1. Initial program 49.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Simplified43.4%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(x + 1, \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1}, -\ell \cdot \ell\right)}}} \]
    3. Add Preprocessing
    4. Applied egg-rr36.3%

      \[\leadsto \sqrt{2} \cdot \color{blue}{e^{\log \left(\frac{t}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, \sqrt{2} \cdot t\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}\right)}} \]
    5. Taylor expanded in t around inf 37.5%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]

    if 2 < (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l l))))

    1. Initial program 0.8%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-exp-log0.9%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{e^{\log \left(x + 1\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      2. +-commutative0.9%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{e^{\log \color{blue}{\left(1 + x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      3. log1p-define0.9%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{e^{\color{blue}{\mathsf{log1p}\left(x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    4. Applied egg-rr0.9%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{e^{\mathsf{log1p}\left(x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    5. Taylor expanded in x around inf 0.8%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + 2 \cdot \frac{1}{x}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    6. Step-by-step derivation
      1. associate-*r/0.8%

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\left(1 + \frac{\color{blue}{2}}{x}\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    7. Simplified0.8%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + \frac{2}{x}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    8. Taylor expanded in l around inf 30.6%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{{\ell}^{2} \cdot \left(2 \cdot \frac{{t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right)}{{\ell}^{2}} + 2 \cdot \frac{1}{x}\right)}}} \]
    9. Step-by-step derivation
      1. associate-/l*30.6%

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\color{blue}{\sqrt{{\ell}^{2}} \cdot \sqrt{2 \cdot \frac{{t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right)}{{\ell}^{2}} + 2 \cdot \frac{1}{x}}}} \]
      3. sqrt-pow128.0%

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{{\ell}^{\color{blue}{1}} \cdot \sqrt{2 \cdot \frac{{t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right)}{{\ell}^{2}} + 2 \cdot \frac{1}{x}}} \]
      5. pow128.0%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\color{blue}{\ell} \cdot \sqrt{2 \cdot \frac{{t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right)}{{\ell}^{2}} + 2 \cdot \frac{1}{x}}} \]
      6. fma-define28.0%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\color{blue}{\mathsf{fma}\left(2, \frac{{t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right)}{{\ell}^{2}}, 2 \cdot \frac{1}{x}\right)}}} \]
    10. Applied egg-rr52.2%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\mathsf{fma}\left(2, {\left(\frac{t \cdot \sqrt{1 + \frac{2}{x}}}{\ell}\right)}^{2}, \frac{2}{x}\right)}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x + -1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \leq 2:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\mathsf{fma}\left(2, {\left(\frac{t \cdot \sqrt{1 + \frac{2}{x}}}{\ell}\right)}^{2}, \frac{2}{x}\right)}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 83.9% accurate, 0.5× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sqrt{2} \cdot t\_m\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 8.2 \cdot 10^{-161}:\\ \;\;\;\;\frac{t\_2}{l\_m \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \mathbf{elif}\;t\_m \leq 3.3 \cdot 10^{+82}:\\ \;\;\;\;\frac{t\_2}{\sqrt{2 \cdot \left(\left(1 + \frac{2}{x}\right) \cdot {t\_m}^{2} + \frac{{l\_m}^{2}}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\frac{x + 1}{x + -1}}}\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (let* ((t_2 (* (sqrt 2.0) t_m)))
   (*
    t_s
    (if (<= t_m 8.2e-161)
      (/ t_2 (* l_m (* (sqrt 2.0) (sqrt (/ 1.0 x)))))
      (if (<= t_m 3.3e+82)
        (/
         t_2
         (sqrt
          (* 2.0 (+ (* (+ 1.0 (/ 2.0 x)) (pow t_m 2.0)) (/ (pow l_m 2.0) x)))))
        (/ 1.0 (sqrt (/ (+ x 1.0) (+ x -1.0)))))))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double t_2 = sqrt(2.0) * t_m;
	double tmp;
	if (t_m <= 8.2e-161) {
		tmp = t_2 / (l_m * (sqrt(2.0) * sqrt((1.0 / x))));
	} else if (t_m <= 3.3e+82) {
		tmp = t_2 / sqrt((2.0 * (((1.0 + (2.0 / x)) * pow(t_m, 2.0)) + (pow(l_m, 2.0) / x))));
	} else {
		tmp = 1.0 / sqrt(((x + 1.0) / (x + -1.0)));
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: t_2
    real(8) :: tmp
    t_2 = sqrt(2.0d0) * t_m
    if (t_m <= 8.2d-161) then
        tmp = t_2 / (l_m * (sqrt(2.0d0) * sqrt((1.0d0 / x))))
    else if (t_m <= 3.3d+82) then
        tmp = t_2 / sqrt((2.0d0 * (((1.0d0 + (2.0d0 / x)) * (t_m ** 2.0d0)) + ((l_m ** 2.0d0) / x))))
    else
        tmp = 1.0d0 / sqrt(((x + 1.0d0) / (x + (-1.0d0))))
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double t_2 = Math.sqrt(2.0) * t_m;
	double tmp;
	if (t_m <= 8.2e-161) {
		tmp = t_2 / (l_m * (Math.sqrt(2.0) * Math.sqrt((1.0 / x))));
	} else if (t_m <= 3.3e+82) {
		tmp = t_2 / Math.sqrt((2.0 * (((1.0 + (2.0 / x)) * Math.pow(t_m, 2.0)) + (Math.pow(l_m, 2.0) / x))));
	} else {
		tmp = 1.0 / Math.sqrt(((x + 1.0) / (x + -1.0)));
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	t_2 = math.sqrt(2.0) * t_m
	tmp = 0
	if t_m <= 8.2e-161:
		tmp = t_2 / (l_m * (math.sqrt(2.0) * math.sqrt((1.0 / x))))
	elif t_m <= 3.3e+82:
		tmp = t_2 / math.sqrt((2.0 * (((1.0 + (2.0 / x)) * math.pow(t_m, 2.0)) + (math.pow(l_m, 2.0) / x))))
	else:
		tmp = 1.0 / math.sqrt(((x + 1.0) / (x + -1.0)))
	return t_s * tmp
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	t_2 = Float64(sqrt(2.0) * t_m)
	tmp = 0.0
	if (t_m <= 8.2e-161)
		tmp = Float64(t_2 / Float64(l_m * Float64(sqrt(2.0) * sqrt(Float64(1.0 / x)))));
	elseif (t_m <= 3.3e+82)
		tmp = Float64(t_2 / sqrt(Float64(2.0 * Float64(Float64(Float64(1.0 + Float64(2.0 / x)) * (t_m ^ 2.0)) + Float64((l_m ^ 2.0) / x)))));
	else
		tmp = Float64(1.0 / sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	t_2 = sqrt(2.0) * t_m;
	tmp = 0.0;
	if (t_m <= 8.2e-161)
		tmp = t_2 / (l_m * (sqrt(2.0) * sqrt((1.0 / x))));
	elseif (t_m <= 3.3e+82)
		tmp = t_2 / sqrt((2.0 * (((1.0 + (2.0 / x)) * (t_m ^ 2.0)) + ((l_m ^ 2.0) / x))));
	else
		tmp = 1.0 / sqrt(((x + 1.0) / (x + -1.0)));
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 8.2e-161], N[(t$95$2 / N[(l$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.3e+82], N[(t$95$2 / N[Sqrt[N[(2.0 * N[(N[(N[(1.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision] * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[Power[l$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \sqrt{2} \cdot t\_m\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8.2 \cdot 10^{-161}:\\
\;\;\;\;\frac{t\_2}{l\_m \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\

\mathbf{elif}\;t\_m \leq 3.3 \cdot 10^{+82}:\\
\;\;\;\;\frac{t\_2}{\sqrt{2 \cdot \left(\left(1 + \frac{2}{x}\right) \cdot {t\_m}^{2} + \frac{{l\_m}^{2}}{x}\right)}}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{\frac{x + 1}{x + -1}}}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 8.1999999999999994e-161

    1. Initial program 26.6%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-exp-log12.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{e^{\log \left(x + 1\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      2. +-commutative12.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{e^{\log \color{blue}{\left(1 + x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      3. log1p-define12.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{e^{\color{blue}{\mathsf{log1p}\left(x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    4. Applied egg-rr12.2%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{e^{\mathsf{log1p}\left(x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    5. Taylor expanded in x around inf 26.2%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + 2 \cdot \frac{1}{x}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    6. Step-by-step derivation
      1. associate-*r/26.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\left(1 + \color{blue}{\frac{2 \cdot 1}{x}}\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      2. metadata-eval26.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\left(1 + \frac{\color{blue}{2}}{x}\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    7. Simplified26.2%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + \frac{2}{x}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    8. Taylor expanded in l around inf 29.8%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{{\ell}^{2} \cdot \left(2 \cdot \frac{{t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right)}{{\ell}^{2}} + 2 \cdot \frac{1}{x}\right)}}} \]
    9. Taylor expanded in l around inf 16.3%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1}{x}}}} \]
    10. Step-by-step derivation
      1. associate-*l*16.3%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}} \]
    11. Simplified16.3%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}} \]

    if 8.1999999999999994e-161 < t < 3.2999999999999998e82

    1. Initial program 57.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-exp-log23.5%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{e^{\log \left(x + 1\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      2. +-commutative23.5%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{e^{\log \color{blue}{\left(1 + x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      3. log1p-define23.5%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{e^{\color{blue}{\mathsf{log1p}\left(x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    4. Applied egg-rr23.5%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{e^{\mathsf{log1p}\left(x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    5. Taylor expanded in x around inf 57.1%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + 2 \cdot \frac{1}{x}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    6. Step-by-step derivation
      1. associate-*r/57.1%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\left(1 + \color{blue}{\frac{2 \cdot 1}{x}}\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      2. metadata-eval57.1%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\left(1 + \frac{\color{blue}{2}}{x}\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    7. Simplified57.1%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + \frac{2}{x}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    8. Taylor expanded in l around 0 82.7%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left({t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right)\right) + 2 \cdot \frac{{\ell}^{2}}{x}}}} \]
    9. Step-by-step derivation
      1. distribute-lft-out82.7%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left({t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right) + \frac{{\ell}^{2}}{x}\right)}}} \]
      2. *-commutative82.7%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\color{blue}{\left(1 + 2 \cdot \frac{1}{x}\right) \cdot {t}^{2}} + \frac{{\ell}^{2}}{x}\right)}} \]
      3. associate-*r/82.7%

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\left(1 + \frac{\color{blue}{2}}{x}\right) \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)}} \]
    10. Simplified82.7%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left(\left(1 + \frac{2}{x}\right) \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)}}} \]

    if 3.2999999999999998e82 < t

    1. Initial program 30.3%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Simplified30.2%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(x + 1, \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1}, -\ell \cdot \ell\right)}}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 92.7%

      \[\leadsto \sqrt{2} \cdot \color{blue}{\left(\sqrt{0.5} \cdot \sqrt{\frac{x - 1}{1 + x}}\right)} \]
    5. Step-by-step derivation
      1. associate-*r*92.7%

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

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

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

        \[\leadsto \color{blue}{1} \cdot \sqrt{\frac{x - 1}{1 + x}} \]
      5. *-un-lft-identity94.2%

        \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
      6. clear-num94.1%

        \[\leadsto \sqrt{\color{blue}{\frac{1}{\frac{1 + x}{x - 1}}}} \]
      7. +-commutative94.1%

        \[\leadsto \sqrt{\frac{1}{\frac{\color{blue}{x + 1}}{x - 1}}} \]
      8. sub-neg94.1%

        \[\leadsto \sqrt{\frac{1}{\frac{x + 1}{\color{blue}{x + \left(-1\right)}}}} \]
      9. metadata-eval94.1%

        \[\leadsto \sqrt{\frac{1}{\frac{x + 1}{x + \color{blue}{-1}}}} \]
      10. sqrt-div94.2%

        \[\leadsto \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{x + 1}{x + -1}}}} \]
      11. metadata-eval94.2%

        \[\leadsto \frac{\color{blue}{1}}{\sqrt{\frac{x + 1}{x + -1}}} \]
    6. Applied egg-rr94.2%

      \[\leadsto \color{blue}{\frac{1}{\sqrt{\frac{x + 1}{x + -1}}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 4: 80.0% accurate, 0.7× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.05 \cdot 10^{-173}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t\_m}{l\_m \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.05e-173)
    (/ (* (sqrt 2.0) t_m) (* l_m (* (sqrt 2.0) (sqrt (/ 1.0 x)))))
    (sqrt (/ (+ x -1.0) (+ x 1.0))))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (t_m <= 1.05e-173) {
		tmp = (sqrt(2.0) * t_m) / (l_m * (sqrt(2.0) * sqrt((1.0 / x))));
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (t_m <= 1.05d-173) then
        tmp = (sqrt(2.0d0) * t_m) / (l_m * (sqrt(2.0d0) * sqrt((1.0d0 / x))))
    else
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (t_m <= 1.05e-173) {
		tmp = (Math.sqrt(2.0) * t_m) / (l_m * (Math.sqrt(2.0) * Math.sqrt((1.0 / x))));
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if t_m <= 1.05e-173:
		tmp = (math.sqrt(2.0) * t_m) / (l_m * (math.sqrt(2.0) * math.sqrt((1.0 / x))))
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return t_s * tmp
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (t_m <= 1.05e-173)
		tmp = Float64(Float64(sqrt(2.0) * t_m) / Float64(l_m * Float64(sqrt(2.0) * sqrt(Float64(1.0 / x)))));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if (t_m <= 1.05e-173)
		tmp = (sqrt(2.0) * t_m) / (l_m * (sqrt(2.0) * sqrt((1.0 / x))));
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 1.05e-173], N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[(l$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.05 \cdot 10^{-173}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t\_m}{l\_m \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.05000000000000001e-173

    1. Initial program 26.6%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-exp-log12.1%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{e^{\log \left(x + 1\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      2. +-commutative12.1%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{e^{\log \color{blue}{\left(1 + x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      3. log1p-define12.1%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{e^{\color{blue}{\mathsf{log1p}\left(x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    4. Applied egg-rr12.1%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{e^{\mathsf{log1p}\left(x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    5. Taylor expanded in x around inf 26.2%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + 2 \cdot \frac{1}{x}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    6. Step-by-step derivation
      1. associate-*r/26.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\left(1 + \color{blue}{\frac{2 \cdot 1}{x}}\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      2. metadata-eval26.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\left(1 + \frac{\color{blue}{2}}{x}\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    7. Simplified26.2%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + \frac{2}{x}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    8. Taylor expanded in l around inf 30.0%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{{\ell}^{2} \cdot \left(2 \cdot \frac{{t}^{2} \cdot \left(1 + 2 \cdot \frac{1}{x}\right)}{{\ell}^{2}} + 2 \cdot \frac{1}{x}\right)}}} \]
    9. Taylor expanded in l around inf 16.4%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1}{x}}}} \]
    10. Step-by-step derivation
      1. associate-*l*16.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}} \]
    11. Simplified16.4%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}} \]

    if 1.05000000000000001e-173 < t

    1. Initial program 43.3%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Simplified38.0%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(x + 1, \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1}, -\ell \cdot \ell\right)}}} \]
    3. Add Preprocessing
    4. Applied egg-rr71.7%

      \[\leadsto \sqrt{2} \cdot \color{blue}{e^{\log \left(\frac{t}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, \sqrt{2} \cdot t\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}\right)}} \]
    5. Taylor expanded in t around inf 82.3%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.05 \cdot 10^{-173}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 78.5% accurate, 2.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.1 \cdot 10^{-174}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t\_m}{l\_m}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 3.1e-174)
    (* (sqrt x) (/ t_m l_m))
    (sqrt (/ (+ x -1.0) (+ x 1.0))))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (t_m <= 3.1e-174) {
		tmp = sqrt(x) * (t_m / l_m);
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (t_m <= 3.1d-174) then
        tmp = sqrt(x) * (t_m / l_m)
    else
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (t_m <= 3.1e-174) {
		tmp = Math.sqrt(x) * (t_m / l_m);
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if t_m <= 3.1e-174:
		tmp = math.sqrt(x) * (t_m / l_m)
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return t_s * tmp
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (t_m <= 3.1e-174)
		tmp = Float64(sqrt(x) * Float64(t_m / l_m));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if (t_m <= 3.1e-174)
		tmp = sqrt(x) * (t_m / l_m);
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 3.1e-174], N[(N[Sqrt[x], $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.1 \cdot 10^{-174}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t\_m}{l\_m}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.0999999999999999e-174

    1. Initial program 26.6%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-exp-log12.1%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{e^{\log \left(x + 1\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      2. +-commutative12.1%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{e^{\log \color{blue}{\left(1 + x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      3. log1p-define12.1%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{e^{\color{blue}{\mathsf{log1p}\left(x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    4. Applied egg-rr12.1%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{e^{\mathsf{log1p}\left(x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    5. Taylor expanded in x around inf 26.2%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + 2 \cdot \frac{1}{x}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    6. Step-by-step derivation
      1. associate-*r/26.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\left(1 + \color{blue}{\frac{2 \cdot 1}{x}}\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      2. metadata-eval26.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\left(1 + \frac{\color{blue}{2}}{x}\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    7. Simplified26.2%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + \frac{2}{x}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    8. Taylor expanded in l around inf 14.6%

      \[\leadsto \color{blue}{\frac{t \cdot \left(\sqrt{0.5} \cdot \sqrt{2}\right)}{\ell} \cdot \sqrt{x}} \]
    9. Step-by-step derivation
      1. *-commutative14.6%

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

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(t \cdot \frac{\sqrt{0.5} \cdot \sqrt{2}}{\ell}\right)} \]
      3. *-commutative14.6%

        \[\leadsto \sqrt{x} \cdot \left(t \cdot \frac{\color{blue}{\sqrt{2} \cdot \sqrt{0.5}}}{\ell}\right) \]
    10. Simplified14.6%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(t \cdot \frac{\sqrt{2} \cdot \sqrt{0.5}}{\ell}\right)} \]
    11. Step-by-step derivation
      1. pow114.6%

        \[\leadsto \color{blue}{{\left(\sqrt{x} \cdot \left(t \cdot \frac{\sqrt{2} \cdot \sqrt{0.5}}{\ell}\right)\right)}^{1}} \]
      2. sqrt-unprod14.7%

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

        \[\leadsto {\left(\sqrt{x} \cdot \left(t \cdot \frac{\sqrt{\color{blue}{1}}}{\ell}\right)\right)}^{1} \]
      4. metadata-eval14.7%

        \[\leadsto {\left(\sqrt{x} \cdot \left(t \cdot \frac{\color{blue}{1}}{\ell}\right)\right)}^{1} \]
      5. associate-*r/14.8%

        \[\leadsto {\left(\sqrt{x} \cdot \color{blue}{\frac{t \cdot 1}{\ell}}\right)}^{1} \]
    12. Applied egg-rr14.8%

      \[\leadsto \color{blue}{{\left(\sqrt{x} \cdot \frac{t \cdot 1}{\ell}\right)}^{1}} \]
    13. Step-by-step derivation
      1. unpow114.8%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \frac{t \cdot 1}{\ell}} \]
      2. *-rgt-identity14.8%

        \[\leadsto \sqrt{x} \cdot \frac{\color{blue}{t}}{\ell} \]
    14. Simplified14.8%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \frac{t}{\ell}} \]

    if 3.0999999999999999e-174 < t

    1. Initial program 43.3%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Simplified38.0%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(x + 1, \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1}, -\ell \cdot \ell\right)}}} \]
    3. Add Preprocessing
    4. Applied egg-rr71.7%

      \[\leadsto \sqrt{2} \cdot \color{blue}{e^{\log \left(\frac{t}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, \sqrt{2} \cdot t\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}\right)}} \]
    5. Taylor expanded in t around inf 82.3%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification40.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.1 \cdot 10^{-174}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 78.3% accurate, 2.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.4 \cdot 10^{-174}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t\_m}{l\_m}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1 + \frac{0.5 + \frac{-0.5}{x}}{x}}{x}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.4e-174)
    (* (sqrt x) (/ t_m l_m))
    (+ 1.0 (/ (+ -1.0 (/ (+ 0.5 (/ -0.5 x)) x)) x)))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (t_m <= 1.4e-174) {
		tmp = sqrt(x) * (t_m / l_m);
	} else {
		tmp = 1.0 + ((-1.0 + ((0.5 + (-0.5 / x)) / x)) / x);
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (t_m <= 1.4d-174) then
        tmp = sqrt(x) * (t_m / l_m)
    else
        tmp = 1.0d0 + (((-1.0d0) + ((0.5d0 + ((-0.5d0) / x)) / x)) / x)
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (t_m <= 1.4e-174) {
		tmp = Math.sqrt(x) * (t_m / l_m);
	} else {
		tmp = 1.0 + ((-1.0 + ((0.5 + (-0.5 / x)) / x)) / x);
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if t_m <= 1.4e-174:
		tmp = math.sqrt(x) * (t_m / l_m)
	else:
		tmp = 1.0 + ((-1.0 + ((0.5 + (-0.5 / x)) / x)) / x)
	return t_s * tmp
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (t_m <= 1.4e-174)
		tmp = Float64(sqrt(x) * Float64(t_m / l_m));
	else
		tmp = Float64(1.0 + Float64(Float64(-1.0 + Float64(Float64(0.5 + Float64(-0.5 / x)) / x)) / x));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if (t_m <= 1.4e-174)
		tmp = sqrt(x) * (t_m / l_m);
	else
		tmp = 1.0 + ((-1.0 + ((0.5 + (-0.5 / x)) / x)) / x);
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 1.4e-174], N[(N[Sqrt[x], $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 + N[(N[(0.5 + N[(-0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.4 \cdot 10^{-174}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t\_m}{l\_m}\\

\mathbf{else}:\\
\;\;\;\;1 + \frac{-1 + \frac{0.5 + \frac{-0.5}{x}}{x}}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.39999999999999999e-174

    1. Initial program 26.6%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-exp-log12.1%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{e^{\log \left(x + 1\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      2. +-commutative12.1%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{e^{\log \color{blue}{\left(1 + x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      3. log1p-define12.1%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{e^{\color{blue}{\mathsf{log1p}\left(x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    4. Applied egg-rr12.1%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\color{blue}{e^{\mathsf{log1p}\left(x\right)}}}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    5. Taylor expanded in x around inf 26.2%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + 2 \cdot \frac{1}{x}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    6. Step-by-step derivation
      1. associate-*r/26.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\left(1 + \color{blue}{\frac{2 \cdot 1}{x}}\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      2. metadata-eval26.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\left(1 + \frac{\color{blue}{2}}{x}\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    7. Simplified26.2%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(1 + \frac{2}{x}\right)} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    8. Taylor expanded in l around inf 14.6%

      \[\leadsto \color{blue}{\frac{t \cdot \left(\sqrt{0.5} \cdot \sqrt{2}\right)}{\ell} \cdot \sqrt{x}} \]
    9. Step-by-step derivation
      1. *-commutative14.6%

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

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(t \cdot \frac{\sqrt{0.5} \cdot \sqrt{2}}{\ell}\right)} \]
      3. *-commutative14.6%

        \[\leadsto \sqrt{x} \cdot \left(t \cdot \frac{\color{blue}{\sqrt{2} \cdot \sqrt{0.5}}}{\ell}\right) \]
    10. Simplified14.6%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(t \cdot \frac{\sqrt{2} \cdot \sqrt{0.5}}{\ell}\right)} \]
    11. Step-by-step derivation
      1. pow114.6%

        \[\leadsto \color{blue}{{\left(\sqrt{x} \cdot \left(t \cdot \frac{\sqrt{2} \cdot \sqrt{0.5}}{\ell}\right)\right)}^{1}} \]
      2. sqrt-unprod14.7%

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

        \[\leadsto {\left(\sqrt{x} \cdot \left(t \cdot \frac{\sqrt{\color{blue}{1}}}{\ell}\right)\right)}^{1} \]
      4. metadata-eval14.7%

        \[\leadsto {\left(\sqrt{x} \cdot \left(t \cdot \frac{\color{blue}{1}}{\ell}\right)\right)}^{1} \]
      5. associate-*r/14.8%

        \[\leadsto {\left(\sqrt{x} \cdot \color{blue}{\frac{t \cdot 1}{\ell}}\right)}^{1} \]
    12. Applied egg-rr14.8%

      \[\leadsto \color{blue}{{\left(\sqrt{x} \cdot \frac{t \cdot 1}{\ell}\right)}^{1}} \]
    13. Step-by-step derivation
      1. unpow114.8%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \frac{t \cdot 1}{\ell}} \]
      2. *-rgt-identity14.8%

        \[\leadsto \sqrt{x} \cdot \frac{\color{blue}{t}}{\ell} \]
    14. Simplified14.8%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \frac{t}{\ell}} \]

    if 1.39999999999999999e-174 < t

    1. Initial program 43.3%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Simplified38.0%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(x + 1, \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1}, -\ell \cdot \ell\right)}}} \]
    3. Add Preprocessing
    4. Applied egg-rr71.7%

      \[\leadsto \sqrt{2} \cdot \color{blue}{e^{\log \left(\frac{t}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, \sqrt{2} \cdot t\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}\right)}} \]
    5. Taylor expanded in t around inf 82.3%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    6. Step-by-step derivation
      1. +-commutative82.3%

        \[\leadsto \sqrt{\frac{x - 1}{\color{blue}{x + 1}}} \]
      2. flip-+40.8%

        \[\leadsto \sqrt{\frac{x - 1}{\color{blue}{\frac{x \cdot x - 1 \cdot 1}{x - 1}}}} \]
      3. metadata-eval40.8%

        \[\leadsto \sqrt{\frac{x - 1}{\frac{x \cdot x - \color{blue}{1}}{x - 1}}} \]
      4. fma-neg40.8%

        \[\leadsto \sqrt{\frac{x - 1}{\frac{\color{blue}{\mathsf{fma}\left(x, x, -1\right)}}{x - 1}}} \]
      5. metadata-eval40.8%

        \[\leadsto \sqrt{\frac{x - 1}{\frac{\mathsf{fma}\left(x, x, \color{blue}{-1}\right)}{x - 1}}} \]
      6. sub-neg40.8%

        \[\leadsto \sqrt{\frac{x - 1}{\frac{\mathsf{fma}\left(x, x, -1\right)}{\color{blue}{x + \left(-1\right)}}}} \]
      7. metadata-eval40.8%

        \[\leadsto \sqrt{\frac{x - 1}{\frac{\mathsf{fma}\left(x, x, -1\right)}{x + \color{blue}{-1}}}} \]
    7. Applied egg-rr40.8%

      \[\leadsto \sqrt{\frac{x - 1}{\color{blue}{\frac{\mathsf{fma}\left(x, x, -1\right)}{x + -1}}}} \]
    8. Taylor expanded in x around -inf 81.6%

      \[\leadsto \color{blue}{1 + -1 \cdot \frac{1 + -1 \cdot \frac{0.5 - 0.5 \cdot \frac{1}{x}}{x}}{x}} \]
    9. Step-by-step derivation
      1. mul-1-neg81.6%

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

        \[\leadsto \color{blue}{1 - \frac{1 + -1 \cdot \frac{0.5 - 0.5 \cdot \frac{1}{x}}{x}}{x}} \]
      3. mul-1-neg81.6%

        \[\leadsto 1 - \frac{1 + \color{blue}{\left(-\frac{0.5 - 0.5 \cdot \frac{1}{x}}{x}\right)}}{x} \]
      4. unsub-neg81.6%

        \[\leadsto 1 - \frac{\color{blue}{1 - \frac{0.5 - 0.5 \cdot \frac{1}{x}}{x}}}{x} \]
      5. sub-neg81.6%

        \[\leadsto 1 - \frac{1 - \frac{\color{blue}{0.5 + \left(-0.5 \cdot \frac{1}{x}\right)}}{x}}{x} \]
      6. associate-*r/81.6%

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

        \[\leadsto 1 - \frac{1 - \frac{0.5 + \left(-\frac{\color{blue}{0.5}}{x}\right)}{x}}{x} \]
      8. distribute-neg-frac81.6%

        \[\leadsto 1 - \frac{1 - \frac{0.5 + \color{blue}{\frac{-0.5}{x}}}{x}}{x} \]
      9. metadata-eval81.6%

        \[\leadsto 1 - \frac{1 - \frac{0.5 + \frac{\color{blue}{-0.5}}{x}}{x}}{x} \]
    10. Simplified81.6%

      \[\leadsto \color{blue}{1 - \frac{1 - \frac{0.5 + \frac{-0.5}{x}}{x}}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.4 \cdot 10^{-174}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1 + \frac{0.5 + \frac{-0.5}{x}}{x}}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 76.1% accurate, 17.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(1 + \frac{-1 + \frac{0.5 + \frac{-0.5}{x}}{x}}{x}\right) \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (* t_s (+ 1.0 (/ (+ -1.0 (/ (+ 0.5 (/ -0.5 x)) x)) x))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	return t_s * (1.0 + ((-1.0 + ((0.5 + (-0.5 / x)) / x)) / x));
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    code = t_s * (1.0d0 + (((-1.0d0) + ((0.5d0 + ((-0.5d0) / x)) / x)) / x))
end function
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	return t_s * (1.0 + ((-1.0 + ((0.5 + (-0.5 / x)) / x)) / x));
}
l_m = math.fabs(l)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	return t_s * (1.0 + ((-1.0 + ((0.5 + (-0.5 / x)) / x)) / x))
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	return Float64(t_s * Float64(1.0 + Float64(Float64(-1.0 + Float64(Float64(0.5 + Float64(-0.5 / x)) / x)) / x)))
end
l_m = abs(l);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, l_m, t_m)
	tmp = t_s * (1.0 + ((-1.0 + ((0.5 + (-0.5 / x)) / x)) / x));
end
l_m = N[Abs[l], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * N[(1.0 + N[(N[(-1.0 + N[(N[(0.5 + N[(-0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

    \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
  2. Simplified29.1%

    \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(x + 1, \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1}, -\ell \cdot \ell\right)}}} \]
  3. Add Preprocessing
  4. Applied egg-rr30.5%

    \[\leadsto \sqrt{2} \cdot \color{blue}{e^{\log \left(\frac{t}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, \sqrt{2} \cdot t\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}\right)}} \]
  5. Taylor expanded in t around inf 34.3%

    \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
  6. Step-by-step derivation
    1. +-commutative34.3%

      \[\leadsto \sqrt{\frac{x - 1}{\color{blue}{x + 1}}} \]
    2. flip-+17.7%

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

      \[\leadsto \sqrt{\frac{x - 1}{\frac{x \cdot x - \color{blue}{1}}{x - 1}}} \]
    4. fma-neg17.7%

      \[\leadsto \sqrt{\frac{x - 1}{\frac{\color{blue}{\mathsf{fma}\left(x, x, -1\right)}}{x - 1}}} \]
    5. metadata-eval17.7%

      \[\leadsto \sqrt{\frac{x - 1}{\frac{\mathsf{fma}\left(x, x, \color{blue}{-1}\right)}{x - 1}}} \]
    6. sub-neg17.7%

      \[\leadsto \sqrt{\frac{x - 1}{\frac{\mathsf{fma}\left(x, x, -1\right)}{\color{blue}{x + \left(-1\right)}}}} \]
    7. metadata-eval17.7%

      \[\leadsto \sqrt{\frac{x - 1}{\frac{\mathsf{fma}\left(x, x, -1\right)}{x + \color{blue}{-1}}}} \]
  7. Applied egg-rr17.7%

    \[\leadsto \sqrt{\frac{x - 1}{\color{blue}{\frac{\mathsf{fma}\left(x, x, -1\right)}{x + -1}}}} \]
  8. Taylor expanded in x around -inf 34.1%

    \[\leadsto \color{blue}{1 + -1 \cdot \frac{1 + -1 \cdot \frac{0.5 - 0.5 \cdot \frac{1}{x}}{x}}{x}} \]
  9. Step-by-step derivation
    1. mul-1-neg34.1%

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

      \[\leadsto \color{blue}{1 - \frac{1 + -1 \cdot \frac{0.5 - 0.5 \cdot \frac{1}{x}}{x}}{x}} \]
    3. mul-1-neg34.1%

      \[\leadsto 1 - \frac{1 + \color{blue}{\left(-\frac{0.5 - 0.5 \cdot \frac{1}{x}}{x}\right)}}{x} \]
    4. unsub-neg34.1%

      \[\leadsto 1 - \frac{\color{blue}{1 - \frac{0.5 - 0.5 \cdot \frac{1}{x}}{x}}}{x} \]
    5. sub-neg34.1%

      \[\leadsto 1 - \frac{1 - \frac{\color{blue}{0.5 + \left(-0.5 \cdot \frac{1}{x}\right)}}{x}}{x} \]
    6. associate-*r/34.1%

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

      \[\leadsto 1 - \frac{1 - \frac{0.5 + \left(-\frac{\color{blue}{0.5}}{x}\right)}{x}}{x} \]
    8. distribute-neg-frac34.1%

      \[\leadsto 1 - \frac{1 - \frac{0.5 + \color{blue}{\frac{-0.5}{x}}}{x}}{x} \]
    9. metadata-eval34.1%

      \[\leadsto 1 - \frac{1 - \frac{0.5 + \frac{\color{blue}{-0.5}}{x}}{x}}{x} \]
  10. Simplified34.1%

    \[\leadsto \color{blue}{1 - \frac{1 - \frac{0.5 + \frac{-0.5}{x}}{x}}{x}} \]
  11. Final simplification34.1%

    \[\leadsto 1 + \frac{-1 + \frac{0.5 + \frac{-0.5}{x}}{x}}{x} \]
  12. Add Preprocessing

Alternative 8: 76.0% accurate, 25.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(1 + \frac{-1 - \frac{-0.5}{x}}{x}\right) \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (* t_s (+ 1.0 (/ (- -1.0 (/ -0.5 x)) x))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	return t_s * (1.0 + ((-1.0 - (-0.5 / x)) / x));
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    code = t_s * (1.0d0 + (((-1.0d0) - ((-0.5d0) / x)) / x))
end function
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	return t_s * (1.0 + ((-1.0 - (-0.5 / x)) / x));
}
l_m = math.fabs(l)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	return t_s * (1.0 + ((-1.0 - (-0.5 / x)) / x))
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	return Float64(t_s * Float64(1.0 + Float64(Float64(-1.0 - Float64(-0.5 / x)) / x)))
end
l_m = abs(l);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, l_m, t_m)
	tmp = t_s * (1.0 + ((-1.0 - (-0.5 / x)) / x));
end
l_m = N[Abs[l], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * N[(1.0 + N[(N[(-1.0 - N[(-0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

    \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
  2. Simplified29.1%

    \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(x + 1, \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1}, -\ell \cdot \ell\right)}}} \]
  3. Add Preprocessing
  4. Applied egg-rr30.5%

    \[\leadsto \sqrt{2} \cdot \color{blue}{e^{\log \left(\frac{t}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, \sqrt{2} \cdot t\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}\right)}} \]
  5. Taylor expanded in t around inf 34.3%

    \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
  6. Step-by-step derivation
    1. +-commutative34.3%

      \[\leadsto \sqrt{\frac{x - 1}{\color{blue}{x + 1}}} \]
    2. flip-+17.7%

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

      \[\leadsto \sqrt{\frac{x - 1}{\frac{x \cdot x - \color{blue}{1}}{x - 1}}} \]
    4. fma-neg17.7%

      \[\leadsto \sqrt{\frac{x - 1}{\frac{\color{blue}{\mathsf{fma}\left(x, x, -1\right)}}{x - 1}}} \]
    5. metadata-eval17.7%

      \[\leadsto \sqrt{\frac{x - 1}{\frac{\mathsf{fma}\left(x, x, \color{blue}{-1}\right)}{x - 1}}} \]
    6. sub-neg17.7%

      \[\leadsto \sqrt{\frac{x - 1}{\frac{\mathsf{fma}\left(x, x, -1\right)}{\color{blue}{x + \left(-1\right)}}}} \]
    7. metadata-eval17.7%

      \[\leadsto \sqrt{\frac{x - 1}{\frac{\mathsf{fma}\left(x, x, -1\right)}{x + \color{blue}{-1}}}} \]
  7. Applied egg-rr17.7%

    \[\leadsto \sqrt{\frac{x - 1}{\color{blue}{\frac{\mathsf{fma}\left(x, x, -1\right)}{x + -1}}}} \]
  8. Taylor expanded in x around -inf 34.0%

    \[\leadsto \color{blue}{1 + -1 \cdot \frac{1 - 0.5 \cdot \frac{1}{x}}{x}} \]
  9. Step-by-step derivation
    1. mul-1-neg34.0%

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

      \[\leadsto \color{blue}{1 - \frac{1 - 0.5 \cdot \frac{1}{x}}{x}} \]
    3. sub-neg34.0%

      \[\leadsto 1 - \frac{\color{blue}{1 + \left(-0.5 \cdot \frac{1}{x}\right)}}{x} \]
    4. associate-*r/34.0%

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

      \[\leadsto 1 - \frac{1 + \left(-\frac{\color{blue}{0.5}}{x}\right)}{x} \]
    6. distribute-neg-frac34.0%

      \[\leadsto 1 - \frac{1 + \color{blue}{\frac{-0.5}{x}}}{x} \]
    7. metadata-eval34.0%

      \[\leadsto 1 - \frac{1 + \frac{\color{blue}{-0.5}}{x}}{x} \]
  10. Simplified34.0%

    \[\leadsto \color{blue}{1 - \frac{1 + \frac{-0.5}{x}}{x}} \]
  11. Final simplification34.0%

    \[\leadsto 1 + \frac{-1 - \frac{-0.5}{x}}{x} \]
  12. Add Preprocessing

Alternative 9: 75.8% accurate, 45.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(1 + \frac{-1}{x}\right) \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m) :precision binary64 (* t_s (+ 1.0 (/ -1.0 x))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	return t_s * (1.0 + (-1.0 / x));
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    code = t_s * (1.0d0 + ((-1.0d0) / x))
end function
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	return t_s * (1.0 + (-1.0 / x));
}
l_m = math.fabs(l)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	return t_s * (1.0 + (-1.0 / x))
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	return Float64(t_s * Float64(1.0 + Float64(-1.0 / x)))
end
l_m = abs(l);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, l_m, t_m)
	tmp = t_s * (1.0 + (-1.0 / x));
end
l_m = N[Abs[l], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(1 + \frac{-1}{x}\right)
\end{array}
Derivation
  1. Initial program 32.9%

    \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
  2. Simplified29.1%

    \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(x + 1, \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1}, -\ell \cdot \ell\right)}}} \]
  3. Add Preprocessing
  4. Taylor expanded in t around inf 33.8%

    \[\leadsto \sqrt{2} \cdot \color{blue}{\left(\sqrt{0.5} \cdot \sqrt{\frac{x - 1}{1 + x}}\right)} \]
  5. Step-by-step derivation
    1. associate-*r*33.8%

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

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

      \[\leadsto \sqrt{\color{blue}{1}} \cdot \sqrt{\frac{x - 1}{1 + x}} \]
    4. metadata-eval34.3%

      \[\leadsto \color{blue}{1} \cdot \sqrt{\frac{x - 1}{1 + x}} \]
    5. *-un-lft-identity34.3%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    6. clear-num34.3%

      \[\leadsto \sqrt{\color{blue}{\frac{1}{\frac{1 + x}{x - 1}}}} \]
    7. +-commutative34.3%

      \[\leadsto \sqrt{\frac{1}{\frac{\color{blue}{x + 1}}{x - 1}}} \]
    8. sub-neg34.3%

      \[\leadsto \sqrt{\frac{1}{\frac{x + 1}{\color{blue}{x + \left(-1\right)}}}} \]
    9. metadata-eval34.3%

      \[\leadsto \sqrt{\frac{1}{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    10. sqrt-div34.3%

      \[\leadsto \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{x + 1}{x + -1}}}} \]
    11. metadata-eval34.3%

      \[\leadsto \frac{\color{blue}{1}}{\sqrt{\frac{x + 1}{x + -1}}} \]
  6. Applied egg-rr34.3%

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

    \[\leadsto \color{blue}{1 - \frac{1}{x}} \]
  8. Final simplification33.9%

    \[\leadsto 1 + \frac{-1}{x} \]
  9. Add Preprocessing

Alternative 10: 75.2% accurate, 225.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot 1 \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m) :precision binary64 (* t_s 1.0))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	return t_s * 1.0;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    code = t_s * 1.0d0
end function
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	return t_s * 1.0;
}
l_m = math.fabs(l)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	return t_s * 1.0
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	return Float64(t_s * 1.0)
end
l_m = abs(l);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, l_m, t_m)
	tmp = t_s * 1.0;
end
l_m = N[Abs[l], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * 1.0), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot 1
\end{array}
Derivation
  1. Initial program 32.9%

    \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
  2. Simplified29.1%

    \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(x + 1, \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x + -1}, -\ell \cdot \ell\right)}}} \]
  3. Add Preprocessing
  4. Taylor expanded in t around inf 33.8%

    \[\leadsto \sqrt{2} \cdot \color{blue}{\left(\sqrt{0.5} \cdot \sqrt{\frac{x - 1}{1 + x}}\right)} \]
  5. Step-by-step derivation
    1. associate-*r*33.8%

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

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

      \[\leadsto \sqrt{\color{blue}{1}} \cdot \sqrt{\frac{x - 1}{1 + x}} \]
    4. metadata-eval34.3%

      \[\leadsto \color{blue}{1} \cdot \sqrt{\frac{x - 1}{1 + x}} \]
    5. *-un-lft-identity34.3%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    6. clear-num34.3%

      \[\leadsto \sqrt{\color{blue}{\frac{1}{\frac{1 + x}{x - 1}}}} \]
    7. +-commutative34.3%

      \[\leadsto \sqrt{\frac{1}{\frac{\color{blue}{x + 1}}{x - 1}}} \]
    8. sub-neg34.3%

      \[\leadsto \sqrt{\frac{1}{\frac{x + 1}{\color{blue}{x + \left(-1\right)}}}} \]
    9. metadata-eval34.3%

      \[\leadsto \sqrt{\frac{1}{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    10. sqrt-div34.3%

      \[\leadsto \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{x + 1}{x + -1}}}} \]
    11. metadata-eval34.3%

      \[\leadsto \frac{\color{blue}{1}}{\sqrt{\frac{x + 1}{x + -1}}} \]
  6. Applied egg-rr34.3%

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

    \[\leadsto \color{blue}{1} \]
  8. Add Preprocessing

Reproduce

?
herbie shell --seed 2024137 
(FPCore (x l t)
  :name "Toniolo and Linder, Equation (7)"
  :precision binary64
  (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))