Toniolo and Linder, Equation (7)

Percentage Accurate: 33.6% → 82.0%
Time: 34.9s
Alternatives: 23
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 23 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.6% 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.0% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{t_6 + \left(\mathsf{fma}\left(2, \frac{t \cdot t}{{x}^{3}}, \left(t_3 + \frac{\ell \cdot \ell}{{x}^{3}}\right) + \frac{t_2 + t_2}{x \cdot x}\right) + \left(\frac{t_2}{{x}^{3}} + \frac{t_2}{x}\right)\right)}}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\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)))) < -0.99999998999999995

    1. Initial program 56.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/56.4%

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

      \[\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 89.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+89.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. unpow289.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-out89.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. unpow289.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. unpow289.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/89.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-neg89.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. unpow289.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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative89.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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow289.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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef89.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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified89.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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in t around 0 89.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}{-1 \cdot \frac{{\ell}^{2}}{x}}\right)}} \cdot t \]
    8. Step-by-step derivation
      1. associate-*r/89.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 {\ell}^{2}}{x}}\right)}} \cdot t \]
      2. mul-1-neg89.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}{-{\ell}^{2}}}{x}\right)}} \cdot t \]
      3. unpow289.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}{\ell \cdot \ell}}{x}\right)}} \cdot t \]
    9. Simplified89.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{-\ell \cdot \ell}{x}}\right)}} \cdot t \]

    if -0.99999998999999995 < (/.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)))) < 0.0

    1. Initial program 6.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-*r/6.6%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg6.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg6.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval6.6%

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

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

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

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

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

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

    if 0.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)))) < +inf.0

    1. Initial program 61.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-*r/61.2%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg61.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg61.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval61.2%

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

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

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

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

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

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

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

    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 2.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 82.0% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{t_6 + \left(\left(t_1 + \frac{t_3 + t_3}{x \cdot x}\right) + \frac{t_3}{x}\right)}}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\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)))) < -0.99999998999999995

    1. Initial program 56.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/56.4%

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

      \[\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 89.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+89.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. unpow289.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-out89.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. unpow289.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. unpow289.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/89.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-neg89.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. unpow289.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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative89.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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow289.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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef89.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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified89.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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in t around 0 89.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}{-1 \cdot \frac{{\ell}^{2}}{x}}\right)}} \cdot t \]
    8. Step-by-step derivation
      1. associate-*r/89.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 {\ell}^{2}}{x}}\right)}} \cdot t \]
      2. mul-1-neg89.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}{-{\ell}^{2}}}{x}\right)}} \cdot t \]
      3. unpow289.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}{\ell \cdot \ell}}{x}\right)}} \cdot t \]
    9. Simplified89.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{-\ell \cdot \ell}{x}}\right)}} \cdot t \]

    if -0.99999998999999995 < (/.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)))) < 0.0

    1. Initial program 6.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-*r/6.6%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg6.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg6.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval6.6%

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

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

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

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

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

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

    if 0.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)))) < +inf.0

    1. Initial program 61.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-*r/61.2%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg61.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg61.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval61.2%

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

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

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

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

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

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

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

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

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

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

    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 2.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 81.9% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_5 + \left(t_2 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\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)))) < -0.99999998999999995

    1. Initial program 56.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/56.4%

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

      \[\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 89.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+89.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. unpow289.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-out89.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. unpow289.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. unpow289.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/89.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-neg89.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. unpow289.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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative89.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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow289.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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef89.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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified89.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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in t around 0 89.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}{-1 \cdot \frac{{\ell}^{2}}{x}}\right)}} \cdot t \]
    8. Step-by-step derivation
      1. associate-*r/89.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 {\ell}^{2}}{x}}\right)}} \cdot t \]
      2. mul-1-neg89.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}{-{\ell}^{2}}}{x}\right)}} \cdot t \]
      3. unpow289.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}{\ell \cdot \ell}}{x}\right)}} \cdot t \]
    9. Simplified89.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{-\ell \cdot \ell}{x}}\right)}} \cdot t \]

    if -0.99999998999999995 < (/.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)))) < 0.0

    1. Initial program 6.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. Applied egg-rr99.7%

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

    if 0.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)))) < +inf.0

    1. Initial program 61.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/61.5%

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

      \[\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 85.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+85.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. unpow285.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-out85.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. unpow285.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. unpow285.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/85.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-neg85.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. unpow285.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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative85.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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow285.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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef85.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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified85.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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]

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

    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 2.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 81.9% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_5 + \left(t_2 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\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)))) < -0.99999998999999995

    1. Initial program 56.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/56.4%

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

      \[\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 89.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+89.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. unpow289.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-out89.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. unpow289.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. unpow289.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/89.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-neg89.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. unpow289.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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative89.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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow289.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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef89.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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified89.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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in t around 0 89.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}{-1 \cdot \frac{{\ell}^{2}}{x}}\right)}} \cdot t \]
    8. Step-by-step derivation
      1. associate-*r/89.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 {\ell}^{2}}{x}}\right)}} \cdot t \]
      2. mul-1-neg89.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}{-{\ell}^{2}}}{x}\right)}} \cdot t \]
      3. unpow289.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}{\ell \cdot \ell}}{x}\right)}} \cdot t \]
    9. Simplified89.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{-\ell \cdot \ell}{x}}\right)}} \cdot t \]

    if -0.99999998999999995 < (/.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)))) < 0.0

    1. Initial program 6.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-*r/6.6%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg6.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg6.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval6.6%

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

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

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

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

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

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

    if 0.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)))) < +inf.0

    1. Initial program 61.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/61.5%

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

      \[\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 85.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+85.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. unpow285.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-out85.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. unpow285.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. unpow285.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/85.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-neg85.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. unpow285.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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative85.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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow285.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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef85.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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified85.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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]

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

    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 2.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 81.9% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_5 + \left(t_2 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\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)))) < -0.99999998999999995

    1. Initial program 56.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/56.4%

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

      \[\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 89.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+89.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. unpow289.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-out89.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. unpow289.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. unpow289.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/89.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-neg89.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. unpow289.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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative89.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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow289.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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef89.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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified89.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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in t around 0 89.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}{-1 \cdot \frac{{\ell}^{2}}{x}}\right)}} \cdot t \]
    8. Step-by-step derivation
      1. associate-*r/89.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 {\ell}^{2}}{x}}\right)}} \cdot t \]
      2. mul-1-neg89.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}{-{\ell}^{2}}}{x}\right)}} \cdot t \]
      3. unpow289.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}{\ell \cdot \ell}}{x}\right)}} \cdot t \]
    9. Simplified89.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{-\ell \cdot \ell}{x}}\right)}} \cdot t \]

    if -0.99999998999999995 < (/.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)))) < 0.0

    1. Initial program 6.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-*r/6.6%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg6.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg6.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval6.6%

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

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

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

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

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

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

    if 0.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)))) < +inf.0

    1. Initial program 61.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/61.5%

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

      \[\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 85.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+85.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. unpow285.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-out85.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. unpow285.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. unpow285.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/85.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-neg85.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. unpow285.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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative85.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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow285.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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef85.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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified85.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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]

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

    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 2.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 81.9% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_5 + \left(t_2 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\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)))) < -0.99999998999999995

    1. Initial program 56.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/56.4%

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

      \[\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 89.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+89.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. unpow289.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-out89.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. unpow289.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. unpow289.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/89.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-neg89.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. unpow289.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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative89.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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow289.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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef89.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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified89.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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in t around 0 89.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}{-1 \cdot \frac{{\ell}^{2}}{x}}\right)}} \cdot t \]
    8. Step-by-step derivation
      1. associate-*r/89.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 {\ell}^{2}}{x}}\right)}} \cdot t \]
      2. mul-1-neg89.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}{-{\ell}^{2}}}{x}\right)}} \cdot t \]
      3. unpow289.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}{\ell \cdot \ell}}{x}\right)}} \cdot t \]
    9. Simplified89.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{-\ell \cdot \ell}{x}}\right)}} \cdot t \]

    if -0.99999998999999995 < (/.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)))) < 0.0

    1. Initial program 6.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-*r/6.6%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg6.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg6.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval6.6%

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

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

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

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

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

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

    if 0.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)))) < +inf.0

    1. Initial program 61.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/61.5%

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

      \[\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 85.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+85.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. unpow285.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-out85.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. unpow285.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. unpow285.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/85.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-neg85.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. unpow285.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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative85.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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow285.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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef85.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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified85.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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]

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

    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 2.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 84.3% accurate, 0.5× speedup?

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

\mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_3 + \left(t_3 + t_1\right)}}\\

\mathbf{elif}\;t \leq 2.1 \cdot 10^{-162}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)\right) + \frac{2}{{x}^{4}}}}\\

\mathbf{elif}\;t \leq 85000:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_3 + \left(t_1 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.20000000000000034e56

    1. Initial program 23.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-*r/23.2%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg23.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg23.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval23.2%

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

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

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

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

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

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

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

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

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

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

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

    if -4.20000000000000034e56 < t < -5.00000000000000034e-139

    1. Initial program 59.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/59.4%

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

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

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\left(\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+86.4%

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

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

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

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

        \[\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/86.4%

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative86.4%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow286.4%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef86.4%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified86.4%

      \[\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in t around 0 86.4%

      \[\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}{-1 \cdot \frac{{\ell}^{2}}{x}}\right)}} \cdot t \]
    8. Step-by-step derivation
      1. associate-*r/86.4%

        \[\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 {\ell}^{2}}{x}}\right)}} \cdot t \]
      2. mul-1-neg86.4%

        \[\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}{-{\ell}^{2}}}{x}\right)}} \cdot t \]
      3. unpow286.4%

        \[\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}{\ell \cdot \ell}}{x}\right)}} \cdot t \]
    9. Simplified86.4%

      \[\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{-\ell \cdot \ell}{x}}\right)}} \cdot t \]

    if -5.00000000000000034e-139 < t < 2.1e-162

    1. Initial program 7.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/7.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. Simplified7.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 5.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\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)}}} \cdot t \]
    8. Step-by-step derivation
      1. +-commutative47.3%

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\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}}}}} \cdot t \]
      2. +-commutative47.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1e-162 < t < 85000

    1. Initial program 56.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/56.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. Simplified56.0%

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

      \[\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+89.3%

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

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

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

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

        \[\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/89.3%

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative89.3%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow289.3%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef89.3%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified89.3%

      \[\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]

    if 85000 < t

    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-*r/42.2%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg42.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg42.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval42.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+56}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-162}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)\right) + \frac{2}{{x}^{4}}}}\\ \mathbf{elif}\;t \leq 85000:\\ \;\;\;\;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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 8: 84.3% accurate, 0.7× speedup?

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

\mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_3 + \left(t_3 + t_1\right)}}\\

\mathbf{elif}\;t \leq 2.95 \cdot 10^{-161}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\

\mathbf{elif}\;t \leq 120000:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{t_3 + \left(t_1 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.00000000000000037e56

    1. Initial program 23.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-*r/23.2%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg23.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg23.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval23.2%

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000037e56 < t < -5.00000000000000034e-139

    1. Initial program 59.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/59.4%

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

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

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\left(\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+86.4%

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

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

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

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

        \[\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/86.4%

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative86.4%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow286.4%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef86.4%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified86.4%

      \[\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in t around 0 86.4%

      \[\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}{-1 \cdot \frac{{\ell}^{2}}{x}}\right)}} \cdot t \]
    8. Step-by-step derivation
      1. associate-*r/86.4%

        \[\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 {\ell}^{2}}{x}}\right)}} \cdot t \]
      2. mul-1-neg86.4%

        \[\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}{-{\ell}^{2}}}{x}\right)}} \cdot t \]
      3. unpow286.4%

        \[\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}{\ell \cdot \ell}}{x}\right)}} \cdot t \]
    9. Simplified86.4%

      \[\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{-\ell \cdot \ell}{x}}\right)}} \cdot t \]

    if -5.00000000000000034e-139 < t < 2.9500000000000001e-161

    1. Initial program 7.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/7.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. Simplified7.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 5.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9500000000000001e-161 < t < 1.2e5

    1. Initial program 56.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-*r/55.9%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg55.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg55.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval55.9%

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}}} \]
    5. Step-by-step derivation
      1. associate--l+89.3%

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

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

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

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

        \[\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/89.3%

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative89.3%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow289.3%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef89.3%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified89.0%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \]

    if 1.2e5 < t

    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-*r/42.2%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg42.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg42.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval42.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+56}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\ \mathbf{elif}\;t \leq 2.95 \cdot 10^{-161}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\ \mathbf{elif}\;t \leq 120000:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 9: 84.3% accurate, 0.7× speedup?

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

\mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_3 + \left(t_3 + t_1\right)}}\\

\mathbf{elif}\;t \leq 2.8 \cdot 10^{-161}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\

\mathbf{elif}\;t \leq 120000:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_3 + \left(t_1 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -5.20000000000000022e56

    1. Initial program 23.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-*r/23.2%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg23.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg23.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval23.2%

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

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

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

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

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

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

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

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

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

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

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

    if -5.20000000000000022e56 < t < -5.00000000000000034e-139

    1. Initial program 59.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/59.4%

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

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

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{\left(\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+86.4%

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

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

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

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

        \[\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/86.4%

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative86.4%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow286.4%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef86.4%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified86.4%

      \[\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in t around 0 86.4%

      \[\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}{-1 \cdot \frac{{\ell}^{2}}{x}}\right)}} \cdot t \]
    8. Step-by-step derivation
      1. associate-*r/86.4%

        \[\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 {\ell}^{2}}{x}}\right)}} \cdot t \]
      2. mul-1-neg86.4%

        \[\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}{-{\ell}^{2}}}{x}\right)}} \cdot t \]
      3. unpow286.4%

        \[\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}{\ell \cdot \ell}}{x}\right)}} \cdot t \]
    9. Simplified86.4%

      \[\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{-\ell \cdot \ell}{x}}\right)}} \cdot t \]

    if -5.00000000000000034e-139 < t < 2.79999999999999992e-161

    1. Initial program 7.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/7.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. Simplified7.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 5.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.79999999999999992e-161 < t < 1.2e5

    1. Initial program 56.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/56.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. Simplified56.0%

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

      \[\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+89.3%

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

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

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

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

        \[\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/89.3%

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative89.3%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow289.3%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef89.3%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified89.3%

      \[\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]

    if 1.2e5 < t

    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-*r/42.2%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg42.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg42.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval42.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{+56}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-161}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\ \mathbf{elif}\;t \leq 120000:\\ \;\;\;\;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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 10: 84.3% accurate, 0.7× speedup?

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

\mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 8.6 \cdot 10^{-161}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\

\mathbf{elif}\;t \leq 102000:\\
\;\;\;\;t_3\\

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


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

    1. Initial program 23.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-*r/23.2%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg23.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg23.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval23.2%

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

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

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

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

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

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

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

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

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

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

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

    if -6.00000000000000012e56 < t < -5.00000000000000034e-139 or 8.59999999999999933e-161 < t < 102000

    1. Initial program 57.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/57.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. Simplified57.8%

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

      \[\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+87.8%

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

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

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

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

        \[\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/87.8%

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative87.8%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow287.8%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef87.8%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified87.8%

      \[\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in t around 0 87.3%

      \[\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}{-1 \cdot \frac{{\ell}^{2}}{x}}\right)}} \cdot t \]
    8. Step-by-step derivation
      1. associate-*r/87.3%

        \[\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 {\ell}^{2}}{x}}\right)}} \cdot t \]
      2. mul-1-neg87.3%

        \[\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}{-{\ell}^{2}}}{x}\right)}} \cdot t \]
      3. unpow287.3%

        \[\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}{\ell \cdot \ell}}{x}\right)}} \cdot t \]
    9. Simplified87.3%

      \[\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{-\ell \cdot \ell}{x}}\right)}} \cdot t \]

    if -5.00000000000000034e-139 < t < 8.59999999999999933e-161

    1. Initial program 7.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/7.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. Simplified7.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 5.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 102000 < t

    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-*r/42.2%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg42.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg42.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval42.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{+56}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{-161}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\ \mathbf{elif}\;t \leq 102000:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 11: 84.2% accurate, 1.0× speedup?

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

\mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;t \leq 82000:\\
\;\;\;\;t_3\\

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


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

    1. Initial program 23.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-*r/23.2%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg23.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg23.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval23.2%

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

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

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

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

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

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

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

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

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

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

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

    if -6.80000000000000002e56 < t < -5.00000000000000034e-139 or 1.5499999999999999e-162 < t < 82000

    1. Initial program 57.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-*r/57.5%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg57.5%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg57.5%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval57.5%

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}}} \]
    5. Step-by-step derivation
      1. associate--l+87.8%

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

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

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

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

        \[\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/87.8%

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative87.8%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow287.8%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef87.8%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified87.5%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \]
    7. Taylor expanded in t around 0 87.0%

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

        \[\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 {\ell}^{2}}{x}}\right)}} \cdot t \]
      2. mul-1-neg87.3%

        \[\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}{-{\ell}^{2}}}{x}\right)}} \cdot t \]
      3. unpow287.3%

        \[\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}{\ell \cdot \ell}}{x}\right)}} \cdot t \]
    9. Simplified87.0%

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

    if -5.00000000000000034e-139 < t < 1.5499999999999999e-162

    1. Initial program 7.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/7.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. Simplified7.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 5.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\color{blue}{\frac{2 \cdot 1}{{x}^{2}}} + 2 \cdot \frac{1}{x}}} \cdot t \]
      2. metadata-eval46.6%

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{\color{blue}{2}}{{x}^{2}} + 2 \cdot \frac{1}{x}}} \cdot t \]
      3. unpow246.6%

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

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \color{blue}{\frac{2 \cdot 1}{x}}}} \cdot t \]
      5. metadata-eval46.6%

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{\color{blue}{2}}{x}}} \cdot t \]
    9. Simplified46.6%

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

    if 82000 < t

    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-*r/42.2%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg42.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg42.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval42.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+56}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-162}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}\\ \mathbf{elif}\;t \leq 82000:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 12: 84.2% accurate, 1.0× speedup?

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

\mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;t \leq 118000:\\
\;\;\;\;t_3\\

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


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

    1. Initial program 23.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-*r/23.2%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg23.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg23.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval23.2%

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

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

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

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

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

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

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

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

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

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

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

    if -5.80000000000000014e56 < t < -5.00000000000000034e-139 or 2.0500000000000001e-162 < t < 118000

    1. Initial program 57.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/57.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. Simplified57.8%

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

      \[\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+87.8%

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

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

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

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

        \[\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/87.8%

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative87.8%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow287.8%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef87.8%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified87.8%

      \[\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in t around 0 87.3%

      \[\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}{-1 \cdot \frac{{\ell}^{2}}{x}}\right)}} \cdot t \]
    8. Step-by-step derivation
      1. associate-*r/87.3%

        \[\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 {\ell}^{2}}{x}}\right)}} \cdot t \]
      2. mul-1-neg87.3%

        \[\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}{-{\ell}^{2}}}{x}\right)}} \cdot t \]
      3. unpow287.3%

        \[\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}{\ell \cdot \ell}}{x}\right)}} \cdot t \]
    9. Simplified87.3%

      \[\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{-\ell \cdot \ell}{x}}\right)}} \cdot t \]

    if -5.00000000000000034e-139 < t < 2.0500000000000001e-162

    1. Initial program 7.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/7.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. Simplified7.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 5.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\color{blue}{\frac{2 \cdot 1}{{x}^{2}}} + 2 \cdot \frac{1}{x}}} \cdot t \]
      2. metadata-eval46.6%

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{\color{blue}{2}}{{x}^{2}} + 2 \cdot \frac{1}{x}}} \cdot t \]
      3. unpow246.6%

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

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \color{blue}{\frac{2 \cdot 1}{x}}}} \cdot t \]
      5. metadata-eval46.6%

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{\color{blue}{2}}{x}}} \cdot t \]
    9. Simplified46.6%

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

    if 118000 < t

    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-*r/42.2%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg42.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg42.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval42.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+56}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-162}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}\\ \mathbf{elif}\;t \leq 118000:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 13: 79.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 40.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-*r/40.4%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg40.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg40.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval40.4%

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

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

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

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

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

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

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

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

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

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

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

    if -3.20000000000000021e-137 < t < 3.5e-93

    1. Initial program 10.3%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/10.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. Simplified10.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 l around inf 4.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\color{blue}{\frac{2 \cdot 1}{{x}^{2}}} + 2 \cdot \frac{1}{x}}} \cdot t \]
      2. metadata-eval43.3%

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{\color{blue}{2}}{{x}^{2}} + 2 \cdot \frac{1}{x}}} \cdot t \]
      3. unpow243.3%

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

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \color{blue}{\frac{2 \cdot 1}{x}}}} \cdot t \]
      5. metadata-eval43.3%

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{\color{blue}{2}}{x}}} \cdot t \]
    9. Simplified43.3%

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

    if 3.5e-93 < t

    1. Initial program 48.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-*r/48.8%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg48.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg48.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval48.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{-137}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-93}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 14: 78.9% accurate, 2.0× speedup?

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

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-93}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\

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


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

    1. Initial program 40.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-*r/40.4%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg40.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg40.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval40.4%

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

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

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

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

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

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

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

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

    if -6.1999999999999998e-139 < t < 2.5999999999999998e-93

    1. Initial program 10.3%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/10.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. Simplified10.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 56.0%

      \[\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+56.0%

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

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

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

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

        \[\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/56.0%

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative56.0%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow256.0%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef56.0%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified56.0%

      \[\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in l around inf 43.1%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{x}}}{\ell} \cdot t \]
    12. Simplified43.1%

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

    if 2.5999999999999998e-93 < t

    1. Initial program 48.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-*r/48.8%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg48.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg48.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval48.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{-139}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-93}:\\ \;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 15: 79.2% accurate, 2.0× speedup?

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

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-93}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\

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


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

    1. Initial program 40.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-*r/40.4%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg40.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg40.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval40.4%

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

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

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

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

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

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

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

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

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

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

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

    if -1.60000000000000005e-138 < t < 2.5999999999999998e-93

    1. Initial program 10.3%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/10.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. Simplified10.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 56.0%

      \[\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+56.0%

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

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

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

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

        \[\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/56.0%

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative56.0%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow256.0%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef56.0%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified56.0%

      \[\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in l around inf 43.1%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{x}}}{\ell} \cdot t \]
    12. Simplified43.1%

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

    if 2.5999999999999998e-93 < t

    1. Initial program 48.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-*r/48.8%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg48.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg48.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval48.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{-138}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-93}:\\ \;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 16: 78.4% accurate, 2.1× speedup?

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

\mathbf{elif}\;t \leq 3 \cdot 10^{-227}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\

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


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

    1. Initial program 40.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-*r/40.4%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg40.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg40.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval40.4%

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

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

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

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

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

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

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

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

    if -6.5e-139 < t < 3e-227

    1. Initial program 8.3%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/8.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. Simplified8.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 53.2%

      \[\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+53.2%

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

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

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

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

        \[\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/53.2%

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative53.2%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow253.2%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef53.2%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified53.2%

      \[\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in l around inf 51.2%

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

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

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

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

    if 3e-227 < t

    1. Initial program 43.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-*r/42.9%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval42.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{-139}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-227}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]

Alternative 17: 78.5% accurate, 2.1× speedup?

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

\mathbf{elif}\;t \leq 2.7 \cdot 10^{-93}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\

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


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

    1. Initial program 40.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-*r/40.4%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg40.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg40.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval40.4%

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

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

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

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

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

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

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

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

    if -4.2000000000000002e-127 < t < 2.7000000000000001e-93

    1. Initial program 10.3%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/10.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. Simplified10.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 56.0%

      \[\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+56.0%

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

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

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

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

        \[\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/56.0%

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative56.0%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow256.0%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef56.0%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified56.0%

      \[\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in l around inf 43.1%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{x}}}{\ell} \cdot t \]
    12. Simplified43.1%

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

    if 2.7000000000000001e-93 < t

    1. Initial program 48.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-*r/48.8%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg48.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg48.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 75.6% accurate, 14.9× speedup?

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

\mathbf{elif}\;t \leq 8 \cdot 10^{-234}:\\
\;\;\;\;\frac{t}{\ell}\\

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


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

    1. Initial program 36.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-*r/36.7%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval36.7%

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

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

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

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

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

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

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

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

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

    if -1.2000000000000001e-196 < t < 7.9999999999999997e-234

    1. Initial program 8.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-*r/8.6%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval8.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{\frac{1 + x}{\frac{x - 1}{{\ell}^{2}}}}}} \]
      4. sub-neg35.3%

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

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \frac{1 + x}{\frac{x + \color{blue}{-1}}{{\ell}^{2}}}}} \]
      6. unpow235.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \frac{1 + x}{\frac{x + -1}{\color{blue}{\ell \cdot \ell}}}}} \]
    7. Simplified35.3%

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

      \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{{\ell}^{2}}}} \]
    9. Step-by-step derivation
      1. unpow235.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{\ell \cdot \ell}}} \]
    10. Simplified35.3%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{\ell \cdot \ell}}} \]
    11. Taylor expanded in t around 0 34.6%

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

    if 7.9999999999999997e-234 < t

    1. Initial program 43.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-*r/42.9%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval42.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \left(\frac{0.5}{\color{blue}{x \cdot x}} - \frac{1}{x}\right) \]
    8. Simplified81.3%

      \[\leadsto \color{blue}{1 + \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{-196}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-234}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]

Alternative 19: 75.5% accurate, 24.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{-195}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{-229}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -7.5e-195)
   (+ -1.0 (/ 1.0 x))
   (if (<= t 1.22e-229) (/ t l) (+ 1.0 (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -7.5e-195) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 1.22e-229) {
		tmp = t / l;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-7.5d-195)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else if (t <= 1.22d-229) then
        tmp = t / l
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -7.5e-195) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 1.22e-229) {
		tmp = t / l;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -7.5e-195:
		tmp = -1.0 + (1.0 / x)
	elif t <= 1.22e-229:
		tmp = t / l
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -7.5e-195)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	elseif (t <= 1.22e-229)
		tmp = Float64(t / l);
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -7.5e-195)
		tmp = -1.0 + (1.0 / x);
	elseif (t <= 1.22e-229)
		tmp = t / l;
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -7.5e-195], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.22e-229], N[(t / l), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{-195}:\\
\;\;\;\;-1 + \frac{1}{x}\\

\mathbf{elif}\;t \leq 1.22 \cdot 10^{-229}:\\
\;\;\;\;\frac{t}{\ell}\\

\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.5e-195

    1. Initial program 36.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-*r/36.7%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
      2. fma-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      3. remove-double-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      7. remove-double-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}} \]
      8. +-commutative36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
      9. fma-def36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
    3. Simplified36.7%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
    4. Applied egg-rr63.3%

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x + -1}} \cdot \mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right), \ell\right)}} \]
    5. Taylor expanded in t around inf 1.7%

      \[\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-sqrt75.8%

        \[\leadsto \color{blue}{-1} + \frac{1}{x} \]
    8. Simplified75.8%

      \[\leadsto \color{blue}{-1 + \frac{1}{x}} \]

    if -7.5e-195 < t < 1.21999999999999991e-229

    1. Initial program 8.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-*r/8.6%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
      2. fma-neg8.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      3. remove-double-neg8.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      7. remove-double-neg8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}} \]
      8. +-commutative8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
      9. fma-def8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
    3. Simplified8.6%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
    4. Applied egg-rr35.9%

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x + -1}} \cdot \mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right), \ell\right)}} \]
    5. Taylor expanded in t around 0 35.3%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\color{blue}{\sqrt{\frac{\left(1 + x\right) \cdot {\ell}^{2}}{x - 1} + {\ell}^{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative35.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\color{blue}{{\ell}^{2} + \frac{\left(1 + x\right) \cdot {\ell}^{2}}{x - 1}}}} \]
      2. unpow235.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\color{blue}{\ell \cdot \ell} + \frac{\left(1 + x\right) \cdot {\ell}^{2}}{x - 1}}} \]
      3. associate-/l*35.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{\frac{1 + x}{\frac{x - 1}{{\ell}^{2}}}}}} \]
      4. sub-neg35.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \frac{1 + x}{\frac{\color{blue}{x + \left(-1\right)}}{{\ell}^{2}}}}} \]
      5. metadata-eval35.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \frac{1 + x}{\frac{x + \color{blue}{-1}}{{\ell}^{2}}}}} \]
      6. unpow235.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \frac{1 + x}{\frac{x + -1}{\color{blue}{\ell \cdot \ell}}}}} \]
    7. Simplified35.3%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\color{blue}{\sqrt{\ell \cdot \ell + \frac{1 + x}{\frac{x + -1}{\ell \cdot \ell}}}}} \]
    8. Taylor expanded in x around inf 35.3%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{{\ell}^{2}}}} \]
    9. Step-by-step derivation
      1. unpow235.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{\ell \cdot \ell}}} \]
    10. Simplified35.3%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{\ell \cdot \ell}}} \]
    11. Taylor expanded in t around 0 34.6%

      \[\leadsto \color{blue}{\frac{t}{\ell}} \]

    if 1.21999999999999991e-229 < t

    1. Initial program 43.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-*r/42.9%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
      2. fma-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      3. remove-double-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      7. remove-double-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}} \]
      8. +-commutative42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
      9. fma-def42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
    3. Simplified42.9%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
    4. Applied egg-rr71.1%

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x + -1}} \cdot \mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right), \ell\right)}} \]
    5. Taylor expanded in t around inf 81.6%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    6. Taylor expanded in x around inf 81.1%

      \[\leadsto \color{blue}{1 - \frac{1}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{-195}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{-229}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 20: 74.9% accurate, 31.6× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{-196}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{-229}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.3e-196) -1.0 (if (<= t 1.22e-229) (/ t l) 1.0)))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.3e-196) {
		tmp = -1.0;
	} else if (t <= 1.22e-229) {
		tmp = t / l;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-1.3d-196)) then
        tmp = -1.0d0
    else if (t <= 1.22d-229) then
        tmp = t / l
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.3e-196) {
		tmp = -1.0;
	} else if (t <= 1.22e-229) {
		tmp = t / l;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1.3e-196:
		tmp = -1.0
	elif t <= 1.22e-229:
		tmp = t / l
	else:
		tmp = 1.0
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1.3e-196)
		tmp = -1.0;
	elseif (t <= 1.22e-229)
		tmp = Float64(t / l);
	else
		tmp = 1.0;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1.3e-196)
		tmp = -1.0;
	elseif (t <= 1.22e-229)
		tmp = t / l;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -1.3e-196], -1.0, If[LessEqual[t, 1.22e-229], N[(t / l), $MachinePrecision], 1.0]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{-196}:\\
\;\;\;\;-1\\

\mathbf{elif}\;t \leq 1.22 \cdot 10^{-229}:\\
\;\;\;\;\frac{t}{\ell}\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.2999999999999999e-196

    1. Initial program 36.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-*r/36.7%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
      2. fma-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      3. remove-double-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      7. remove-double-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}} \]
      8. +-commutative36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
      9. fma-def36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
    3. Simplified36.7%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
    4. Applied egg-rr63.3%

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x + -1}} \cdot \mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right), \ell\right)}} \]
    5. Taylor expanded in t around inf 1.7%

      \[\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-sqrt75.0%

        \[\leadsto \color{blue}{-1} \]
    8. Simplified75.0%

      \[\leadsto \color{blue}{-1} \]

    if -1.2999999999999999e-196 < t < 1.21999999999999991e-229

    1. Initial program 8.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-*r/8.6%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
      2. fma-neg8.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      3. remove-double-neg8.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      7. remove-double-neg8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}} \]
      8. +-commutative8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
      9. fma-def8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
    3. Simplified8.6%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
    4. Applied egg-rr35.9%

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x + -1}} \cdot \mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right), \ell\right)}} \]
    5. Taylor expanded in t around 0 35.3%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\color{blue}{\sqrt{\frac{\left(1 + x\right) \cdot {\ell}^{2}}{x - 1} + {\ell}^{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative35.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\color{blue}{{\ell}^{2} + \frac{\left(1 + x\right) \cdot {\ell}^{2}}{x - 1}}}} \]
      2. unpow235.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\color{blue}{\ell \cdot \ell} + \frac{\left(1 + x\right) \cdot {\ell}^{2}}{x - 1}}} \]
      3. associate-/l*35.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{\frac{1 + x}{\frac{x - 1}{{\ell}^{2}}}}}} \]
      4. sub-neg35.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \frac{1 + x}{\frac{\color{blue}{x + \left(-1\right)}}{{\ell}^{2}}}}} \]
      5. metadata-eval35.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \frac{1 + x}{\frac{x + \color{blue}{-1}}{{\ell}^{2}}}}} \]
      6. unpow235.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \frac{1 + x}{\frac{x + -1}{\color{blue}{\ell \cdot \ell}}}}} \]
    7. Simplified35.3%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\color{blue}{\sqrt{\ell \cdot \ell + \frac{1 + x}{\frac{x + -1}{\ell \cdot \ell}}}}} \]
    8. Taylor expanded in x around inf 35.3%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{{\ell}^{2}}}} \]
    9. Step-by-step derivation
      1. unpow235.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{\ell \cdot \ell}}} \]
    10. Simplified35.3%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{\ell \cdot \ell}}} \]
    11. Taylor expanded in t around 0 34.6%

      \[\leadsto \color{blue}{\frac{t}{\ell}} \]

    if 1.21999999999999991e-229 < t

    1. Initial program 43.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-*r/42.9%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
      2. fma-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      3. remove-double-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      7. remove-double-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}} \]
      8. +-commutative42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
      9. fma-def42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
    3. Simplified42.9%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
    4. Applied egg-rr71.1%

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x + -1}} \cdot \mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right), \ell\right)}} \]
    5. Taylor expanded in t around inf 81.6%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    6. Taylor expanded in x around inf 80.7%

      \[\leadsto \color{blue}{1} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification73.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{-196}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{-229}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 21: 75.2% accurate, 31.6× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{-196}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 3.85 \cdot 10^{-233}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.2e-196) (+ -1.0 (/ 1.0 x)) (if (<= t 3.85e-233) (/ t l) 1.0)))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.2e-196) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 3.85e-233) {
		tmp = t / l;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-1.2d-196)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else if (t <= 3.85d-233) then
        tmp = t / l
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.2e-196) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 3.85e-233) {
		tmp = t / l;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1.2e-196:
		tmp = -1.0 + (1.0 / x)
	elif t <= 3.85e-233:
		tmp = t / l
	else:
		tmp = 1.0
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1.2e-196)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	elseif (t <= 3.85e-233)
		tmp = Float64(t / l);
	else
		tmp = 1.0;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1.2e-196)
		tmp = -1.0 + (1.0 / x);
	elseif (t <= 3.85e-233)
		tmp = t / l;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -1.2e-196], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.85e-233], N[(t / l), $MachinePrecision], 1.0]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-196}:\\
\;\;\;\;-1 + \frac{1}{x}\\

\mathbf{elif}\;t \leq 3.85 \cdot 10^{-233}:\\
\;\;\;\;\frac{t}{\ell}\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.2000000000000001e-196

    1. Initial program 36.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-*r/36.7%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
      2. fma-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      3. remove-double-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      7. remove-double-neg36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}} \]
      8. +-commutative36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
      9. fma-def36.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
    3. Simplified36.7%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
    4. Applied egg-rr63.3%

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x + -1}} \cdot \mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right), \ell\right)}} \]
    5. Taylor expanded in t around inf 1.7%

      \[\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-sqrt75.8%

        \[\leadsto \color{blue}{-1} + \frac{1}{x} \]
    8. Simplified75.8%

      \[\leadsto \color{blue}{-1 + \frac{1}{x}} \]

    if -1.2000000000000001e-196 < t < 3.85000000000000003e-233

    1. Initial program 8.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-*r/8.6%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
      2. fma-neg8.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      3. remove-double-neg8.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      7. remove-double-neg8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}} \]
      8. +-commutative8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
      9. fma-def8.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
    3. Simplified8.6%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
    4. Applied egg-rr35.9%

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x + -1}} \cdot \mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right), \ell\right)}} \]
    5. Taylor expanded in t around 0 35.3%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\color{blue}{\sqrt{\frac{\left(1 + x\right) \cdot {\ell}^{2}}{x - 1} + {\ell}^{2}}}} \]
    6. Step-by-step derivation
      1. +-commutative35.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\color{blue}{{\ell}^{2} + \frac{\left(1 + x\right) \cdot {\ell}^{2}}{x - 1}}}} \]
      2. unpow235.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\color{blue}{\ell \cdot \ell} + \frac{\left(1 + x\right) \cdot {\ell}^{2}}{x - 1}}} \]
      3. associate-/l*35.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{\frac{1 + x}{\frac{x - 1}{{\ell}^{2}}}}}} \]
      4. sub-neg35.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \frac{1 + x}{\frac{\color{blue}{x + \left(-1\right)}}{{\ell}^{2}}}}} \]
      5. metadata-eval35.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \frac{1 + x}{\frac{x + \color{blue}{-1}}{{\ell}^{2}}}}} \]
      6. unpow235.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \frac{1 + x}{\frac{x + -1}{\color{blue}{\ell \cdot \ell}}}}} \]
    7. Simplified35.3%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\color{blue}{\sqrt{\ell \cdot \ell + \frac{1 + x}{\frac{x + -1}{\ell \cdot \ell}}}}} \]
    8. Taylor expanded in x around inf 35.3%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{{\ell}^{2}}}} \]
    9. Step-by-step derivation
      1. unpow235.3%

        \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{\ell \cdot \ell}}} \]
    10. Simplified35.3%

      \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\ell \cdot \ell + \color{blue}{\ell \cdot \ell}}} \]
    11. Taylor expanded in t around 0 34.6%

      \[\leadsto \color{blue}{\frac{t}{\ell}} \]

    if 3.85000000000000003e-233 < t

    1. Initial program 43.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-*r/42.9%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
      2. fma-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      3. remove-double-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      7. remove-double-neg42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}} \]
      8. +-commutative42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
      9. fma-def42.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
    3. Simplified42.9%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
    4. Applied egg-rr71.1%

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x + -1}} \cdot \mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right), \ell\right)}} \]
    5. Taylor expanded in t around inf 81.6%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    6. Taylor expanded in x around inf 80.7%

      \[\leadsto \color{blue}{1} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{-196}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 3.85 \cdot 10^{-233}:\\ \;\;\;\;\frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 22: 75.2% accurate, 73.5× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{-284}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t) :precision binary64 (if (<= t -1.05e-284) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.05e-284) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-1.05d-284)) then
        tmp = -1.0d0
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.05e-284) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1.05e-284:
		tmp = -1.0
	else:
		tmp = 1.0
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1.05e-284)
		tmp = -1.0;
	else
		tmp = 1.0;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1.05e-284)
		tmp = -1.0;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -1.05e-284], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{-284}:\\
\;\;\;\;-1\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.04999999999999996e-284

    1. Initial program 33.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-*r/33.5%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
      2. fma-neg33.5%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      3. remove-double-neg33.5%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg33.5%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg33.5%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval33.5%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      7. remove-double-neg33.5%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}} \]
      8. +-commutative33.5%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
      9. fma-def33.5%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
    3. Simplified33.5%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
    4. Applied egg-rr60.7%

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x + -1}} \cdot \mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right), \ell\right)}} \]
    5. Taylor expanded in t around inf 1.7%

      \[\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-sqrt69.4%

        \[\leadsto \color{blue}{-1} \]
    8. Simplified69.4%

      \[\leadsto \color{blue}{-1} \]

    if -1.04999999999999996e-284 < t

    1. Initial program 39.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-*r/39.6%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
      2. fma-neg39.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      3. remove-double-neg39.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. fma-neg39.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
      5. sub-neg39.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      6. metadata-eval39.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
      7. remove-double-neg39.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}} \]
      8. +-commutative39.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
      9. fma-def39.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
    3. Simplified39.6%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
    4. Applied egg-rr67.3%

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x + -1}} \cdot \mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right), \ell\right)}} \]
    5. Taylor expanded in t around inf 75.1%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    6. Taylor expanded in x around inf 74.4%

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{-284}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 23: 38.5% accurate, 225.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ -1 \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t) :precision binary64 -1.0)
l = abs(l);
double code(double x, double l, double t) {
	return -1.0;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    code = -1.0d0
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	return -1.0;
}
l = abs(l)
def code(x, l, t):
	return -1.0
l = abs(l)
function code(x, l, t)
	return -1.0
end
l = abs(l)
function tmp = code(x, l, t)
	tmp = -1.0;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := -1.0
\begin{array}{l}
l = |l|\\
\\
-1
\end{array}
Derivation
  1. Initial program 37.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-*r/37.0%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
    2. fma-neg37.0%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
    3. remove-double-neg37.0%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
    4. fma-neg37.0%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}} \]
    5. sub-neg37.0%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
    6. metadata-eval37.0%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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}} \]
    7. remove-double-neg37.0%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}} \]
    8. +-commutative37.0%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
    9. fma-def37.0%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)} - \ell \cdot \ell}} \]
  3. Simplified37.0%

    \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}}} \]
  4. Applied egg-rr64.5%

    \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{\mathsf{hypot}\left(\sqrt{\frac{x + 1}{x + -1}} \cdot \mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right), \ell\right)}} \]
  5. Taylor expanded in t around inf 43.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-sqrt30.5%

      \[\leadsto \color{blue}{-1} \]
  8. Simplified30.5%

    \[\leadsto \color{blue}{-1} \]
  9. Final simplification30.5%

    \[\leadsto -1 \]

Reproduce

?
herbie shell --seed 2023250 
(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)))))