Toniolo and Linder, Equation (7)

Percentage Accurate: 33.2% → 82.3%
Time: 24.9s
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.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{if}\;t \leq -4.5 \cdot 10^{+53}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{-227}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-281}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+57}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1
         (*
          t
          (/
           (sqrt 2.0)
           (sqrt
            (+
             (/ (* l l) x)
             (+
              (* 2.0 (+ (* t t) (/ (* t t) x)))
              (/ (fma (* 2.0 t) t (* l l)) x))))))))
   (if (<= t -4.5e+53)
     (+ -1.0 (/ 1.0 x))
     (if (<= t -4.1e-227)
       t_1
       (if (<= t -6e-281)
         (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
         (if (<= t 2e+57) t_1 (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))))))))
double code(double x, double l, double t) {
	double t_1 = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma((2.0 * t), t, (l * l)) / x)))));
	double tmp;
	if (t <= -4.5e+53) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= -4.1e-227) {
		tmp = t_1;
	} else if (t <= -6e-281) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 2e+57) {
		tmp = t_1;
	} else {
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	}
	return tmp;
}
function code(x, l, t)
	t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(Float64(2.0 * t), t, Float64(l * l)) / x))))))
	tmp = 0.0
	if (t <= -4.5e+53)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	elseif (t <= -4.1e-227)
		tmp = t_1;
	elseif (t <= -6e-281)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 2e+57)
		tmp = t_1;
	else
		tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x)));
	end
	return tmp
end
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(2.0 * t), $MachinePrecision] * t + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.5e+53], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.1e-227], t$95$1, If[LessEqual[t, -6e-281], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 2e+57], t$95$1, N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+53}:\\
\;\;\;\;-1 + \frac{1}{x}\\

\mathbf{elif}\;t \leq -4.1 \cdot 10^{-227}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -6 \cdot 10^{-281}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;t \leq 2 \cdot 10^{+57}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.5000000000000002e53

    1. Initial program 34.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*34.6%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg34.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} + \frac{1}{x} \]
      2. rem-square-sqrt93.5%

        \[\leadsto \color{blue}{-1} + \frac{1}{x} \]
    8. Simplified93.5%

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

    if -4.5000000000000002e53 < t < -4.10000000000000009e-227 or -5.9999999999999995e-281 < t < 2.0000000000000001e57

    1. Initial program 34.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/34.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. Simplified34.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 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.10000000000000009e-227 < t < -5.9999999999999995e-281

    1. Initial program 2.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*2.9%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg2.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e57 < t

    1. Initial program 32.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*32.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg32.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(1 + 0.5 \cdot \frac{1}{{x}^{2}}\right) - \frac{1}{x}} \]
    7. Step-by-step derivation
      1. associate--l+97.8%

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

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

        \[\leadsto 1 + \left(\frac{\color{blue}{0.5}}{{x}^{2}} - \frac{1}{x}\right) \]
      4. unpow297.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+53}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{-227}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-281}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+57}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]

Alternative 2: 77.1% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot t\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
t_3 := \frac{x + 1}{x + -1}\\
t_4 := \frac{t_1}{\sqrt{t_3 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
\mathbf{if}\;t_4 \leq -1:\\
\;\;\;\;-t_2\\

\mathbf{elif}\;t_4 \leq 5 \cdot 10^{-79}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t_1\right) \cdot \sqrt{t_3}, \ell\right)}\\

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 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 57.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*57.1%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    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)))) < 4.99999999999999999e-79

    1. Initial program 5.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*5.9%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg5.9%

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

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

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

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

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

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

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

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

    if 4.99999999999999999e-79 < (/.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 56.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*56.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg56.8%

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

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

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

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

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

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

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

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

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

    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))))

    1. Initial program 0.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/0.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. Simplified0.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 l around -inf 4.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 77.1% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot t\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
t_3 := \frac{x + 1}{x + -1}\\
t_4 := \frac{t_1}{\sqrt{t_3 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
\mathbf{if}\;t_4 \leq -1:\\
\;\;\;\;-t_2\\

\mathbf{elif}\;t_4 \leq 5 \cdot 10^{-79}:\\
\;\;\;\;t_1 \cdot \frac{1}{\mathsf{hypot}\left(t_1 \cdot \sqrt{t_3}, \ell\right)}\\

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 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 57.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*57.1%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    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)))) < 4.99999999999999999e-79

    1. Initial program 5.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*5.9%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg5.9%

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

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

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

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

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

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

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

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

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

    if 4.99999999999999999e-79 < (/.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 56.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*56.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg56.8%

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

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

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

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

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

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

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

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

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

    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))))

    1. Initial program 0.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/0.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. Simplified0.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 l around -inf 4.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 77.1% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot t\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
t_3 := \frac{x + 1}{x + -1}\\
t_4 := \frac{t_1}{\sqrt{t_3 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
\mathbf{if}\;t_4 \leq -1:\\
\;\;\;\;-t_2\\

\mathbf{elif}\;t_4 \leq 5 \cdot 10^{-79}:\\
\;\;\;\;t_1 \cdot \frac{1}{\mathsf{hypot}\left(t_1 \cdot \sqrt{t_3}, \ell\right)}\\

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 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 57.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*57.1%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    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)))) < 4.99999999999999999e-79

    1. Initial program 5.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*5.9%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg5.9%

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

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

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

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

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

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

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

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

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

    if 4.99999999999999999e-79 < (/.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 56.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*56.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg56.8%

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

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

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

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

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

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

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

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

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

    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))))

    1. Initial program 0.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/0.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. Simplified0.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 l around -inf 4.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 76.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -1.25 \cdot 10^{-146}:\\ \;\;\;\;\frac{\sqrt{2}}{\left(-\sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-219}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell + \ell \cdot \ell}{x}}}{t}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-t_1\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -1.25e-146)
     (/ (sqrt 2.0) (* (- (sqrt 2.0)) (sqrt (/ (+ x 1.0) (+ x -1.0)))))
     (if (<= t -1.6e-219)
       (/ (sqrt 2.0) (/ (sqrt (/ (+ (* l l) (* l l)) x)) t))
       (if (<= t -5e-310) (- t_1) t_1)))))
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -1.25e-146) {
		tmp = sqrt(2.0) / (-sqrt(2.0) * sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= -1.6e-219) {
		tmp = sqrt(2.0) / (sqrt((((l * l) + (l * l)) / x)) / t);
	} else if (t <= -5e-310) {
		tmp = -t_1;
	} else {
		tmp = t_1;
	}
	return tmp;
}
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 <= (-1.25d-146)) then
        tmp = sqrt(2.0d0) / (-sqrt(2.0d0) * sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
    else if (t <= (-1.6d-219)) then
        tmp = sqrt(2.0d0) / (sqrt((((l * l) + (l * l)) / x)) / t)
    else if (t <= (-5d-310)) then
        tmp = -t_1
    else
        tmp = t_1
    end if
    code = tmp
end function
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 <= -1.25e-146) {
		tmp = Math.sqrt(2.0) / (-Math.sqrt(2.0) * Math.sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= -1.6e-219) {
		tmp = Math.sqrt(2.0) / (Math.sqrt((((l * l) + (l * l)) / x)) / t);
	} else if (t <= -5e-310) {
		tmp = -t_1;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -1.25e-146:
		tmp = math.sqrt(2.0) / (-math.sqrt(2.0) * math.sqrt(((x + 1.0) / (x + -1.0))))
	elif t <= -1.6e-219:
		tmp = math.sqrt(2.0) / (math.sqrt((((l * l) + (l * l)) / x)) / t)
	elif t <= -5e-310:
		tmp = -t_1
	else:
		tmp = t_1
	return tmp
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -1.25e-146)
		tmp = Float64(sqrt(2.0) / Float64(Float64(-sqrt(2.0)) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))));
	elseif (t <= -1.6e-219)
		tmp = Float64(sqrt(2.0) / Float64(sqrt(Float64(Float64(Float64(l * l) + Float64(l * l)) / x)) / t));
	elseif (t <= -5e-310)
		tmp = Float64(-t_1);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -1.25e-146)
		tmp = sqrt(2.0) / (-sqrt(2.0) * sqrt(((x + 1.0) / (x + -1.0))));
	elseif (t <= -1.6e-219)
		tmp = sqrt(2.0) / (sqrt((((l * l) + (l * l)) / x)) / t);
	elseif (t <= -5e-310)
		tmp = -t_1;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
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, -1.25e-146], N[(N[Sqrt[2.0], $MachinePrecision] / N[((-N[Sqrt[2.0], $MachinePrecision]) * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.6e-219], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5e-310], (-t$95$1), t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{-146}:\\
\;\;\;\;\frac{\sqrt{2}}{\left(-\sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\

\mathbf{elif}\;t \leq -1.6 \cdot 10^{-219}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell + \ell \cdot \ell}{x}}}{t}}\\

\mathbf{elif}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.24999999999999989e-146

    1. Initial program 42.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*42.2%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg42.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.24999999999999989e-146 < t < -1.59999999999999999e-219

    1. Initial program 1.5%

      \[\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.5%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg1.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{\color{blue}{\ell \cdot \ell} - -1 \cdot {\ell}^{2}}{x}}}{t}} \]
      2. neg-mul-165.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell - \left(-\color{blue}{\ell \cdot \ell}\right)}{x}}}{t}} \]
      4. distribute-rgt-neg-in65.8%

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

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

    if -1.59999999999999999e-219 < t < -4.999999999999985e-310

    1. Initial program 2.5%

      \[\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.5%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg2.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 31.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*31.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg31.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{-146}:\\ \;\;\;\;\frac{\sqrt{2}}{\left(-\sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-219}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell + \ell \cdot \ell}{x}}}{t}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 6: 76.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ t_2 := -t_1\\ \mathbf{if}\;t \leq -9.1 \cdot 10^{-147}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-228}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell + \ell \cdot \ell}{x}}}{t}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))) (t_2 (- t_1)))
   (if (<= t -9.1e-147)
     t_2
     (if (<= t -3.1e-228)
       (/ (sqrt 2.0) (/ (sqrt (/ (+ (* l l) (* l l)) x)) t))
       (if (<= t -5e-310) t_2 t_1)))))
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double t_2 = -t_1;
	double tmp;
	if (t <= -9.1e-147) {
		tmp = t_2;
	} else if (t <= -3.1e-228) {
		tmp = sqrt(2.0) / (sqrt((((l * l) + (l * l)) / x)) / t);
	} else if (t <= -5e-310) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
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 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    t_2 = -t_1
    if (t <= (-9.1d-147)) then
        tmp = t_2
    else if (t <= (-3.1d-228)) then
        tmp = sqrt(2.0d0) / (sqrt((((l * l) + (l * l)) / x)) / t)
    else if (t <= (-5d-310)) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double t_2 = -t_1;
	double tmp;
	if (t <= -9.1e-147) {
		tmp = t_2;
	} else if (t <= -3.1e-228) {
		tmp = Math.sqrt(2.0) / (Math.sqrt((((l * l) + (l * l)) / x)) / t);
	} else if (t <= -5e-310) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = math.sqrt(((x + -1.0) / (x + 1.0)))
	t_2 = -t_1
	tmp = 0
	if t <= -9.1e-147:
		tmp = t_2
	elif t <= -3.1e-228:
		tmp = math.sqrt(2.0) / (math.sqrt((((l * l) + (l * l)) / x)) / t)
	elif t <= -5e-310:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	t_2 = Float64(-t_1)
	tmp = 0.0
	if (t <= -9.1e-147)
		tmp = t_2;
	elseif (t <= -3.1e-228)
		tmp = Float64(sqrt(2.0) / Float64(sqrt(Float64(Float64(Float64(l * l) + Float64(l * l)) / x)) / t));
	elseif (t <= -5e-310)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	t_2 = -t_1;
	tmp = 0.0;
	if (t <= -9.1e-147)
		tmp = t_2;
	elseif (t <= -3.1e-228)
		tmp = sqrt(2.0) / (sqrt((((l * l) + (l * l)) / x)) / t);
	elseif (t <= -5e-310)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = (-t$95$1)}, If[LessEqual[t, -9.1e-147], t$95$2, If[LessEqual[t, -3.1e-228], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5e-310], t$95$2, t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
t_2 := -t_1\\
\mathbf{if}\;t \leq -9.1 \cdot 10^{-147}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -3.1 \cdot 10^{-228}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell + \ell \cdot \ell}{x}}}{t}}\\

\mathbf{elif}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.09999999999999954e-147 or -3.0999999999999998e-228 < t < -4.999999999999985e-310

    1. Initial program 37.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*37.0%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg37.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.09999999999999954e-147 < t < -3.0999999999999998e-228

    1. Initial program 1.5%

      \[\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.5%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg1.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{\color{blue}{\ell \cdot \ell} - -1 \cdot {\ell}^{2}}{x}}}{t}} \]
      2. neg-mul-165.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell - \left(-\color{blue}{\ell \cdot \ell}\right)}{x}}}{t}} \]
      4. distribute-rgt-neg-in65.8%

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 31.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*31.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg31.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(t \cdot \sqrt{2}\right) \cdot \frac{1}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \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.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.1 \cdot 10^{-147}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-228}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell + \ell \cdot \ell}{x}}}{t}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 7: 76.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -9.2 \cdot 10^{-147}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq -3.6 \cdot 10^{-242}:\\ \;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \left(-\sqrt{\frac{1}{\frac{2}{x}}}\right)\right)\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -9.2e-147)
     (- t_1)
     (if (<= t -3.6e-242)
       (* t (* (/ (sqrt 2.0) l) (- (sqrt (/ 1.0 (/ 2.0 x))))))
       (if (<= t -5e-310) -1.0 t_1)))))
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -9.2e-147) {
		tmp = -t_1;
	} else if (t <= -3.6e-242) {
		tmp = t * ((sqrt(2.0) / l) * -sqrt((1.0 / (2.0 / x))));
	} else if (t <= -5e-310) {
		tmp = -1.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
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 <= (-9.2d-147)) then
        tmp = -t_1
    else if (t <= (-3.6d-242)) then
        tmp = t * ((sqrt(2.0d0) / l) * -sqrt((1.0d0 / (2.0d0 / x))))
    else if (t <= (-5d-310)) then
        tmp = -1.0d0
    else
        tmp = t_1
    end if
    code = tmp
end function
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 <= -9.2e-147) {
		tmp = -t_1;
	} else if (t <= -3.6e-242) {
		tmp = t * ((Math.sqrt(2.0) / l) * -Math.sqrt((1.0 / (2.0 / x))));
	} else if (t <= -5e-310) {
		tmp = -1.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -9.2e-147:
		tmp = -t_1
	elif t <= -3.6e-242:
		tmp = t * ((math.sqrt(2.0) / l) * -math.sqrt((1.0 / (2.0 / x))))
	elif t <= -5e-310:
		tmp = -1.0
	else:
		tmp = t_1
	return tmp
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -9.2e-147)
		tmp = Float64(-t_1);
	elseif (t <= -3.6e-242)
		tmp = Float64(t * Float64(Float64(sqrt(2.0) / l) * Float64(-sqrt(Float64(1.0 / Float64(2.0 / x))))));
	elseif (t <= -5e-310)
		tmp = -1.0;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -9.2e-147)
		tmp = -t_1;
	elseif (t <= -3.6e-242)
		tmp = t * ((sqrt(2.0) / l) * -sqrt((1.0 / (2.0 / x))));
	elseif (t <= -5e-310)
		tmp = -1.0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
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, -9.2e-147], (-t$95$1), If[LessEqual[t, -3.6e-242], N[(t * N[(N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * (-N[Sqrt[N[(1.0 / N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5e-310], -1.0, t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{-147}:\\
\;\;\;\;-t_1\\

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

\mathbf{elif}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -9.19999999999999962e-147

    1. Initial program 42.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*42.2%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg42.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.19999999999999962e-147 < t < -3.60000000000000014e-242

    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 l around -inf 1.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.60000000000000014e-242 < t < -4.999999999999985e-310

    1. Initial program 2.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*2.4%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg2.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{-1}\right)}^{2}} \]
    7. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt65.2%

        \[\leadsto \color{blue}{-1} \]
    8. Simplified65.2%

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

    if -4.999999999999985e-310 < t

    1. Initial program 31.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*31.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg31.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.2 \cdot 10^{-147}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -3.6 \cdot 10^{-242}:\\ \;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \left(-\sqrt{\frac{1}{\frac{2}{x}}}\right)\right)\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 8: 77.1% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-t_1\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -5e-310) (- t_1) t_1)))
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -5e-310) {
		tmp = -t_1;
	} else {
		tmp = t_1;
	}
	return tmp;
}
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 <= (-5d-310)) then
        tmp = -t_1
    else
        tmp = t_1
    end if
    code = tmp
end function
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 <= -5e-310) {
		tmp = -t_1;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -5e-310:
		tmp = -t_1
	else:
		tmp = t_1
	return tmp
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -5e-310)
		tmp = Float64(-t_1);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -5e-310)
		tmp = -t_1;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
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, -5e-310], (-t$95$1), t$95$1]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-t_1\\

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


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

    1. Initial program 33.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*33.1%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg33.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 31.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*31.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg31.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(t \cdot \sqrt{2}\right) \cdot \frac{1}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \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 simplification76.3%

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

Alternative 9: 76.7% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -5e-310) (+ -1.0 (/ 1.0 x)) (sqrt (/ (+ x -1.0) (+ x 1.0)))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
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 <= (-5d-310)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = -1.0 + (1.0 / x)
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-310)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -5e-310)
		tmp = -1.0 + (1.0 / x);
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1 + \frac{1}{x}\\

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


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

    1. Initial program 33.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*33.1%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg33.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} + \frac{1}{x} \]
      2. rem-square-sqrt72.1%

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 31.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*31.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg31.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(t \cdot \sqrt{2}\right) \cdot \frac{1}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \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 simplification76.0%

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

Alternative 10: 76.6% accurate, 17.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -5e-310) (+ -1.0 (/ 1.0 x)) (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	}
	return tmp;
}
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 <= (-5d-310)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else
        tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = -1.0 + (1.0 / x)
	else:
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-310)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	else
		tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -5e-310)
		tmp = -1.0 + (1.0 / x);
	else
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1 + \frac{1}{x}\\

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


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

    1. Initial program 33.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*33.1%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg33.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} + \frac{1}{x} \]
      2. rem-square-sqrt72.1%

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 31.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*31.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg31.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(1 + 0.5 \cdot \frac{1}{{x}^{2}}\right) - \frac{1}{x}} \]
    7. Step-by-step derivation
      1. associate--l+79.6%

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

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

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

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

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

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

Alternative 11: 76.2% accurate, 31.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
(FPCore (x l t) :precision binary64 (if (<= t -5e-310) (+ -1.0 (/ 1.0 x)) 1.0))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0;
	}
	return tmp;
}
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 <= (-5d-310)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = -1.0 + (1.0 / x)
	else:
		tmp = 1.0
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-310)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -5e-310)
		tmp = -1.0 + (1.0 / x);
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1 + \frac{1}{x}\\

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


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

    1. Initial program 33.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*33.1%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg33.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} + \frac{1}{x} \]
      2. rem-square-sqrt72.1%

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 31.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*31.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg31.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 76.5% accurate, 31.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -5e-310) (+ -1.0 (/ 1.0 x)) (+ 1.0 (/ -1.0 x))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
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 <= (-5d-310)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = -1.0 + (1.0 / x)
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-310)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -5e-310)
		tmp = -1.0 + (1.0 / x);
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1 + \frac{1}{x}\\

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


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

    1. Initial program 33.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*33.1%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg33.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} + \frac{1}{x} \]
      2. rem-square-sqrt72.1%

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 31.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*31.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg31.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 75.8% accurate, 73.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
(FPCore (x l t) :precision binary64 (if (<= t -5e-310) -1.0 1.0))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
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 <= (-5d-310)) then
        tmp = -1.0d0
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = -1.0
	else:
		tmp = 1.0
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-310)
		tmp = -1.0;
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -5e-310)
		tmp = -1.0;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -5e-310], -1.0, 1.0]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1\\

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


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

    1. Initial program 33.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*33.1%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg33.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{-1}\right)}^{2}} \]
    7. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt71.0%

        \[\leadsto \color{blue}{-1} \]
    8. Simplified71.0%

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

    if -4.999999999999985e-310 < t

    1. Initial program 31.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*31.8%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
      3. remove-double-neg31.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 14: 38.2% accurate, 225.0× speedup?

\[\begin{array}{l} \\ -1 \end{array} \]
(FPCore (x l t) :precision binary64 -1.0)
double code(double x, double l, double t) {
	return -1.0;
}
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
public static double code(double x, double l, double t) {
	return -1.0;
}
def code(x, l, t):
	return -1.0
function code(x, l, t)
	return -1.0
end
function tmp = code(x, l, t)
	tmp = -1.0;
end
code[x_, l_, t_] := -1.0
\begin{array}{l}

\\
-1
\end{array}
Derivation
  1. Initial program 32.5%

    \[\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*32.5%

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

      \[\leadsto \frac{\sqrt{2}}{\frac{\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)}}}{t}} \]
    3. remove-double-neg32.5%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(\sqrt{-1}\right)}^{2}} \]
  7. Step-by-step derivation
    1. unpow20.0%

      \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
    2. rem-square-sqrt36.3%

      \[\leadsto \color{blue}{-1} \]
  8. Simplified36.3%

    \[\leadsto \color{blue}{-1} \]
  9. Final simplification36.3%

    \[\leadsto -1 \]

Reproduce

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