Toniolo and Linder, Equation (7)

Percentage Accurate: 33.2% → 82.5%
Time: 28.6s
Alternatives: 14
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 14 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.2% 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: 82.5% accurate, 0.5× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \frac{\ell \cdot \ell}{x}\\ t_2 := 2 + \frac{4}{x}\\ t_3 := \sqrt{\frac{x - 1}{x + 1}}\\ \mathbf{if}\;t \leq -4.4 \cdot 10^{-166}:\\ \;\;\;\;-t_3\\ \mathbf{elif}\;t \leq 1.62 \cdot 10^{-227}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-156}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(\frac{\ell}{x} \cdot \frac{\ell}{t}, \sqrt{\frac{1}{t_2}}, t \cdot \sqrt{t_2}\right)}\\ \mathbf{elif}\;t \leq 6.1 \cdot 10^{+28}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{t_1 + \left(t_1 + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ (* l l) x))
        (t_2 (+ 2.0 (/ 4.0 x)))
        (t_3 (sqrt (/ (- x 1.0) (+ x 1.0)))))
   (if (<= t -4.4e-166)
     (- t_3)
     (if (<= t 1.62e-227)
       (* t (/ (sqrt 2.0) (* l (* (sqrt 2.0) (sqrt (/ 1.0 x))))))
       (if (<= t 3.5e-156)
         (*
          t
          (/
           (sqrt 2.0)
           (fma (* (/ l x) (/ l t)) (sqrt (/ 1.0 t_2)) (* t (sqrt t_2)))))
         (if (<= t 6.1e+28)
           (* t (sqrt (/ 2.0 (+ t_1 (+ t_1 (* (* t t) (+ 2.0 (/ 2.0 x))))))))
           t_3))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = (l * l) / x;
	double t_2 = 2.0 + (4.0 / x);
	double t_3 = sqrt(((x - 1.0) / (x + 1.0)));
	double tmp;
	if (t <= -4.4e-166) {
		tmp = -t_3;
	} else if (t <= 1.62e-227) {
		tmp = t * (sqrt(2.0) / (l * (sqrt(2.0) * sqrt((1.0 / x)))));
	} else if (t <= 3.5e-156) {
		tmp = t * (sqrt(2.0) / fma(((l / x) * (l / t)), sqrt((1.0 / t_2)), (t * sqrt(t_2))));
	} else if (t <= 6.1e+28) {
		tmp = t * sqrt((2.0 / (t_1 + (t_1 + ((t * t) * (2.0 + (2.0 / x)))))));
	} else {
		tmp = t_3;
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = Float64(Float64(l * l) / x)
	t_2 = Float64(2.0 + Float64(4.0 / x))
	t_3 = sqrt(Float64(Float64(x - 1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -4.4e-166)
		tmp = Float64(-t_3);
	elseif (t <= 1.62e-227)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * Float64(sqrt(2.0) * sqrt(Float64(1.0 / x))))));
	elseif (t <= 3.5e-156)
		tmp = Float64(t * Float64(sqrt(2.0) / fma(Float64(Float64(l / x) * Float64(l / t)), sqrt(Float64(1.0 / t_2)), Float64(t * sqrt(t_2)))));
	elseif (t <= 6.1e+28)
		tmp = Float64(t * sqrt(Float64(2.0 / Float64(t_1 + Float64(t_1 + Float64(Float64(t * t) * Float64(2.0 + Float64(2.0 / x))))))));
	else
		tmp = t_3;
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 + N[(4.0 / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(x - 1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -4.4e-166], (-t$95$3), If[LessEqual[t, 1.62e-227], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e-156], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[(l / x), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$2), $MachinePrecision]], $MachinePrecision] + N[(t * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.1e+28], N[(t * N[Sqrt[N[(2.0 / N[(t$95$1 + N[(t$95$1 + N[(N[(t * t), $MachinePrecision] * N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{x}\\
t_2 := 2 + \frac{4}{x}\\
t_3 := \sqrt{\frac{x - 1}{x + 1}}\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{-166}:\\
\;\;\;\;-t_3\\

\mathbf{elif}\;t \leq 1.62 \cdot 10^{-227}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\

\mathbf{elif}\;t \leq 3.5 \cdot 10^{-156}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(\frac{\ell}{x} \cdot \frac{\ell}{t}, \sqrt{\frac{1}{t_2}}, t \cdot \sqrt{t_2}\right)}\\

\mathbf{elif}\;t \leq 6.1 \cdot 10^{+28}:\\
\;\;\;\;t \cdot \sqrt{\frac{2}{t_1 + \left(t_1 + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.4000000000000002e-166

    1. Initial program 47.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. Step-by-step derivation
      1. associate-*l/47.9%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg47.9%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg47.9%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    6. Step-by-step derivation
      1. mul-1-neg87.5%

        \[\leadsto \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}} \]
      2. sub-neg87.5%

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

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

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

    if -4.4000000000000002e-166 < t < 1.62000000000000002e-227

    1. Initial program 1.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. Step-by-step derivation
      1. associate-*l/1.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right) + \left(--1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}} \cdot t \]
      7. mul-1-neg69.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \left(-\color{blue}{\left(-\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}} \cdot t \]
      8. remove-double-neg69.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}} \cdot t \]
      9. fma-def69.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}}{x}}} \cdot t \]
      10. unpow269.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, \color{blue}{t \cdot t}, {\ell}^{2}\right)}{x}}} \cdot t \]
      11. unpow269.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x}}} \cdot t \]
    6. Simplified69.9%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}} \cdot t \]
    7. Taylor expanded in t around 0 53.9%

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

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

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

    if 1.62000000000000002e-227 < t < 3.4999999999999999e-156

    1. Initial program 17.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. Step-by-step derivation
      1. associate-*l/17.1%

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

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

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}} \cdot t \]
    5. Step-by-step derivation
      1. sub-neg29.1%

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \left(-\color{blue}{\left(-\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}} \cdot t \]
      8. remove-double-neg29.1%

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, \color{blue}{t \cdot t}, {\ell}^{2}\right)}{x}}} \cdot t \]
      11. unpow229.1%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x}}} \cdot t \]
    6. Simplified29.1%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}} \cdot t \]
    7. Taylor expanded in t around inf 89.5%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}} + \frac{{\ell}^{2}}{t \cdot x} \cdot \sqrt{\frac{1}{2 + 4 \cdot \frac{1}{x}}}}} \cdot t \]
    8. Step-by-step derivation
      1. +-commutative89.5%

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{\frac{{\ell}^{2}}{t \cdot x} \cdot \sqrt{\frac{1}{2 + 4 \cdot \frac{1}{x}}} + t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}}} \cdot t \]
      2. fma-def89.5%

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(\frac{{\ell}^{2}}{t \cdot x}, \sqrt{\frac{1}{2 + 4 \cdot \frac{1}{x}}}, t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}\right)}} \cdot t \]
      3. unpow289.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(\frac{\color{blue}{\ell \cdot \ell}}{t \cdot x}, \sqrt{\frac{1}{2 + 4 \cdot \frac{1}{x}}}, t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}\right)} \cdot t \]
      4. *-commutative89.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(\frac{\ell \cdot \ell}{\color{blue}{x \cdot t}}, \sqrt{\frac{1}{2 + 4 \cdot \frac{1}{x}}}, t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}\right)} \cdot t \]
      5. times-frac89.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(\color{blue}{\frac{\ell}{x} \cdot \frac{\ell}{t}}, \sqrt{\frac{1}{2 + 4 \cdot \frac{1}{x}}}, t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}\right)} \cdot t \]
      6. associate-*r/89.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(\frac{\ell}{x} \cdot \frac{\ell}{t}, \sqrt{\frac{1}{2 + \color{blue}{\frac{4 \cdot 1}{x}}}}, t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}\right)} \cdot t \]
      7. metadata-eval89.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(\frac{\ell}{x} \cdot \frac{\ell}{t}, \sqrt{\frac{1}{2 + \frac{\color{blue}{4}}{x}}}, t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}\right)} \cdot t \]
      8. associate-*r/89.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(\frac{\ell}{x} \cdot \frac{\ell}{t}, \sqrt{\frac{1}{2 + \frac{4}{x}}}, t \cdot \sqrt{2 + \color{blue}{\frac{4 \cdot 1}{x}}}\right)} \cdot t \]
      9. metadata-eval89.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(\frac{\ell}{x} \cdot \frac{\ell}{t}, \sqrt{\frac{1}{2 + \frac{4}{x}}}, t \cdot \sqrt{2 + \frac{\color{blue}{4}}{x}}\right)} \cdot t \]
    9. Simplified89.5%

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

    if 3.4999999999999999e-156 < t < 6.1000000000000002e28

    1. Initial program 57.0%

      \[\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. Step-by-step derivation
      1. associate-*l/57.0%

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

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

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}} \cdot t \]
    5. Step-by-step derivation
      1. sub-neg81.4%

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right) + \left(--1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}} \cdot t \]
      7. mul-1-neg81.4%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \left(-\color{blue}{\left(-\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}} \cdot t \]
      8. remove-double-neg81.4%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}} \cdot t \]
      9. fma-def81.4%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}}{x}}} \cdot t \]
      10. unpow281.4%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, \color{blue}{t \cdot t}, {\ell}^{2}\right)}{x}}} \cdot t \]
      11. unpow281.4%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x}}} \cdot t \]
    6. Simplified81.4%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}} \cdot t \]
    7. Taylor expanded in t around 0 81.3%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{{\ell}^{2}}{x}}}} \cdot t \]
    8. Step-by-step derivation
      1. unpow281.3%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\ell \cdot \ell}}{x}}} \cdot t \]
    9. Simplified81.3%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{\ell \cdot \ell}{x}}}} \cdot t \]
    10. Step-by-step derivation
      1. *-un-lft-identity81.3%

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

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

        \[\leadsto \left(1 \cdot \sqrt{\frac{2}{\color{blue}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}}\right) \cdot t \]
      4. associate-/l*81.4%

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

      \[\leadsto \color{blue}{\left(1 \cdot \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}\right)} \cdot t \]
    12. Step-by-step derivation
      1. *-lft-identity81.4%

        \[\leadsto \color{blue}{\sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}} \cdot t \]
      2. fma-udef81.4%

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

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

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

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \frac{t}{\frac{x}{t}} + \left(2 \cdot {t}^{2} + \frac{\color{blue}{{\ell}^{2}}}{x}\right)\right)}} \cdot t \]
      6. associate-+r+81.4%

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \color{blue}{\left(\left(2 \cdot \frac{t}{\frac{x}{t}} + 2 \cdot {t}^{2}\right) + \frac{{\ell}^{2}}{x}\right)}}} \cdot t \]
    13. Simplified81.4%

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

    if 6.1000000000000002e28 < t

    1. Initial program 38.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. Step-by-step derivation
      1. associate-*l/38.1%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg38.1%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg38.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{-166}:\\ \;\;\;\;-\sqrt{\frac{x - 1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.62 \cdot 10^{-227}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-156}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(\frac{\ell}{x} \cdot \frac{\ell}{t}, \sqrt{\frac{1}{2 + \frac{4}{x}}}, t \cdot \sqrt{2 + \frac{4}{x}}\right)}\\ \mathbf{elif}\;t \leq 6.1 \cdot 10^{+28}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{x + 1}}\\ \end{array} \]

Alternative 2: 79.7% accurate, 0.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{2} \cdot t\\ t_2 := \frac{x + 1}{x - 1}\\ t_3 := \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\\ t_4 := 2 \cdot \left(t \cdot t\right)\\ t_5 := \frac{t_1}{\sqrt{t_2 \cdot \left(\ell \cdot \ell + t_4\right) - \ell \cdot \ell}}\\ \mathbf{if}\;t_5 \leq -1:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{t_4 + \mathsf{fma}\left(\ell, \ell, t_3\right)}{x \cdot x} + \left(\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, \frac{t \cdot t}{{x}^{3}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right) + \frac{\ell \cdot \ell}{{x}^{3}}\right)\right) + \left(\frac{t_3}{{x}^{3}} + \frac{t_3}{x}\right)\right)}}\\ \mathbf{elif}\;t_5 \leq 2:\\ \;\;\;\;\frac{t_1}{\mathsf{hypot}\left(\sqrt{t_2} \cdot \mathsf{hypot}\left(\ell, t_1\right), \ell\right)}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\sqrt{\frac{1}{\frac{1}{x - 1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}} \cdot \frac{\sqrt{2}}{\ell}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (* (sqrt 2.0) t))
        (t_2 (/ (+ x 1.0) (- x 1.0)))
        (t_3 (fma 2.0 (* t t) (* l l)))
        (t_4 (* 2.0 (* t t)))
        (t_5 (/ t_1 (sqrt (- (* t_2 (+ (* l l) t_4)) (* l l))))))
   (if (<= t_5 -1.0)
     (*
      t
      (/
       (sqrt 2.0)
       (sqrt
        (+
         (/ (+ t_4 (fma l l t_3)) (* x x))
         (+
          (fma
           2.0
           (/ (* t t) x)
           (fma
            2.0
            (/ (* t t) (pow x 3.0))
            (+ (fma 2.0 (* t t) (/ (* l l) x)) (/ (* l l) (pow x 3.0)))))
          (+ (/ t_3 (pow x 3.0)) (/ t_3 x)))))))
     (if (<= t_5 2.0)
       (/ t_1 (hypot (* (sqrt t_2) (hypot l t_1)) l))
       (*
        t
        (*
         (sqrt (/ 1.0 (+ (/ 1.0 (- x 1.0)) (+ (/ 1.0 x) (/ 1.0 (* x x))))))
         (/ (sqrt 2.0) l)))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(2.0) * t;
	double t_2 = (x + 1.0) / (x - 1.0);
	double t_3 = fma(2.0, (t * t), (l * l));
	double t_4 = 2.0 * (t * t);
	double t_5 = t_1 / sqrt(((t_2 * ((l * l) + t_4)) - (l * l)));
	double tmp;
	if (t_5 <= -1.0) {
		tmp = t * (sqrt(2.0) / sqrt((((t_4 + fma(l, l, t_3)) / (x * x)) + (fma(2.0, ((t * t) / x), fma(2.0, ((t * t) / pow(x, 3.0)), (fma(2.0, (t * t), ((l * l) / x)) + ((l * l) / pow(x, 3.0))))) + ((t_3 / pow(x, 3.0)) + (t_3 / x))))));
	} else if (t_5 <= 2.0) {
		tmp = t_1 / hypot((sqrt(t_2) * hypot(l, t_1)), l);
	} else {
		tmp = t * (sqrt((1.0 / ((1.0 / (x - 1.0)) + ((1.0 / x) + (1.0 / (x * x)))))) * (sqrt(2.0) / l));
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = Float64(sqrt(2.0) * t)
	t_2 = Float64(Float64(x + 1.0) / Float64(x - 1.0))
	t_3 = fma(2.0, Float64(t * t), Float64(l * l))
	t_4 = Float64(2.0 * Float64(t * t))
	t_5 = Float64(t_1 / sqrt(Float64(Float64(t_2 * Float64(Float64(l * l) + t_4)) - Float64(l * l))))
	tmp = 0.0
	if (t_5 <= -1.0)
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(t_4 + fma(l, l, t_3)) / Float64(x * x)) + Float64(fma(2.0, Float64(Float64(t * t) / x), fma(2.0, Float64(Float64(t * t) / (x ^ 3.0)), Float64(fma(2.0, Float64(t * t), Float64(Float64(l * l) / x)) + Float64(Float64(l * l) / (x ^ 3.0))))) + Float64(Float64(t_3 / (x ^ 3.0)) + Float64(t_3 / x)))))));
	elseif (t_5 <= 2.0)
		tmp = Float64(t_1 / hypot(Float64(sqrt(t_2) * hypot(l, t_1)), l));
	else
		tmp = Float64(t * Float64(sqrt(Float64(1.0 / Float64(Float64(1.0 / Float64(x - 1.0)) + Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x * x)))))) * Float64(sqrt(2.0) / l)));
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$1 / N[Sqrt[N[(N[(t$95$2 * N[(N[(l * l), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -1.0], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(t$95$4 + N[(l * l + t$95$3), $MachinePrecision]), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(N[(t * t), $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(t$95$3 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 2.0], N[(t$95$1 / N[Sqrt[N[(N[Sqrt[t$95$2], $MachinePrecision] * N[Sqrt[l ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[N[(1.0 / N[(N[(1.0 / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot t\\
t_2 := \frac{x + 1}{x - 1}\\
t_3 := \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\\
t_4 := 2 \cdot \left(t \cdot t\right)\\
t_5 := \frac{t_1}{\sqrt{t_2 \cdot \left(\ell \cdot \ell + t_4\right) - \ell \cdot \ell}}\\
\mathbf{if}\;t_5 \leq -1:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{t_4 + \mathsf{fma}\left(\ell, \ell, t_3\right)}{x \cdot x} + \left(\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, \frac{t \cdot t}{{x}^{3}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right) + \frac{\ell \cdot \ell}{{x}^{3}}\right)\right) + \left(\frac{t_3}{{x}^{3}} + \frac{t_3}{x}\right)\right)}}\\

\mathbf{elif}\;t_5 \leq 2:\\
\;\;\;\;\frac{t_1}{\mathsf{hypot}\left(\sqrt{t_2} \cdot \mathsf{hypot}\left(\ell, t_1\right), \ell\right)}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(\sqrt{\frac{1}{\frac{1}{x - 1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}} \cdot \frac{\sqrt{2}}{\ell}\right)\\


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

    1. Initial program 64.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. Step-by-step derivation
      1. associate-*l/64.2%

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\frac{2 \cdot \left(t \cdot t\right) + \mathsf{fma}\left(\ell, \ell, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\right)}{x \cdot x} + \left(\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, \frac{t \cdot t}{{x}^{3}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right) + \frac{\ell \cdot \ell}{{x}^{3}}\right)\right) - \left(\frac{-\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x} - \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{{x}^{3}}\right)\right)}}} \cdot t \]

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

    1. Initial program 43.2%

      \[\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. Step-by-step derivation
      1. associate-*l/43.2%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg43.2%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg43.2%

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

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

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

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

    1. Initial program 0.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. Step-by-step derivation
      1. associate-*l/0.9%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg0.9%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg0.9%

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

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

      \[\leadsto t \cdot \color{blue}{\left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\left(\frac{1}{x - 1} + \frac{x}{x - 1}\right) - 1}}\right)} \]
    5. Step-by-step derivation
      1. *-commutative1.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t \cdot \left(\sqrt{\frac{1}{\frac{1}{-1 + x} + \color{blue}{\left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}}} \cdot \frac{\sqrt{2}}{\ell}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.2%

    \[\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 -1:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{2 \cdot \left(t \cdot t\right) + \mathsf{fma}\left(\ell, \ell, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\right)}{x \cdot x} + \left(\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, \frac{t \cdot t}{{x}^{3}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right) + \frac{\ell \cdot \ell}{{x}^{3}}\right)\right) + \left(\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{{x}^{3}} + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)\right)}}\\ \mathbf{elif}\;\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:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x - 1}} \cdot \mathsf{hypot}\left(\ell, \sqrt{2} \cdot t\right), \ell\right)}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\sqrt{\frac{1}{\frac{1}{x - 1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}} \cdot \frac{\sqrt{2}}{\ell}\right)\\ \end{array} \]

Alternative 3: 79.3% accurate, 0.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{2} \cdot t\\ t_2 := \frac{x + 1}{x - 1}\\ t_3 := \frac{t_1}{\sqrt{t_2 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\ t_4 := \frac{\ell \cdot \ell}{x}\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{t_4 + \left(t_4 + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\ \mathbf{elif}\;t_3 \leq 2:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\mathsf{hypot}\left(\sqrt{t_2} \cdot \mathsf{hypot}\left(\ell, t_1\right), \ell\right)}{t}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\sqrt{\frac{1}{\frac{1}{x - 1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}} \cdot \frac{\sqrt{2}}{\ell}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (* (sqrt 2.0) t))
        (t_2 (/ (+ x 1.0) (- x 1.0)))
        (t_3 (/ t_1 (sqrt (- (* t_2 (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
        (t_4 (/ (* l l) x)))
   (if (<= t_3 (- INFINITY))
     (* t (sqrt (/ 2.0 (+ t_4 (+ t_4 (* (* t t) (+ 2.0 (/ 2.0 x))))))))
     (if (<= t_3 2.0)
       (/ (sqrt 2.0) (/ (hypot (* (sqrt t_2) (hypot l t_1)) l) t))
       (*
        t
        (*
         (sqrt (/ 1.0 (+ (/ 1.0 (- x 1.0)) (+ (/ 1.0 x) (/ 1.0 (* x x))))))
         (/ (sqrt 2.0) l)))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(2.0) * t;
	double t_2 = (x + 1.0) / (x - 1.0);
	double t_3 = t_1 / sqrt(((t_2 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
	double t_4 = (l * l) / x;
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = t * sqrt((2.0 / (t_4 + (t_4 + ((t * t) * (2.0 + (2.0 / x)))))));
	} else if (t_3 <= 2.0) {
		tmp = sqrt(2.0) / (hypot((sqrt(t_2) * hypot(l, t_1)), l) / t);
	} else {
		tmp = t * (sqrt((1.0 / ((1.0 / (x - 1.0)) + ((1.0 / x) + (1.0 / (x * x)))))) * (sqrt(2.0) / l));
	}
	return tmp;
}
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double t_1 = Math.sqrt(2.0) * t;
	double t_2 = (x + 1.0) / (x - 1.0);
	double t_3 = t_1 / Math.sqrt(((t_2 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
	double t_4 = (l * l) / x;
	double tmp;
	if (t_3 <= -Double.POSITIVE_INFINITY) {
		tmp = t * Math.sqrt((2.0 / (t_4 + (t_4 + ((t * t) * (2.0 + (2.0 / x)))))));
	} else if (t_3 <= 2.0) {
		tmp = Math.sqrt(2.0) / (Math.hypot((Math.sqrt(t_2) * Math.hypot(l, t_1)), l) / t);
	} else {
		tmp = t * (Math.sqrt((1.0 / ((1.0 / (x - 1.0)) + ((1.0 / x) + (1.0 / (x * x)))))) * (Math.sqrt(2.0) / l));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = math.sqrt(2.0) * t
	t_2 = (x + 1.0) / (x - 1.0)
	t_3 = t_1 / math.sqrt(((t_2 * ((l * l) + (2.0 * (t * t)))) - (l * l)))
	t_4 = (l * l) / x
	tmp = 0
	if t_3 <= -math.inf:
		tmp = t * math.sqrt((2.0 / (t_4 + (t_4 + ((t * t) * (2.0 + (2.0 / x)))))))
	elif t_3 <= 2.0:
		tmp = math.sqrt(2.0) / (math.hypot((math.sqrt(t_2) * math.hypot(l, t_1)), l) / t)
	else:
		tmp = t * (math.sqrt((1.0 / ((1.0 / (x - 1.0)) + ((1.0 / x) + (1.0 / (x * x)))))) * (math.sqrt(2.0) / l))
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = Float64(sqrt(2.0) * t)
	t_2 = Float64(Float64(x + 1.0) / Float64(x - 1.0))
	t_3 = Float64(t_1 / sqrt(Float64(Float64(t_2 * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l))))
	t_4 = Float64(Float64(l * l) / x)
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = Float64(t * sqrt(Float64(2.0 / Float64(t_4 + Float64(t_4 + Float64(Float64(t * t) * Float64(2.0 + Float64(2.0 / x))))))));
	elseif (t_3 <= 2.0)
		tmp = Float64(sqrt(2.0) / Float64(hypot(Float64(sqrt(t_2) * hypot(l, t_1)), l) / t));
	else
		tmp = Float64(t * Float64(sqrt(Float64(1.0 / Float64(Float64(1.0 / Float64(x - 1.0)) + Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x * x)))))) * Float64(sqrt(2.0) / l)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = sqrt(2.0) * t;
	t_2 = (x + 1.0) / (x - 1.0);
	t_3 = t_1 / sqrt(((t_2 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
	t_4 = (l * l) / x;
	tmp = 0.0;
	if (t_3 <= -Inf)
		tmp = t * sqrt((2.0 / (t_4 + (t_4 + ((t * t) * (2.0 + (2.0 / x)))))));
	elseif (t_3 <= 2.0)
		tmp = sqrt(2.0) / (hypot((sqrt(t_2) * hypot(l, t_1)), l) / t);
	else
		tmp = t * (sqrt((1.0 / ((1.0 / (x - 1.0)) + ((1.0 / x) + (1.0 / (x * x)))))) * (sqrt(2.0) / l));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / N[Sqrt[N[(N[(t$95$2 * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(t * N[Sqrt[N[(2.0 / N[(t$95$4 + N[(t$95$4 + N[(N[(t * t), $MachinePrecision] * N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2.0], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[Sqrt[t$95$2], $MachinePrecision] * N[Sqrt[l ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[N[(1.0 / N[(N[(1.0 / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot t\\
t_2 := \frac{x + 1}{x - 1}\\
t_3 := \frac{t_1}{\sqrt{t_2 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
t_4 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t \cdot \sqrt{\frac{2}{t_4 + \left(t_4 + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\

\mathbf{elif}\;t_3 \leq 2:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\mathsf{hypot}\left(\sqrt{t_2} \cdot \mathsf{hypot}\left(\ell, t_1\right), \ell\right)}{t}}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(\sqrt{\frac{1}{\frac{1}{x - 1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}} \cdot \frac{\sqrt{2}}{\ell}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -inf.0

    1. Initial program 2.7%

      \[\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. Step-by-step derivation
      1. associate-*l/2.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right) + \left(--1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}} \cdot t \]
      7. mul-1-neg63.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \left(-\color{blue}{\left(-\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}} \cdot t \]
      8. remove-double-neg63.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}} \cdot t \]
      9. fma-def63.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}}{x}}} \cdot t \]
      10. unpow263.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, \color{blue}{t \cdot t}, {\ell}^{2}\right)}{x}}} \cdot t \]
      11. unpow263.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x}}} \cdot t \]
    6. Simplified63.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}} \cdot t \]
    7. Taylor expanded in t around 0 63.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{{\ell}^{2}}{x}}}} \cdot t \]
    8. Step-by-step derivation
      1. unpow263.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\ell \cdot \ell}}{x}}} \cdot t \]
    9. Simplified63.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{\ell \cdot \ell}{x}}}} \cdot t \]
    10. Step-by-step derivation
      1. *-un-lft-identity63.8%

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

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

        \[\leadsto \left(1 \cdot \sqrt{\frac{2}{\color{blue}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}}\right) \cdot t \]
      4. associate-/l*64.3%

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

      \[\leadsto \color{blue}{\left(1 \cdot \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}\right)} \cdot t \]
    12. Step-by-step derivation
      1. *-lft-identity64.3%

        \[\leadsto \color{blue}{\sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}} \cdot t \]
      2. fma-udef64.3%

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \color{blue}{\left(2 \cdot \frac{t}{\frac{x}{t}} + \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}} \cdot t \]
      3. fma-udef64.3%

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \frac{t}{\frac{x}{t}} + \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \frac{\ell \cdot \ell}{x}\right)}\right)}} \cdot t \]
      4. unpow264.3%

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

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \frac{t}{\frac{x}{t}} + \left(2 \cdot {t}^{2} + \frac{\color{blue}{{\ell}^{2}}}{x}\right)\right)}} \cdot t \]
      6. associate-+r+64.3%

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

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

    if -inf.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < 2

    1. Initial program 62.2%

      \[\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. Step-by-step derivation
      1. associate-*l/62.3%

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

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

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

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

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

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

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

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

    1. Initial program 0.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. Step-by-step derivation
      1. associate-*l/0.9%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg0.9%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg0.9%

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

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

      \[\leadsto t \cdot \color{blue}{\left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\left(\frac{1}{x - 1} + \frac{x}{x - 1}\right) - 1}}\right)} \]
    5. Step-by-step derivation
      1. *-commutative1.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t \cdot \left(\sqrt{\frac{1}{\frac{1}{-1 + x} + \color{blue}{\left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}}} \cdot \frac{\sqrt{2}}{\ell}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.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 -\infty:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\ \mathbf{elif}\;\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:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x - 1}} \cdot \mathsf{hypot}\left(\ell, \sqrt{2} \cdot t\right), \ell\right)}{t}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\sqrt{\frac{1}{\frac{1}{x - 1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}} \cdot \frac{\sqrt{2}}{\ell}\right)\\ \end{array} \]

Alternative 4: 79.3% accurate, 0.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{2} \cdot t\\ t_2 := \frac{x + 1}{x - 1}\\ t_3 := \frac{t_1}{\sqrt{t_2 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\ t_4 := \frac{\ell \cdot \ell}{x}\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{t_4 + \left(t_4 + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\ \mathbf{elif}\;t_3 \leq 2:\\ \;\;\;\;\frac{t_1}{\mathsf{hypot}\left(\sqrt{t_2} \cdot \mathsf{hypot}\left(\ell, t_1\right), \ell\right)}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\sqrt{\frac{1}{\frac{1}{x - 1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}} \cdot \frac{\sqrt{2}}{\ell}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (* (sqrt 2.0) t))
        (t_2 (/ (+ x 1.0) (- x 1.0)))
        (t_3 (/ t_1 (sqrt (- (* t_2 (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
        (t_4 (/ (* l l) x)))
   (if (<= t_3 (- INFINITY))
     (* t (sqrt (/ 2.0 (+ t_4 (+ t_4 (* (* t t) (+ 2.0 (/ 2.0 x))))))))
     (if (<= t_3 2.0)
       (/ t_1 (hypot (* (sqrt t_2) (hypot l t_1)) l))
       (*
        t
        (*
         (sqrt (/ 1.0 (+ (/ 1.0 (- x 1.0)) (+ (/ 1.0 x) (/ 1.0 (* x x))))))
         (/ (sqrt 2.0) l)))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(2.0) * t;
	double t_2 = (x + 1.0) / (x - 1.0);
	double t_3 = t_1 / sqrt(((t_2 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
	double t_4 = (l * l) / x;
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = t * sqrt((2.0 / (t_4 + (t_4 + ((t * t) * (2.0 + (2.0 / x)))))));
	} else if (t_3 <= 2.0) {
		tmp = t_1 / hypot((sqrt(t_2) * hypot(l, t_1)), l);
	} else {
		tmp = t * (sqrt((1.0 / ((1.0 / (x - 1.0)) + ((1.0 / x) + (1.0 / (x * x)))))) * (sqrt(2.0) / l));
	}
	return tmp;
}
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double t_1 = Math.sqrt(2.0) * t;
	double t_2 = (x + 1.0) / (x - 1.0);
	double t_3 = t_1 / Math.sqrt(((t_2 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
	double t_4 = (l * l) / x;
	double tmp;
	if (t_3 <= -Double.POSITIVE_INFINITY) {
		tmp = t * Math.sqrt((2.0 / (t_4 + (t_4 + ((t * t) * (2.0 + (2.0 / x)))))));
	} else if (t_3 <= 2.0) {
		tmp = t_1 / Math.hypot((Math.sqrt(t_2) * Math.hypot(l, t_1)), l);
	} else {
		tmp = t * (Math.sqrt((1.0 / ((1.0 / (x - 1.0)) + ((1.0 / x) + (1.0 / (x * x)))))) * (Math.sqrt(2.0) / l));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = math.sqrt(2.0) * t
	t_2 = (x + 1.0) / (x - 1.0)
	t_3 = t_1 / math.sqrt(((t_2 * ((l * l) + (2.0 * (t * t)))) - (l * l)))
	t_4 = (l * l) / x
	tmp = 0
	if t_3 <= -math.inf:
		tmp = t * math.sqrt((2.0 / (t_4 + (t_4 + ((t * t) * (2.0 + (2.0 / x)))))))
	elif t_3 <= 2.0:
		tmp = t_1 / math.hypot((math.sqrt(t_2) * math.hypot(l, t_1)), l)
	else:
		tmp = t * (math.sqrt((1.0 / ((1.0 / (x - 1.0)) + ((1.0 / x) + (1.0 / (x * x)))))) * (math.sqrt(2.0) / l))
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = Float64(sqrt(2.0) * t)
	t_2 = Float64(Float64(x + 1.0) / Float64(x - 1.0))
	t_3 = Float64(t_1 / sqrt(Float64(Float64(t_2 * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l))))
	t_4 = Float64(Float64(l * l) / x)
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = Float64(t * sqrt(Float64(2.0 / Float64(t_4 + Float64(t_4 + Float64(Float64(t * t) * Float64(2.0 + Float64(2.0 / x))))))));
	elseif (t_3 <= 2.0)
		tmp = Float64(t_1 / hypot(Float64(sqrt(t_2) * hypot(l, t_1)), l));
	else
		tmp = Float64(t * Float64(sqrt(Float64(1.0 / Float64(Float64(1.0 / Float64(x - 1.0)) + Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x * x)))))) * Float64(sqrt(2.0) / l)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = sqrt(2.0) * t;
	t_2 = (x + 1.0) / (x - 1.0);
	t_3 = t_1 / sqrt(((t_2 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
	t_4 = (l * l) / x;
	tmp = 0.0;
	if (t_3 <= -Inf)
		tmp = t * sqrt((2.0 / (t_4 + (t_4 + ((t * t) * (2.0 + (2.0 / x)))))));
	elseif (t_3 <= 2.0)
		tmp = t_1 / hypot((sqrt(t_2) * hypot(l, t_1)), l);
	else
		tmp = t * (sqrt((1.0 / ((1.0 / (x - 1.0)) + ((1.0 / x) + (1.0 / (x * x)))))) * (sqrt(2.0) / l));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / N[Sqrt[N[(N[(t$95$2 * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(t * N[Sqrt[N[(2.0 / N[(t$95$4 + N[(t$95$4 + N[(N[(t * t), $MachinePrecision] * N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2.0], N[(t$95$1 / N[Sqrt[N[(N[Sqrt[t$95$2], $MachinePrecision] * N[Sqrt[l ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[N[(1.0 / N[(N[(1.0 / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot t\\
t_2 := \frac{x + 1}{x - 1}\\
t_3 := \frac{t_1}{\sqrt{t_2 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
t_4 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t \cdot \sqrt{\frac{2}{t_4 + \left(t_4 + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\

\mathbf{elif}\;t_3 \leq 2:\\
\;\;\;\;\frac{t_1}{\mathsf{hypot}\left(\sqrt{t_2} \cdot \mathsf{hypot}\left(\ell, t_1\right), \ell\right)}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(\sqrt{\frac{1}{\frac{1}{x - 1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}} \cdot \frac{\sqrt{2}}{\ell}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -inf.0

    1. Initial program 2.7%

      \[\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. Step-by-step derivation
      1. associate-*l/2.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right) + \left(--1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}} \cdot t \]
      7. mul-1-neg63.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \left(-\color{blue}{\left(-\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}} \cdot t \]
      8. remove-double-neg63.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}} \cdot t \]
      9. fma-def63.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}}{x}}} \cdot t \]
      10. unpow263.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, \color{blue}{t \cdot t}, {\ell}^{2}\right)}{x}}} \cdot t \]
      11. unpow263.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x}}} \cdot t \]
    6. Simplified63.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}} \cdot t \]
    7. Taylor expanded in t around 0 63.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{{\ell}^{2}}{x}}}} \cdot t \]
    8. Step-by-step derivation
      1. unpow263.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\ell \cdot \ell}}{x}}} \cdot t \]
    9. Simplified63.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{\ell \cdot \ell}{x}}}} \cdot t \]
    10. Step-by-step derivation
      1. *-un-lft-identity63.8%

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

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

        \[\leadsto \left(1 \cdot \sqrt{\frac{2}{\color{blue}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}}\right) \cdot t \]
      4. associate-/l*64.3%

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

      \[\leadsto \color{blue}{\left(1 \cdot \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}\right)} \cdot t \]
    12. Step-by-step derivation
      1. *-lft-identity64.3%

        \[\leadsto \color{blue}{\sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}} \cdot t \]
      2. fma-udef64.3%

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \color{blue}{\left(2 \cdot \frac{t}{\frac{x}{t}} + \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}} \cdot t \]
      3. fma-udef64.3%

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \frac{t}{\frac{x}{t}} + \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \frac{\ell \cdot \ell}{x}\right)}\right)}} \cdot t \]
      4. unpow264.3%

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

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \frac{t}{\frac{x}{t}} + \left(2 \cdot {t}^{2} + \frac{\color{blue}{{\ell}^{2}}}{x}\right)\right)}} \cdot t \]
      6. associate-+r+64.3%

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

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

    if -inf.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < 2

    1. Initial program 62.2%

      \[\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. Step-by-step derivation
      1. associate-*l/62.3%

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

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

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

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

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

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

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

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

    1. Initial program 0.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. Step-by-step derivation
      1. associate-*l/0.9%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg0.9%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg0.9%

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

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

      \[\leadsto t \cdot \color{blue}{\left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\left(\frac{1}{x - 1} + \frac{x}{x - 1}\right) - 1}}\right)} \]
    5. Step-by-step derivation
      1. *-commutative1.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t \cdot \left(\sqrt{\frac{1}{\frac{1}{-1 + x} + \color{blue}{\left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}}} \cdot \frac{\sqrt{2}}{\ell}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.2%

    \[\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 -\infty:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\ \mathbf{elif}\;\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:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x - 1}} \cdot \mathsf{hypot}\left(\ell, \sqrt{2} \cdot t\right), \ell\right)}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\sqrt{\frac{1}{\frac{1}{x - 1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}} \cdot \frac{\sqrt{2}}{\ell}\right)\\ \end{array} \]

Alternative 5: 79.4% accurate, 0.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\frac{x - 1}{x + 1}}\\ \mathbf{if}\;t \leq -3.2 \cdot 10^{-166}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-228}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (- x 1.0) (+ x 1.0)))))
   (if (<= t -3.2e-166)
     (- t_1)
     (if (<= t 2.7e-228)
       (* t (/ (sqrt 2.0) (* l (* (sqrt 2.0) (sqrt (/ 1.0 x))))))
       t_1))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(((x - 1.0) / (x + 1.0)));
	double tmp;
	if (t <= -3.2e-166) {
		tmp = -t_1;
	} else if (t <= 2.7e-228) {
		tmp = t * (sqrt(2.0) / (l * (sqrt(2.0) * sqrt((1.0 / x)))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = sqrt(((x - 1.0d0) / (x + 1.0d0)))
    if (t <= (-3.2d-166)) then
        tmp = -t_1
    else if (t <= 2.7d-228) then
        tmp = t * (sqrt(2.0d0) / (l * (sqrt(2.0d0) * sqrt((1.0d0 / x)))))
    else
        tmp = t_1
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double t_1 = Math.sqrt(((x - 1.0) / (x + 1.0)));
	double tmp;
	if (t <= -3.2e-166) {
		tmp = -t_1;
	} else if (t <= 2.7e-228) {
		tmp = t * (Math.sqrt(2.0) / (l * (Math.sqrt(2.0) * Math.sqrt((1.0 / x)))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = math.sqrt(((x - 1.0) / (x + 1.0)))
	tmp = 0
	if t <= -3.2e-166:
		tmp = -t_1
	elif t <= 2.7e-228:
		tmp = t * (math.sqrt(2.0) / (l * (math.sqrt(2.0) * math.sqrt((1.0 / x)))))
	else:
		tmp = t_1
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x - 1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -3.2e-166)
		tmp = Float64(-t_1);
	elseif (t <= 2.7e-228)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * Float64(sqrt(2.0) * sqrt(Float64(1.0 / x))))));
	else
		tmp = t_1;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = sqrt(((x - 1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -3.2e-166)
		tmp = -t_1;
	elseif (t <= 2.7e-228)
		tmp = t * (sqrt(2.0) / (l * (sqrt(2.0) * sqrt((1.0 / x)))));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x - 1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -3.2e-166], (-t$95$1), If[LessEqual[t, 2.7e-228], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x - 1}{x + 1}}\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{-166}:\\
\;\;\;\;-t_1\\

\mathbf{elif}\;t \leq 2.7 \cdot 10^{-228}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


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

    1. Initial program 47.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. Step-by-step derivation
      1. associate-*l/47.9%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg47.9%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg47.9%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    6. Step-by-step derivation
      1. mul-1-neg87.5%

        \[\leadsto \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}} \]
      2. sub-neg87.5%

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

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

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

    if -3.20000000000000001e-166 < t < 2.69999999999999984e-228

    1. Initial program 1.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. Step-by-step derivation
      1. associate-*l/1.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right) + \left(--1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}} \cdot t \]
      7. mul-1-neg69.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \left(-\color{blue}{\left(-\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}} \cdot t \]
      8. remove-double-neg69.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}} \cdot t \]
      9. fma-def69.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}}{x}}} \cdot t \]
      10. unpow269.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, \color{blue}{t \cdot t}, {\ell}^{2}\right)}{x}}} \cdot t \]
      11. unpow269.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x}}} \cdot t \]
    6. Simplified69.9%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}} \cdot t \]
    7. Taylor expanded in t around 0 53.9%

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

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

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

    if 2.69999999999999984e-228 < t

    1. Initial program 41.4%

      \[\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. Step-by-step derivation
      1. associate-*l/41.4%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg41.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{-166}:\\ \;\;\;\;-\sqrt{\frac{x - 1}{x + 1}}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-228}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{x + 1}}\\ \end{array} \]

Alternative 6: 81.5% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{x \cdot 0.5}\right)\\ t_2 := \frac{\ell \cdot \ell}{x}\\ t_3 := \sqrt{\frac{x - 1}{x + 1}}\\ \mathbf{if}\;t \leq -2.46 \cdot 10^{-166}:\\ \;\;\;\;-t_3\\ \mathbf{elif}\;t \leq 5.9 \cdot 10^{-232}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-157}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.9 \cdot 10^{+26}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{t_2 + \left(t_2 + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (* t (* (/ (sqrt 2.0) l) (sqrt (* x 0.5)))))
        (t_2 (/ (* l l) x))
        (t_3 (sqrt (/ (- x 1.0) (+ x 1.0)))))
   (if (<= t -2.46e-166)
     (- t_3)
     (if (<= t 5.9e-232)
       t_1
       (if (<= t 4.5e-157)
         1.0
         (if (<= t 8e-148)
           t_1
           (if (<= t 5.9e+26)
             (* t (sqrt (/ 2.0 (+ t_2 (+ t_2 (* (* t t) (+ 2.0 (/ 2.0 x))))))))
             t_3)))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = t * ((sqrt(2.0) / l) * sqrt((x * 0.5)));
	double t_2 = (l * l) / x;
	double t_3 = sqrt(((x - 1.0) / (x + 1.0)));
	double tmp;
	if (t <= -2.46e-166) {
		tmp = -t_3;
	} else if (t <= 5.9e-232) {
		tmp = t_1;
	} else if (t <= 4.5e-157) {
		tmp = 1.0;
	} else if (t <= 8e-148) {
		tmp = t_1;
	} else if (t <= 5.9e+26) {
		tmp = t * sqrt((2.0 / (t_2 + (t_2 + ((t * t) * (2.0 + (2.0 / x)))))));
	} else {
		tmp = t_3;
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = t * ((sqrt(2.0d0) / l) * sqrt((x * 0.5d0)))
    t_2 = (l * l) / x
    t_3 = sqrt(((x - 1.0d0) / (x + 1.0d0)))
    if (t <= (-2.46d-166)) then
        tmp = -t_3
    else if (t <= 5.9d-232) then
        tmp = t_1
    else if (t <= 4.5d-157) then
        tmp = 1.0d0
    else if (t <= 8d-148) then
        tmp = t_1
    else if (t <= 5.9d+26) then
        tmp = t * sqrt((2.0d0 / (t_2 + (t_2 + ((t * t) * (2.0d0 + (2.0d0 / x)))))))
    else
        tmp = t_3
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double t_1 = t * ((Math.sqrt(2.0) / l) * Math.sqrt((x * 0.5)));
	double t_2 = (l * l) / x;
	double t_3 = Math.sqrt(((x - 1.0) / (x + 1.0)));
	double tmp;
	if (t <= -2.46e-166) {
		tmp = -t_3;
	} else if (t <= 5.9e-232) {
		tmp = t_1;
	} else if (t <= 4.5e-157) {
		tmp = 1.0;
	} else if (t <= 8e-148) {
		tmp = t_1;
	} else if (t <= 5.9e+26) {
		tmp = t * Math.sqrt((2.0 / (t_2 + (t_2 + ((t * t) * (2.0 + (2.0 / x)))))));
	} else {
		tmp = t_3;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = t * ((math.sqrt(2.0) / l) * math.sqrt((x * 0.5)))
	t_2 = (l * l) / x
	t_3 = math.sqrt(((x - 1.0) / (x + 1.0)))
	tmp = 0
	if t <= -2.46e-166:
		tmp = -t_3
	elif t <= 5.9e-232:
		tmp = t_1
	elif t <= 4.5e-157:
		tmp = 1.0
	elif t <= 8e-148:
		tmp = t_1
	elif t <= 5.9e+26:
		tmp = t * math.sqrt((2.0 / (t_2 + (t_2 + ((t * t) * (2.0 + (2.0 / x)))))))
	else:
		tmp = t_3
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = Float64(t * Float64(Float64(sqrt(2.0) / l) * sqrt(Float64(x * 0.5))))
	t_2 = Float64(Float64(l * l) / x)
	t_3 = sqrt(Float64(Float64(x - 1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -2.46e-166)
		tmp = Float64(-t_3);
	elseif (t <= 5.9e-232)
		tmp = t_1;
	elseif (t <= 4.5e-157)
		tmp = 1.0;
	elseif (t <= 8e-148)
		tmp = t_1;
	elseif (t <= 5.9e+26)
		tmp = Float64(t * sqrt(Float64(2.0 / Float64(t_2 + Float64(t_2 + Float64(Float64(t * t) * Float64(2.0 + Float64(2.0 / x))))))));
	else
		tmp = t_3;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = t * ((sqrt(2.0) / l) * sqrt((x * 0.5)));
	t_2 = (l * l) / x;
	t_3 = sqrt(((x - 1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -2.46e-166)
		tmp = -t_3;
	elseif (t <= 5.9e-232)
		tmp = t_1;
	elseif (t <= 4.5e-157)
		tmp = 1.0;
	elseif (t <= 8e-148)
		tmp = t_1;
	elseif (t <= 5.9e+26)
		tmp = t * sqrt((2.0 / (t_2 + (t_2 + ((t * t) * (2.0 + (2.0 / x)))))));
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(x * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(x - 1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.46e-166], (-t$95$3), If[LessEqual[t, 5.9e-232], t$95$1, If[LessEqual[t, 4.5e-157], 1.0, If[LessEqual[t, 8e-148], t$95$1, If[LessEqual[t, 5.9e+26], N[(t * N[Sqrt[N[(2.0 / N[(t$95$2 + N[(t$95$2 + N[(N[(t * t), $MachinePrecision] * N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{x \cdot 0.5}\right)\\
t_2 := \frac{\ell \cdot \ell}{x}\\
t_3 := \sqrt{\frac{x - 1}{x + 1}}\\
\mathbf{if}\;t \leq -2.46 \cdot 10^{-166}:\\
\;\;\;\;-t_3\\

\mathbf{elif}\;t \leq 5.9 \cdot 10^{-232}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-157}:\\
\;\;\;\;1\\

\mathbf{elif}\;t \leq 8 \cdot 10^{-148}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 5.9 \cdot 10^{+26}:\\
\;\;\;\;t \cdot \sqrt{\frac{2}{t_2 + \left(t_2 + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.46e-166

    1. Initial program 47.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. Step-by-step derivation
      1. associate-*l/47.9%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg47.9%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg47.9%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    6. Step-by-step derivation
      1. mul-1-neg87.5%

        \[\leadsto \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}} \]
      2. sub-neg87.5%

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

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

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

    if -2.46e-166 < t < 5.90000000000000017e-232 or 4.49999999999999999e-157 < t < 7.99999999999999949e-148

    1. Initial program 1.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. Step-by-step derivation
      1. associate-*l/1.8%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg1.8%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg1.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.90000000000000017e-232 < t < 4.49999999999999999e-157

    1. Initial program 17.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. Step-by-step derivation
      1. associate-*l/17.1%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg17.1%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg17.1%

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

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

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

      \[\leadsto \color{blue}{1} \]

    if 7.99999999999999949e-148 < t < 5.9000000000000003e26

    1. Initial program 61.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. Step-by-step derivation
      1. associate-*l/61.3%

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

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

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}} \cdot t \]
    5. Step-by-step derivation
      1. sub-neg83.6%

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right) + \left(--1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}} \cdot t \]
      7. mul-1-neg83.6%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \left(-\color{blue}{\left(-\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}} \cdot t \]
      8. remove-double-neg83.6%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}} \cdot t \]
      9. fma-def83.6%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}}{x}}} \cdot t \]
      10. unpow283.6%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, \color{blue}{t \cdot t}, {\ell}^{2}\right)}{x}}} \cdot t \]
      11. unpow283.6%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x}}} \cdot t \]
    6. Simplified83.6%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}} \cdot t \]
    7. Taylor expanded in t around 0 83.5%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{{\ell}^{2}}{x}}}} \cdot t \]
    8. Step-by-step derivation
      1. unpow283.5%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\ell \cdot \ell}}{x}}} \cdot t \]
    9. Simplified83.5%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{\ell \cdot \ell}{x}}}} \cdot t \]
    10. Step-by-step derivation
      1. *-un-lft-identity83.5%

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

        \[\leadsto \left(1 \cdot \color{blue}{\sqrt{\frac{2}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\ell \cdot \ell}{x}}}}\right) \cdot t \]
      3. +-commutative83.6%

        \[\leadsto \left(1 \cdot \sqrt{\frac{2}{\color{blue}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}}\right) \cdot t \]
      4. associate-/l*83.6%

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

      \[\leadsto \color{blue}{\left(1 \cdot \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}\right)} \cdot t \]
    12. Step-by-step derivation
      1. *-lft-identity83.6%

        \[\leadsto \color{blue}{\sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}} \cdot t \]
      2. fma-udef83.6%

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \color{blue}{\left(2 \cdot \frac{t}{\frac{x}{t}} + \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}} \cdot t \]
      3. fma-udef83.6%

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \frac{t}{\frac{x}{t}} + \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \frac{\ell \cdot \ell}{x}\right)}\right)}} \cdot t \]
      4. unpow283.6%

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

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \frac{t}{\frac{x}{t}} + \left(2 \cdot {t}^{2} + \frac{\color{blue}{{\ell}^{2}}}{x}\right)\right)}} \cdot t \]
      6. associate-+r+83.6%

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \color{blue}{\left(\left(2 \cdot \frac{t}{\frac{x}{t}} + 2 \cdot {t}^{2}\right) + \frac{{\ell}^{2}}{x}\right)}}} \cdot t \]
    13. Simplified83.6%

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

    if 5.9000000000000003e26 < t

    1. Initial program 38.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. Step-by-step derivation
      1. associate-*l/38.1%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg38.1%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg38.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.46 \cdot 10^{-166}:\\ \;\;\;\;-\sqrt{\frac{x - 1}{x + 1}}\\ \mathbf{elif}\;t \leq 5.9 \cdot 10^{-232}:\\ \;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{x \cdot 0.5}\right)\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-157}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-148}:\\ \;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{x \cdot 0.5}\right)\\ \mathbf{elif}\;t \leq 5.9 \cdot 10^{+26}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{x + 1}}\\ \end{array} \]

Alternative 7: 81.5% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{x \cdot 0.5}\\ t_2 := \sqrt{\frac{x - 1}{x + 1}}\\ t_3 := \frac{\ell \cdot \ell}{x}\\ \mathbf{if}\;t \leq -6.5 \cdot 10^{-166}:\\ \;\;\;\;-t_2\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-226}:\\ \;\;\;\;t \cdot \frac{\sqrt{2} \cdot t_1}{\ell}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-156}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-148}:\\ \;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot t_1\right)\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+27}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{t_3 + \left(t_3 + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (* x 0.5)))
        (t_2 (sqrt (/ (- x 1.0) (+ x 1.0))))
        (t_3 (/ (* l l) x)))
   (if (<= t -6.5e-166)
     (- t_2)
     (if (<= t 4.6e-226)
       (* t (/ (* (sqrt 2.0) t_1) l))
       (if (<= t 3.4e-156)
         1.0
         (if (<= t 8e-148)
           (* t (* (/ (sqrt 2.0) l) t_1))
           (if (<= t 4.4e+27)
             (* t (sqrt (/ 2.0 (+ t_3 (+ t_3 (* (* t t) (+ 2.0 (/ 2.0 x))))))))
             t_2)))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt((x * 0.5));
	double t_2 = sqrt(((x - 1.0) / (x + 1.0)));
	double t_3 = (l * l) / x;
	double tmp;
	if (t <= -6.5e-166) {
		tmp = -t_2;
	} else if (t <= 4.6e-226) {
		tmp = t * ((sqrt(2.0) * t_1) / l);
	} else if (t <= 3.4e-156) {
		tmp = 1.0;
	} else if (t <= 8e-148) {
		tmp = t * ((sqrt(2.0) / l) * t_1);
	} else if (t <= 4.4e+27) {
		tmp = t * sqrt((2.0 / (t_3 + (t_3 + ((t * t) * (2.0 + (2.0 / x)))))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = sqrt((x * 0.5d0))
    t_2 = sqrt(((x - 1.0d0) / (x + 1.0d0)))
    t_3 = (l * l) / x
    if (t <= (-6.5d-166)) then
        tmp = -t_2
    else if (t <= 4.6d-226) then
        tmp = t * ((sqrt(2.0d0) * t_1) / l)
    else if (t <= 3.4d-156) then
        tmp = 1.0d0
    else if (t <= 8d-148) then
        tmp = t * ((sqrt(2.0d0) / l) * t_1)
    else if (t <= 4.4d+27) then
        tmp = t * sqrt((2.0d0 / (t_3 + (t_3 + ((t * t) * (2.0d0 + (2.0d0 / x)))))))
    else
        tmp = t_2
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double t_1 = Math.sqrt((x * 0.5));
	double t_2 = Math.sqrt(((x - 1.0) / (x + 1.0)));
	double t_3 = (l * l) / x;
	double tmp;
	if (t <= -6.5e-166) {
		tmp = -t_2;
	} else if (t <= 4.6e-226) {
		tmp = t * ((Math.sqrt(2.0) * t_1) / l);
	} else if (t <= 3.4e-156) {
		tmp = 1.0;
	} else if (t <= 8e-148) {
		tmp = t * ((Math.sqrt(2.0) / l) * t_1);
	} else if (t <= 4.4e+27) {
		tmp = t * Math.sqrt((2.0 / (t_3 + (t_3 + ((t * t) * (2.0 + (2.0 / x)))))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = math.sqrt((x * 0.5))
	t_2 = math.sqrt(((x - 1.0) / (x + 1.0)))
	t_3 = (l * l) / x
	tmp = 0
	if t <= -6.5e-166:
		tmp = -t_2
	elif t <= 4.6e-226:
		tmp = t * ((math.sqrt(2.0) * t_1) / l)
	elif t <= 3.4e-156:
		tmp = 1.0
	elif t <= 8e-148:
		tmp = t * ((math.sqrt(2.0) / l) * t_1)
	elif t <= 4.4e+27:
		tmp = t * math.sqrt((2.0 / (t_3 + (t_3 + ((t * t) * (2.0 + (2.0 / x)))))))
	else:
		tmp = t_2
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = sqrt(Float64(x * 0.5))
	t_2 = sqrt(Float64(Float64(x - 1.0) / Float64(x + 1.0)))
	t_3 = Float64(Float64(l * l) / x)
	tmp = 0.0
	if (t <= -6.5e-166)
		tmp = Float64(-t_2);
	elseif (t <= 4.6e-226)
		tmp = Float64(t * Float64(Float64(sqrt(2.0) * t_1) / l));
	elseif (t <= 3.4e-156)
		tmp = 1.0;
	elseif (t <= 8e-148)
		tmp = Float64(t * Float64(Float64(sqrt(2.0) / l) * t_1));
	elseif (t <= 4.4e+27)
		tmp = Float64(t * sqrt(Float64(2.0 / Float64(t_3 + Float64(t_3 + Float64(Float64(t * t) * Float64(2.0 + Float64(2.0 / x))))))));
	else
		tmp = t_2;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = sqrt((x * 0.5));
	t_2 = sqrt(((x - 1.0) / (x + 1.0)));
	t_3 = (l * l) / x;
	tmp = 0.0;
	if (t <= -6.5e-166)
		tmp = -t_2;
	elseif (t <= 4.6e-226)
		tmp = t * ((sqrt(2.0) * t_1) / l);
	elseif (t <= 3.4e-156)
		tmp = 1.0;
	elseif (t <= 8e-148)
		tmp = t * ((sqrt(2.0) / l) * t_1);
	elseif (t <= 4.4e+27)
		tmp = t * sqrt((2.0 / (t_3 + (t_3 + ((t * t) * (2.0 + (2.0 / x)))))));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(x * 0.5), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x - 1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -6.5e-166], (-t$95$2), If[LessEqual[t, 4.6e-226], N[(t * N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$1), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-156], 1.0, If[LessEqual[t, 8e-148], N[(t * N[(N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e+27], N[(t * N[Sqrt[N[(2.0 / N[(t$95$3 + N[(t$95$3 + N[(N[(t * t), $MachinePrecision] * N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{x \cdot 0.5}\\
t_2 := \sqrt{\frac{x - 1}{x + 1}}\\
t_3 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{-166}:\\
\;\;\;\;-t_2\\

\mathbf{elif}\;t \leq 4.6 \cdot 10^{-226}:\\
\;\;\;\;t \cdot \frac{\sqrt{2} \cdot t_1}{\ell}\\

\mathbf{elif}\;t \leq 3.4 \cdot 10^{-156}:\\
\;\;\;\;1\\

\mathbf{elif}\;t \leq 8 \cdot 10^{-148}:\\
\;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot t_1\right)\\

\mathbf{elif}\;t \leq 4.4 \cdot 10^{+27}:\\
\;\;\;\;t \cdot \sqrt{\frac{2}{t_3 + \left(t_3 + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -6.50000000000000019e-166

    1. Initial program 47.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. Step-by-step derivation
      1. associate-*l/47.9%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg47.9%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg47.9%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    6. Step-by-step derivation
      1. mul-1-neg87.5%

        \[\leadsto \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}} \]
      2. sub-neg87.5%

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

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

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

    if -6.50000000000000019e-166 < t < 4.6000000000000001e-226

    1. Initial program 1.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. Step-by-step derivation
      1. associate-*l/1.8%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg1.8%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg1.8%

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

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

      \[\leadsto t \cdot \color{blue}{\left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\left(\frac{1}{x - 1} + \frac{x}{x - 1}\right) - 1}}\right)} \]
    5. Step-by-step derivation
      1. *-commutative1.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{\sqrt{x \cdot 0.5} \cdot \sqrt{2}}{\ell}} \]
    12. Applied egg-rr53.9%

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

    if 4.6000000000000001e-226 < t < 3.3999999999999999e-156

    1. Initial program 17.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. Step-by-step derivation
      1. associate-*l/17.1%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg17.1%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg17.1%

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

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

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

      \[\leadsto \color{blue}{1} \]

    if 3.3999999999999999e-156 < t < 7.99999999999999949e-148

    1. Initial program 1.2%

      \[\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. Step-by-step derivation
      1. associate-*l/1.2%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg1.2%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg1.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.99999999999999949e-148 < t < 4.3999999999999997e27

    1. Initial program 61.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. Step-by-step derivation
      1. associate-*l/61.3%

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

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

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}} \cdot t \]
    5. Step-by-step derivation
      1. sub-neg83.6%

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right) + \left(--1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}} \cdot t \]
      7. mul-1-neg83.6%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \left(-\color{blue}{\left(-\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}} \cdot t \]
      8. remove-double-neg83.6%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}} \cdot t \]
      9. fma-def83.6%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}}{x}}} \cdot t \]
      10. unpow283.6%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, \color{blue}{t \cdot t}, {\ell}^{2}\right)}{x}}} \cdot t \]
      11. unpow283.6%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x}}} \cdot t \]
    6. Simplified83.6%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}} \cdot t \]
    7. Taylor expanded in t around 0 83.5%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{{\ell}^{2}}{x}}}} \cdot t \]
    8. Step-by-step derivation
      1. unpow283.5%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\ell \cdot \ell}}{x}}} \cdot t \]
    9. Simplified83.5%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{\ell \cdot \ell}{x}}}} \cdot t \]
    10. Step-by-step derivation
      1. *-un-lft-identity83.5%

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

        \[\leadsto \left(1 \cdot \color{blue}{\sqrt{\frac{2}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\ell \cdot \ell}{x}}}}\right) \cdot t \]
      3. +-commutative83.6%

        \[\leadsto \left(1 \cdot \sqrt{\frac{2}{\color{blue}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}}\right) \cdot t \]
      4. associate-/l*83.6%

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

      \[\leadsto \color{blue}{\left(1 \cdot \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}\right)} \cdot t \]
    12. Step-by-step derivation
      1. *-lft-identity83.6%

        \[\leadsto \color{blue}{\sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}} \cdot t \]
      2. fma-udef83.6%

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \color{blue}{\left(2 \cdot \frac{t}{\frac{x}{t}} + \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}} \cdot t \]
      3. fma-udef83.6%

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \frac{t}{\frac{x}{t}} + \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \frac{\ell \cdot \ell}{x}\right)}\right)}} \cdot t \]
      4. unpow283.6%

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

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \frac{t}{\frac{x}{t}} + \left(2 \cdot {t}^{2} + \frac{\color{blue}{{\ell}^{2}}}{x}\right)\right)}} \cdot t \]
      6. associate-+r+83.6%

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \color{blue}{\left(\left(2 \cdot \frac{t}{\frac{x}{t}} + 2 \cdot {t}^{2}\right) + \frac{{\ell}^{2}}{x}\right)}}} \cdot t \]
    13. Simplified83.6%

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

    if 4.3999999999999997e27 < t

    1. Initial program 38.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. Step-by-step derivation
      1. associate-*l/38.1%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg38.1%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg38.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{-166}:\\ \;\;\;\;-\sqrt{\frac{x - 1}{x + 1}}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-226}:\\ \;\;\;\;t \cdot \frac{\sqrt{2} \cdot \sqrt{x \cdot 0.5}}{\ell}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-156}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-148}:\\ \;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{x \cdot 0.5}\right)\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+27}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{x + 1}}\\ \end{array} \]

Alternative 8: 77.6% accurate, 1.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \frac{\ell \cdot \ell}{x}\\ t_2 := \sqrt{\frac{x - 1}{x + 1}}\\ \mathbf{if}\;t \leq -2.1 \cdot 10^{-166}:\\ \;\;\;\;-t_2\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{-229}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{t_1 + \left(t_1 + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ (* l l) x)) (t_2 (sqrt (/ (- x 1.0) (+ x 1.0)))))
   (if (<= t -2.1e-166)
     (- t_2)
     (if (<= t 1.95e-229)
       (* t (sqrt (/ 2.0 (+ t_1 (+ t_1 (* (* t t) (+ 2.0 (/ 2.0 x))))))))
       t_2))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = (l * l) / x;
	double t_2 = sqrt(((x - 1.0) / (x + 1.0)));
	double tmp;
	if (t <= -2.1e-166) {
		tmp = -t_2;
	} else if (t <= 1.95e-229) {
		tmp = t * sqrt((2.0 / (t_1 + (t_1 + ((t * t) * (2.0 + (2.0 / x)))))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (l * l) / x
    t_2 = sqrt(((x - 1.0d0) / (x + 1.0d0)))
    if (t <= (-2.1d-166)) then
        tmp = -t_2
    else if (t <= 1.95d-229) then
        tmp = t * sqrt((2.0d0 / (t_1 + (t_1 + ((t * t) * (2.0d0 + (2.0d0 / x)))))))
    else
        tmp = t_2
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double t_1 = (l * l) / x;
	double t_2 = Math.sqrt(((x - 1.0) / (x + 1.0)));
	double tmp;
	if (t <= -2.1e-166) {
		tmp = -t_2;
	} else if (t <= 1.95e-229) {
		tmp = t * Math.sqrt((2.0 / (t_1 + (t_1 + ((t * t) * (2.0 + (2.0 / x)))))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = (l * l) / x
	t_2 = math.sqrt(((x - 1.0) / (x + 1.0)))
	tmp = 0
	if t <= -2.1e-166:
		tmp = -t_2
	elif t <= 1.95e-229:
		tmp = t * math.sqrt((2.0 / (t_1 + (t_1 + ((t * t) * (2.0 + (2.0 / x)))))))
	else:
		tmp = t_2
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = Float64(Float64(l * l) / x)
	t_2 = sqrt(Float64(Float64(x - 1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -2.1e-166)
		tmp = Float64(-t_2);
	elseif (t <= 1.95e-229)
		tmp = Float64(t * sqrt(Float64(2.0 / Float64(t_1 + Float64(t_1 + Float64(Float64(t * t) * Float64(2.0 + Float64(2.0 / x))))))));
	else
		tmp = t_2;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = (l * l) / x;
	t_2 = sqrt(((x - 1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -2.1e-166)
		tmp = -t_2;
	elseif (t <= 1.95e-229)
		tmp = t * sqrt((2.0 / (t_1 + (t_1 + ((t * t) * (2.0 + (2.0 / x)))))));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x - 1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.1e-166], (-t$95$2), If[LessEqual[t, 1.95e-229], N[(t * N[Sqrt[N[(2.0 / N[(t$95$1 + N[(t$95$1 + N[(N[(t * t), $MachinePrecision] * N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{x}\\
t_2 := \sqrt{\frac{x - 1}{x + 1}}\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{-166}:\\
\;\;\;\;-t_2\\

\mathbf{elif}\;t \leq 1.95 \cdot 10^{-229}:\\
\;\;\;\;t \cdot \sqrt{\frac{2}{t_1 + \left(t_1 + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


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

    1. Initial program 47.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. Step-by-step derivation
      1. associate-*l/47.9%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg47.9%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg47.9%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    6. Step-by-step derivation
      1. mul-1-neg87.5%

        \[\leadsto \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}} \]
      2. sub-neg87.5%

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

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

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

    if -2.0999999999999999e-166 < t < 1.94999999999999992e-229

    1. Initial program 1.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. Step-by-step derivation
      1. associate-*l/1.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right) + \left(--1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}} \cdot t \]
      7. mul-1-neg69.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \left(-\color{blue}{\left(-\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}} \cdot t \]
      8. remove-double-neg69.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}} \cdot t \]
      9. fma-def69.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}}{x}}} \cdot t \]
      10. unpow269.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, \color{blue}{t \cdot t}, {\ell}^{2}\right)}{x}}} \cdot t \]
      11. unpow269.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x}}} \cdot t \]
    6. Simplified69.9%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}}} \cdot t \]
    7. Taylor expanded in t around 0 69.9%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{{\ell}^{2}}{x}}}} \cdot t \]
    8. Step-by-step derivation
      1. unpow269.9%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\color{blue}{\ell \cdot \ell}}{x}}} \cdot t \]
    9. Simplified69.9%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \color{blue}{\frac{\ell \cdot \ell}{x}}}} \cdot t \]
    10. Step-by-step derivation
      1. *-un-lft-identity69.9%

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

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

        \[\leadsto \left(1 \cdot \sqrt{\frac{2}{\color{blue}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}}\right) \cdot t \]
      4. associate-/l*70.3%

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

      \[\leadsto \color{blue}{\left(1 \cdot \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}\right)} \cdot t \]
    12. Step-by-step derivation
      1. *-lft-identity70.3%

        \[\leadsto \color{blue}{\sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}} \cdot t \]
      2. fma-udef70.3%

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \color{blue}{\left(2 \cdot \frac{t}{\frac{x}{t}} + \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)}}} \cdot t \]
      3. fma-udef70.3%

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \frac{t}{\frac{x}{t}} + \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \frac{\ell \cdot \ell}{x}\right)}\right)}} \cdot t \]
      4. unpow270.3%

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

        \[\leadsto \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \frac{t}{\frac{x}{t}} + \left(2 \cdot {t}^{2} + \frac{\color{blue}{{\ell}^{2}}}{x}\right)\right)}} \cdot t \]
      6. associate-+r+70.3%

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

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

    if 1.94999999999999992e-229 < t

    1. Initial program 41.4%

      \[\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. Step-by-step derivation
      1. associate-*l/41.4%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg41.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{-166}:\\ \;\;\;\;-\sqrt{\frac{x - 1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{-229}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + \left(t \cdot t\right) \cdot \left(2 + \frac{2}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{x + 1}}\\ \end{array} \]

Alternative 9: 75.9% accurate, 2.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\frac{x - 1}{x + 1}}\\ \mathbf{if}\;t \leq -7.2 \cdot 10^{-205}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 3.35 \cdot 10^{-276}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (- x 1.0) (+ x 1.0)))))
   (if (<= t -7.2e-205) (- t_1) (if (<= t 3.35e-276) (/ t l) t_1))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(((x - 1.0) / (x + 1.0)));
	double tmp;
	if (t <= -7.2e-205) {
		tmp = -t_1;
	} else if (t <= 3.35e-276) {
		tmp = t / l;
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = sqrt(((x - 1.0d0) / (x + 1.0d0)))
    if (t <= (-7.2d-205)) then
        tmp = -t_1
    else if (t <= 3.35d-276) then
        tmp = t / l
    else
        tmp = t_1
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double t_1 = Math.sqrt(((x - 1.0) / (x + 1.0)));
	double tmp;
	if (t <= -7.2e-205) {
		tmp = -t_1;
	} else if (t <= 3.35e-276) {
		tmp = t / l;
	} else {
		tmp = t_1;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = math.sqrt(((x - 1.0) / (x + 1.0)))
	tmp = 0
	if t <= -7.2e-205:
		tmp = -t_1
	elif t <= 3.35e-276:
		tmp = t / l
	else:
		tmp = t_1
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x - 1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -7.2e-205)
		tmp = Float64(-t_1);
	elseif (t <= 3.35e-276)
		tmp = Float64(t / l);
	else
		tmp = t_1;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = sqrt(((x - 1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -7.2e-205)
		tmp = -t_1;
	elseif (t <= 3.35e-276)
		tmp = t / l;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x - 1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -7.2e-205], (-t$95$1), If[LessEqual[t, 3.35e-276], N[(t / l), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x - 1}{x + 1}}\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{-205}:\\
\;\;\;\;-t_1\\

\mathbf{elif}\;t \leq 3.35 \cdot 10^{-276}:\\
\;\;\;\;\frac{t}{\ell}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


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

    1. Initial program 46.7%

      \[\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. Step-by-step derivation
      1. associate-*l/46.7%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg46.7%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    6. Step-by-step derivation
      1. mul-1-neg86.2%

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

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

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

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

    if -7.1999999999999997e-205 < t < 3.34999999999999992e-276

    1. Initial program 1.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. Step-by-step derivation
      1. associate-*l/1.6%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg1.6%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg1.6%

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

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

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

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

        \[\leadsto \sqrt{\left(t \cdot t\right) \cdot \frac{2}{\color{blue}{2 \cdot \left({\ell}^{2} + {t}^{2}\right)}}} \]
      2. unpow238.6%

        \[\leadsto \sqrt{\left(t \cdot t\right) \cdot \frac{2}{2 \cdot \left(\color{blue}{\ell \cdot \ell} + {t}^{2}\right)}} \]
      3. unpow238.6%

        \[\leadsto \sqrt{\left(t \cdot t\right) \cdot \frac{2}{2 \cdot \left(\ell \cdot \ell + \color{blue}{t \cdot t}\right)}} \]
    7. Simplified38.6%

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

      \[\leadsto \color{blue}{\frac{t}{\ell}} \]

    if 3.34999999999999992e-276 < t

    1. Initial program 38.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. Step-by-step derivation
      1. associate-*l/38.6%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg38.6%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg38.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{-205}:\\ \;\;\;\;-\sqrt{\frac{x - 1}{x + 1}}\\ \mathbf{elif}\;t \leq 3.35 \cdot 10^{-276}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{x + 1}}\\ \end{array} \]

Alternative 10: 42.9% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 9.4 \cdot 10^{-278}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{x + 1}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t 9.4e-278) (/ t l) (sqrt (/ (- x 1.0) (+ x 1.0)))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= 9.4e-278) {
		tmp = t / l;
	} else {
		tmp = sqrt(((x - 1.0) / (x + 1.0)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= 9.4d-278) then
        tmp = t / l
    else
        tmp = sqrt(((x - 1.0d0) / (x + 1.0d0)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= 9.4e-278) {
		tmp = t / l;
	} else {
		tmp = Math.sqrt(((x - 1.0) / (x + 1.0)));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= 9.4e-278:
		tmp = t / l
	else:
		tmp = math.sqrt(((x - 1.0) / (x + 1.0)))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= 9.4e-278)
		tmp = Float64(t / l);
	else
		tmp = sqrt(Float64(Float64(x - 1.0) / Float64(x + 1.0)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= 9.4e-278)
		tmp = t / l;
	else
		tmp = sqrt(((x - 1.0) / (x + 1.0)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, 9.4e-278], N[(t / l), $MachinePrecision], N[Sqrt[N[(N[(x - 1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.4 \cdot 10^{-278}:\\
\;\;\;\;\frac{t}{\ell}\\

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


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

    1. Initial program 38.0%

      \[\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. Step-by-step derivation
      1. associate-*l/38.1%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg38.1%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg38.1%

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

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

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

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

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

        \[\leadsto \sqrt{\left(t \cdot t\right) \cdot \frac{2}{2 \cdot \left(\color{blue}{\ell \cdot \ell} + {t}^{2}\right)}} \]
      3. unpow28.8%

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

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

      \[\leadsto \color{blue}{\frac{t}{\ell}} \]

    if 9.3999999999999994e-278 < t

    1. Initial program 38.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. Step-by-step derivation
      1. associate-*l/38.6%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg38.6%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg38.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 9.4 \cdot 10^{-278}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{x + 1}}\\ \end{array} \]

Alternative 11: 42.8% accurate, 17.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 4.8 \cdot 10^{-280}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{0.5}{x \cdot x}\right) + \frac{-1}{x}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t 4.8e-280) (/ t l) (+ (+ 1.0 (/ 0.5 (* x x))) (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= 4.8e-280) {
		tmp = t / l;
	} else {
		tmp = (1.0 + (0.5 / (x * x))) + (-1.0 / x);
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= 4.8d-280) then
        tmp = t / l
    else
        tmp = (1.0d0 + (0.5d0 / (x * x))) + ((-1.0d0) / x)
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= 4.8e-280) {
		tmp = t / l;
	} else {
		tmp = (1.0 + (0.5 / (x * x))) + (-1.0 / x);
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= 4.8e-280:
		tmp = t / l
	else:
		tmp = (1.0 + (0.5 / (x * x))) + (-1.0 / x)
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= 4.8e-280)
		tmp = Float64(t / l);
	else
		tmp = Float64(Float64(1.0 + Float64(0.5 / Float64(x * x))) + Float64(-1.0 / x));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= 4.8e-280)
		tmp = t / l;
	else
		tmp = (1.0 + (0.5 / (x * x))) + (-1.0 / x);
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, 4.8e-280], N[(t / l), $MachinePrecision], N[(N[(1.0 + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.8 \cdot 10^{-280}:\\
\;\;\;\;\frac{t}{\ell}\\

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


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

    1. Initial program 38.0%

      \[\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. Step-by-step derivation
      1. associate-*l/38.1%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg38.1%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg38.1%

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

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

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

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

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

        \[\leadsto \sqrt{\left(t \cdot t\right) \cdot \frac{2}{2 \cdot \left(\color{blue}{\ell \cdot \ell} + {t}^{2}\right)}} \]
      3. unpow28.8%

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

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

      \[\leadsto \color{blue}{\frac{t}{\ell}} \]

    if 4.7999999999999996e-280 < t

    1. Initial program 38.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. Step-by-step derivation
      1. associate-*l/38.6%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg38.6%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg38.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4.8 \cdot 10^{-280}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{0.5}{x \cdot x}\right) + \frac{-1}{x}\\ \end{array} \]

Alternative 12: 42.7% accurate, 31.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 2.9 \cdot 10^{-278}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t 2.9e-278) (/ t l) (+ 1.0 (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= 2.9e-278) {
		tmp = t / l;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= 2.9d-278) then
        tmp = t / l
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= 2.9e-278) {
		tmp = t / l;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= 2.9e-278:
		tmp = t / l
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= 2.9e-278)
		tmp = Float64(t / l);
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= 2.9e-278)
		tmp = t / l;
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, 2.9e-278], N[(t / l), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.9 \cdot 10^{-278}:\\
\;\;\;\;\frac{t}{\ell}\\

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


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

    1. Initial program 38.0%

      \[\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. Step-by-step derivation
      1. associate-*l/38.1%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg38.1%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg38.1%

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

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

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

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

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

        \[\leadsto \sqrt{\left(t \cdot t\right) \cdot \frac{2}{2 \cdot \left(\color{blue}{\ell \cdot \ell} + {t}^{2}\right)}} \]
      3. unpow28.8%

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

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

      \[\leadsto \color{blue}{\frac{t}{\ell}} \]

    if 2.9e-278 < t

    1. Initial program 38.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. Step-by-step derivation
      1. associate-*l/38.6%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg38.6%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg38.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.9 \cdot 10^{-278}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 13: 42.4% accurate, 44.4× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 3.3 \cdot 10^{-279}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t) :precision binary64 (if (<= t 3.3e-279) (/ t l) 1.0))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= 3.3e-279) {
		tmp = t / l;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= 3.3d-279) then
        tmp = t / l
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= 3.3e-279) {
		tmp = t / l;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= 3.3e-279:
		tmp = t / l
	else:
		tmp = 1.0
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= 3.3e-279)
		tmp = Float64(t / l);
	else
		tmp = 1.0;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= 3.3e-279)
		tmp = t / l;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, 3.3e-279], N[(t / l), $MachinePrecision], 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.3 \cdot 10^{-279}:\\
\;\;\;\;\frac{t}{\ell}\\

\mathbf{else}:\\
\;\;\;\;1\\


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

    1. Initial program 38.0%

      \[\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. Step-by-step derivation
      1. associate-*l/38.1%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg38.1%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg38.1%

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

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

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

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

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

        \[\leadsto \sqrt{\left(t \cdot t\right) \cdot \frac{2}{2 \cdot \left(\color{blue}{\ell \cdot \ell} + {t}^{2}\right)}} \]
      3. unpow28.8%

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

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

      \[\leadsto \color{blue}{\frac{t}{\ell}} \]

    if 3.3e-279 < t

    1. Initial program 38.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. Step-by-step derivation
      1. associate-*l/38.6%

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

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

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      4. sqr-neg38.6%

        \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \color{blue}{\left(\left(-t\right) \cdot \left(-t\right)\right)}, -\ell \cdot \ell\right)}} \]
      5. fma-neg38.6%

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

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

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

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.3 \cdot 10^{-279}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 14: 38.4% accurate, 225.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ 1 \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t) :precision binary64 1.0)
l = abs(l);
double code(double x, double l, double t) {
	return 1.0;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    code = 1.0d0
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	return 1.0;
}
l = abs(l)
def code(x, l, t):
	return 1.0
l = abs(l)
function code(x, l, t)
	return 1.0
end
l = abs(l)
function tmp = code(x, l, t)
	tmp = 1.0;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := 1.0
\begin{array}{l}
l = |l|\\
\\
1
\end{array}
Derivation
  1. Initial program 38.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. Step-by-step derivation
    1. associate-*l/38.3%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{1} \]
  6. Final simplification35.1%

    \[\leadsto 1 \]

Reproduce

?
herbie shell --seed 2023278 
(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)))))