Toniolo and Linder, Equation (7)

Percentage Accurate: 34.0% → 81.8%
Time: 28.9s
Alternatives: 22
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 22 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: 34.0% 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: 81.8% accurate, 0.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ t_2 := -t_1\\ \mathbf{if}\;t \leq -3.7 \cdot 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.46 \cdot 10^{-161}:\\ \;\;\;\;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(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}\right)}}\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-251}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-195}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x} + \left(\frac{2}{x \cdot x} + \frac{2}{{x}^{3}}\right)}}\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-105}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-71}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{t \cdot \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
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))) (t_2 (- t_1)))
   (if (<= t -3.7e+28)
     t_2
     (if (<= t -1.46e-161)
       (*
        t
        (/
         (sqrt 2.0)
         (sqrt
          (+
           (/ (* l l) x)
           (+
            (* 2.0 (+ (* t t) (/ (* t t) x)))
            (/ (fma l l (* 2.0 (* t t))) x))))))
       (if (<= t -4.2e-251)
         t_2
         (if (<= t 1.05e-195)
           (*
            (sqrt 2.0)
            (/
             t
             (*
              l
              (sqrt (+ (/ 2.0 x) (+ (/ 2.0 (* x x)) (/ 2.0 (pow x 3.0))))))))
           (if (<= t 2.75e-105)
             t_1
             (if (<= t 3.6e-71)
               (* (sqrt 2.0) (/ t (* l (sqrt (/ 2.0 x)))))
               (/ t (* t (sqrt (/ (+ x 1.0) (+ x -1.0)))))))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double t_2 = -t_1;
	double tmp;
	if (t <= -3.7e+28) {
		tmp = t_2;
	} else if (t <= -1.46e-161) {
		tmp = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma(l, l, (2.0 * (t * t))) / x)))));
	} else if (t <= -4.2e-251) {
		tmp = t_2;
	} else if (t <= 1.05e-195) {
		tmp = sqrt(2.0) * (t / (l * sqrt(((2.0 / x) + ((2.0 / (x * x)) + (2.0 / pow(x, 3.0)))))));
	} else if (t <= 2.75e-105) {
		tmp = t_1;
	} else if (t <= 3.6e-71) {
		tmp = sqrt(2.0) * (t / (l * sqrt((2.0 / x))));
	} else {
		tmp = t / (t * sqrt(((x + 1.0) / (x + -1.0))));
	}
	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(-t_1)
	tmp = 0.0
	if (t <= -3.7e+28)
		tmp = t_2;
	elseif (t <= -1.46e-161)
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(l, l, Float64(2.0 * Float64(t * t))) / x))))));
	elseif (t <= -4.2e-251)
		tmp = t_2;
	elseif (t <= 1.05e-195)
		tmp = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / (x ^ 3.0))))))));
	elseif (t <= 2.75e-105)
		tmp = t_1;
	elseif (t <= 3.6e-71)
		tmp = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(2.0 / x)))));
	else
		tmp = Float64(t / Float64(t * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))));
	end
	return 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 = (-t$95$1)}, If[LessEqual[t, -3.7e+28], t$95$2, If[LessEqual[t, -1.46e-161], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(l * l + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.2e-251], t$95$2, If[LessEqual[t, 1.05e-195], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.75e-105], t$95$1, If[LessEqual[t, 3.6e-71], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(t * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
t_2 := -t_1\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+28}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1.46 \cdot 10^{-161}:\\
\;\;\;\;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(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}\right)}}\\

\mathbf{elif}\;t \leq -4.2 \cdot 10^{-251}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 2.75 \cdot 10^{-105}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 3.6 \cdot 10^{-71}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -3.6999999999999999e28 or -1.46e-161 < t < -4.19999999999999964e-251

    1. Initial program 25.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/25.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-neg25.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. sub-neg25.5%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 90.1%

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

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

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

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

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

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

    if -3.6999999999999999e28 < t < -1.46e-161

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

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

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in x around inf 84.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+84.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. unpow284.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-out84.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. unpow284.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. unpow284.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/84.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-neg84.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. unpow284.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. fma-udef84.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(\ell, \ell, 2 \cdot {t}^{2}\right)}}{x}\right)}} \cdot t \]
      10. unpow284.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{-\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{x}\right)}} \cdot t \]
    6. Simplified84.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(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}\right)}}} \cdot t \]

    if -4.19999999999999964e-251 < t < 1.05e-195

    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. sub-neg6.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.05e-195 < t < 2.75000000000000015e-105

    1. Initial program 28.8%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*r/28.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-neg28.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. sub-neg28.8%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in l around 0 73.7%

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

    if 2.75000000000000015e-105 < t < 3.6e-71

    1. Initial program 14.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/14.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-neg14.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. sub-neg14.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.6e-71 < t

    1. Initial program 31.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/30.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-neg30.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. sub-neg30.9%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in l around 0 82.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{+28}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -1.46 \cdot 10^{-161}:\\ \;\;\;\;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(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}\right)}}\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-251}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-195}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x} + \left(\frac{2}{x \cdot x} + \frac{2}{{x}^{3}}\right)}}\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-105}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-71}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \end{array} \]

Alternative 2: 81.4% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\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{t_5 + t_5}{x \cdot x}\right) + \left(\frac{t_5}{{x}^{3}} + \frac{t_5}{x}\right)\right)}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\


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

    1. Initial program 54.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/54.1%

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

        \[\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. sub-neg54.1%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 87.4%

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

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

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

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

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

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

    if -0.5 < (/.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 7.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/7.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-neg7.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. sub-neg7.4%

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

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

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

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

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

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

      \[\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 57.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/57.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. Simplified57.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 84.8%

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

      \[\leadsto \frac{\sqrt{2}}{\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(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)\right) - \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x \cdot x}\right) - \left(\frac{-\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x} - \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{{x}^{3}}\right)\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-*r/0.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-neg0.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. sub-neg0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\color{blue}{\frac{2}{x}}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.4%

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

Alternative 3: 81.4% accurate, 0.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := 2 \cdot \left(t \cdot t\right)\\ t_2 := \frac{x + 1}{x + -1}\\ t_3 := \mathsf{fma}\left(\ell, \ell, t_1\right)\\ t_4 := \sqrt{2} \cdot t\\ t_5 := \frac{t_4}{\sqrt{\left(\ell \cdot \ell + t_1\right) \cdot t_2 - \ell \cdot \ell}}\\ \mathbf{if}\;t_5 \leq -0.5:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t_5 \leq 0:\\ \;\;\;\;\frac{1}{\frac{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t_4\right) \cdot \sqrt{t_2}, \ell\right)}{t_4}}\\ \mathbf{elif}\;t_5 \leq \infty:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{t_3 + t_3}{x \cdot x}\right) + \frac{t_3}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \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_2 (/ (+ x 1.0) (+ x -1.0)))
        (t_3 (fma l l t_1))
        (t_4 (* (sqrt 2.0) t))
        (t_5 (/ t_4 (sqrt (- (* (+ (* l l) t_1) t_2) (* l l))))))
   (if (<= t_5 -0.5)
     (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
     (if (<= t_5 0.0)
       (/ 1.0 (/ (hypot (* (hypot l t_4) (sqrt t_2)) l) t_4))
       (if (<= t_5 INFINITY)
         (*
          t
          (/
           (sqrt 2.0)
           (sqrt
            (+
             (/ (* l l) x)
             (+
              (+ (* 2.0 (+ (* t t) (/ (* t t) x))) (/ (+ t_3 t_3) (* x x)))
              (/ t_3 x))))))
         (* (sqrt 2.0) (/ t (* l (sqrt (/ 2.0 x))))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = 2.0 * (t * t);
	double t_2 = (x + 1.0) / (x + -1.0);
	double t_3 = fma(l, l, t_1);
	double t_4 = sqrt(2.0) * t;
	double t_5 = t_4 / sqrt(((((l * l) + t_1) * t_2) - (l * l)));
	double tmp;
	if (t_5 <= -0.5) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t_5 <= 0.0) {
		tmp = 1.0 / (hypot((hypot(l, t_4) * sqrt(t_2)), l) / t_4);
	} else if (t_5 <= ((double) INFINITY)) {
		tmp = t * (sqrt(2.0) / sqrt((((l * l) / x) + (((2.0 * ((t * t) + ((t * t) / x))) + ((t_3 + t_3) / (x * x))) + (t_3 / x)))));
	} else {
		tmp = sqrt(2.0) * (t / (l * sqrt((2.0 / x))));
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = Float64(2.0 * Float64(t * t))
	t_2 = Float64(Float64(x + 1.0) / Float64(x + -1.0))
	t_3 = fma(l, l, t_1)
	t_4 = Float64(sqrt(2.0) * t)
	t_5 = Float64(t_4 / sqrt(Float64(Float64(Float64(Float64(l * l) + t_1) * t_2) - Float64(l * l))))
	tmp = 0.0
	if (t_5 <= -0.5)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t_5 <= 0.0)
		tmp = Float64(1.0 / Float64(hypot(Float64(hypot(l, t_4) * sqrt(t_2)), l) / t_4));
	elseif (t_5 <= Inf)
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(Float64(t_3 + t_3) / Float64(x * x))) + Float64(t_3 / x))))));
	else
		tmp = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(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[(t * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(l * l + t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[Sqrt[N[(N[(N[(N[(l * l), $MachinePrecision] + t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -0.5], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t$95$5, 0.0], N[(1.0 / N[(N[Sqrt[N[(N[Sqrt[l ^ 2 + t$95$4 ^ 2], $MachinePrecision] * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 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[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(t \cdot t\right)\\
t_2 := \frac{x + 1}{x + -1}\\
t_3 := \mathsf{fma}\left(\ell, \ell, t_1\right)\\
t_4 := \sqrt{2} \cdot t\\
t_5 := \frac{t_4}{\sqrt{\left(\ell \cdot \ell + t_1\right) \cdot t_2 - \ell \cdot \ell}}\\
\mathbf{if}\;t_5 \leq -0.5:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\


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

    1. Initial program 54.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/54.1%

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

        \[\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. sub-neg54.1%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 87.4%

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

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

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

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

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

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

    if -0.5 < (/.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 7.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/7.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-neg7.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. sub-neg7.4%

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

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

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

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

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

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

      \[\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 57.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/57.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. Simplified57.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 84.6%

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\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(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)\right) - \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x \cdot x}\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\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-*r/0.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-neg0.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. sub-neg0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\color{blue}{\frac{2}{x}}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x + -1} - \ell \cdot \ell}} \leq -0.5:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x + -1} - \ell \cdot \ell}} \leq 0:\\ \;\;\;\;\frac{1}{\frac{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, \sqrt{2} \cdot t\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}{\sqrt{2} \cdot t}}\\ \mathbf{elif}\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x + -1} - \ell \cdot \ell}} \leq \infty:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x \cdot x}\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \end{array} \]

Alternative 4: 81.0% accurate, 0.2× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\


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

    1. Initial program 54.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/54.1%

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

        \[\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. sub-neg54.1%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 87.4%

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

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

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

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

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

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

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

    1. Initial program 37.0%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*r/36.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-neg36.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. sub-neg36.9%

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

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

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

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

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

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

      \[\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 2 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < +inf.0

    1. Initial program 2.7%

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

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

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in x around inf 67.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+67.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. unpow267.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-out67.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. unpow267.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. unpow267.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/67.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-neg67.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. unpow267.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. fma-udef67.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(\ell, \ell, 2 \cdot {t}^{2}\right)}}{x}\right)}} \cdot t \]
      10. unpow267.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{-\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{x}\right)}} \cdot t \]
    6. Simplified67.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(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in l around inf 67.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/67.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-neg67.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. unpow267.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 \]
      4. distribute-rgt-neg-in67.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 \left(-\ell\right)}}{x}\right)}} \cdot t \]
    9. Simplified67.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 \left(-\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-*r/0.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-neg0.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. sub-neg0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\color{blue}{\frac{2}{x}}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.4%

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

Alternative 5: 80.9% accurate, 0.2× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\


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

    1. Initial program 54.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/54.1%

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

        \[\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. sub-neg54.1%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 87.4%

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

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

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

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

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

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

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

    1. Initial program 37.0%

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

      \[\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 2 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < +inf.0

    1. Initial program 2.7%

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

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

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in x around inf 67.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+67.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. unpow267.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-out67.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. unpow267.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. unpow267.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/67.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-neg67.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. unpow267.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. fma-udef67.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(\ell, \ell, 2 \cdot {t}^{2}\right)}}{x}\right)}} \cdot t \]
      10. unpow267.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{-\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{x}\right)}} \cdot t \]
    6. Simplified67.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(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in l around inf 67.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/67.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-neg67.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. unpow267.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 \]
      4. distribute-rgt-neg-in67.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 \left(-\ell\right)}}{x}\right)}} \cdot t \]
    9. Simplified67.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 \left(-\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-*r/0.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-neg0.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. sub-neg0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\color{blue}{\frac{2}{x}}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.3%

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

Alternative 6: 80.9% accurate, 0.2× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\


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

    1. Initial program 54.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/54.1%

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

        \[\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. sub-neg54.1%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 87.4%

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

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

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

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

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

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

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

    1. Initial program 37.0%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*r/36.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-neg36.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. sub-neg36.9%

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

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

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

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

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

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

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

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

    1. Initial program 2.7%

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

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

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in x around inf 67.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+67.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. unpow267.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-out67.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. unpow267.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. unpow267.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/67.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-neg67.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. unpow267.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. fma-udef67.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(\ell, \ell, 2 \cdot {t}^{2}\right)}}{x}\right)}} \cdot t \]
      10. unpow267.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{-\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{x}\right)}} \cdot t \]
    6. Simplified67.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(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in l around inf 67.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/67.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-neg67.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. unpow267.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 \]
      4. distribute-rgt-neg-in67.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 \left(-\ell\right)}}{x}\right)}} \cdot t \]
    9. Simplified67.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 \left(-\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-*r/0.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-neg0.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. sub-neg0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\color{blue}{\frac{2}{x}}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.3%

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

Alternative 7: 81.0% accurate, 0.2× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\


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

    1. Initial program 54.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/54.1%

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

        \[\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. sub-neg54.1%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 87.4%

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

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

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

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

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

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

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

    1. Initial program 37.0%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*r/36.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-neg36.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. sub-neg36.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \ell \cdot \left(-\ell\right)\right)}}} \]
    4. Applied egg-rr95.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)}} \]

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

    1. Initial program 2.7%

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

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

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in x around inf 67.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+67.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. unpow267.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-out67.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. unpow267.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. unpow267.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/67.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-neg67.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. unpow267.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. fma-udef67.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(\ell, \ell, 2 \cdot {t}^{2}\right)}}{x}\right)}} \cdot t \]
      10. unpow267.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{-\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{x}\right)}} \cdot t \]
    6. Simplified67.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(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in l around inf 67.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/67.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-neg67.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. unpow267.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 \]
      4. distribute-rgt-neg-in67.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 \left(-\ell\right)}}{x}\right)}} \cdot t \]
    9. Simplified67.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 \left(-\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-*r/0.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-neg0.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. sub-neg0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\color{blue}{\frac{2}{x}}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.4%

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

Alternative 8: 81.7% accurate, 0.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ t_2 := -t_1\\ t_3 := \frac{\ell \cdot \ell}{x}\\ \mathbf{if}\;t \leq -1.7 \cdot 10^{+25}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-162}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_3 + \left(t_3 + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-250}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-195}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x} + \left(\frac{2}{x \cdot x} + \frac{2}{{x}^{3}}\right)}}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-105}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-71}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{t \cdot \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
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0))))
        (t_2 (- t_1))
        (t_3 (/ (* l l) x)))
   (if (<= t -1.7e+25)
     t_2
     (if (<= t -6.5e-162)
       (*
        t
        (/
         (sqrt 2.0)
         (sqrt (+ t_3 (+ t_3 (* 2.0 (+ (* t t) (/ (* t t) x))))))))
       (if (<= t -1.2e-250)
         t_2
         (if (<= t 2e-195)
           (*
            (sqrt 2.0)
            (/
             t
             (*
              l
              (sqrt (+ (/ 2.0 x) (+ (/ 2.0 (* x x)) (/ 2.0 (pow x 3.0))))))))
           (if (<= t 2.7e-105)
             t_1
             (if (<= t 4.6e-71)
               (* (sqrt 2.0) (/ t (* l (sqrt (/ 2.0 x)))))
               (/ t (* t (sqrt (/ (+ x 1.0) (+ x -1.0)))))))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double t_2 = -t_1;
	double t_3 = (l * l) / x;
	double tmp;
	if (t <= -1.7e+25) {
		tmp = t_2;
	} else if (t <= -6.5e-162) {
		tmp = t * (sqrt(2.0) / sqrt((t_3 + (t_3 + (2.0 * ((t * t) + ((t * t) / x)))))));
	} else if (t <= -1.2e-250) {
		tmp = t_2;
	} else if (t <= 2e-195) {
		tmp = sqrt(2.0) * (t / (l * sqrt(((2.0 / x) + ((2.0 / (x * x)) + (2.0 / pow(x, 3.0)))))));
	} else if (t <= 2.7e-105) {
		tmp = t_1;
	} else if (t <= 4.6e-71) {
		tmp = sqrt(2.0) * (t / (l * sqrt((2.0 / x))));
	} else {
		tmp = t / (t * 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) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    t_2 = -t_1
    t_3 = (l * l) / x
    if (t <= (-1.7d+25)) then
        tmp = t_2
    else if (t <= (-6.5d-162)) then
        tmp = t * (sqrt(2.0d0) / sqrt((t_3 + (t_3 + (2.0d0 * ((t * t) + ((t * t) / x)))))))
    else if (t <= (-1.2d-250)) then
        tmp = t_2
    else if (t <= 2d-195) then
        tmp = sqrt(2.0d0) * (t / (l * sqrt(((2.0d0 / x) + ((2.0d0 / (x * x)) + (2.0d0 / (x ** 3.0d0)))))))
    else if (t <= 2.7d-105) then
        tmp = t_1
    else if (t <= 4.6d-71) then
        tmp = sqrt(2.0d0) * (t / (l * sqrt((2.0d0 / x))))
    else
        tmp = t / (t * 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 t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double t_2 = -t_1;
	double t_3 = (l * l) / x;
	double tmp;
	if (t <= -1.7e+25) {
		tmp = t_2;
	} else if (t <= -6.5e-162) {
		tmp = t * (Math.sqrt(2.0) / Math.sqrt((t_3 + (t_3 + (2.0 * ((t * t) + ((t * t) / x)))))));
	} else if (t <= -1.2e-250) {
		tmp = t_2;
	} else if (t <= 2e-195) {
		tmp = Math.sqrt(2.0) * (t / (l * Math.sqrt(((2.0 / x) + ((2.0 / (x * x)) + (2.0 / Math.pow(x, 3.0)))))));
	} else if (t <= 2.7e-105) {
		tmp = t_1;
	} else if (t <= 4.6e-71) {
		tmp = Math.sqrt(2.0) * (t / (l * Math.sqrt((2.0 / x))));
	} else {
		tmp = t / (t * Math.sqrt(((x + 1.0) / (x + -1.0))));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = math.sqrt(((x + -1.0) / (x + 1.0)))
	t_2 = -t_1
	t_3 = (l * l) / x
	tmp = 0
	if t <= -1.7e+25:
		tmp = t_2
	elif t <= -6.5e-162:
		tmp = t * (math.sqrt(2.0) / math.sqrt((t_3 + (t_3 + (2.0 * ((t * t) + ((t * t) / x)))))))
	elif t <= -1.2e-250:
		tmp = t_2
	elif t <= 2e-195:
		tmp = math.sqrt(2.0) * (t / (l * math.sqrt(((2.0 / x) + ((2.0 / (x * x)) + (2.0 / math.pow(x, 3.0)))))))
	elif t <= 2.7e-105:
		tmp = t_1
	elif t <= 4.6e-71:
		tmp = math.sqrt(2.0) * (t / (l * math.sqrt((2.0 / x))))
	else:
		tmp = t / (t * math.sqrt(((x + 1.0) / (x + -1.0))))
	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(-t_1)
	t_3 = Float64(Float64(l * l) / x)
	tmp = 0.0
	if (t <= -1.7e+25)
		tmp = t_2;
	elseif (t <= -6.5e-162)
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_3 + Float64(t_3 + Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))))))));
	elseif (t <= -1.2e-250)
		tmp = t_2;
	elseif (t <= 2e-195)
		tmp = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / (x ^ 3.0))))))));
	elseif (t <= 2.7e-105)
		tmp = t_1;
	elseif (t <= 4.6e-71)
		tmp = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(2.0 / x)))));
	else
		tmp = Float64(t / Float64(t * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))));
	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 = -t_1;
	t_3 = (l * l) / x;
	tmp = 0.0;
	if (t <= -1.7e+25)
		tmp = t_2;
	elseif (t <= -6.5e-162)
		tmp = t * (sqrt(2.0) / sqrt((t_3 + (t_3 + (2.0 * ((t * t) + ((t * t) / x)))))));
	elseif (t <= -1.2e-250)
		tmp = t_2;
	elseif (t <= 2e-195)
		tmp = sqrt(2.0) * (t / (l * sqrt(((2.0 / x) + ((2.0 / (x * x)) + (2.0 / (x ^ 3.0)))))));
	elseif (t <= 2.7e-105)
		tmp = t_1;
	elseif (t <= 4.6e-71)
		tmp = sqrt(2.0) * (t / (l * sqrt((2.0 / x))));
	else
		tmp = t / (t * 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_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = (-t$95$1)}, Block[{t$95$3 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -1.7e+25], t$95$2, If[LessEqual[t, -6.5e-162], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$3 + N[(t$95$3 + 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, -1.2e-250], t$95$2, If[LessEqual[t, 2e-195], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e-105], t$95$1, If[LessEqual[t, 4.6e-71], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(t * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
t_2 := -t_1\\
t_3 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+25}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq -1.2 \cdot 10^{-250}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 2.7 \cdot 10^{-105}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -1.69999999999999992e25 or -6.49999999999999989e-162 < t < -1.1999999999999999e-250

    1. Initial program 25.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/25.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-neg25.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. sub-neg25.5%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 90.1%

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

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

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

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

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

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

    if -1.69999999999999992e25 < t < -6.49999999999999989e-162

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

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

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in x around inf 84.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+84.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. unpow284.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-out84.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. unpow284.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. unpow284.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/84.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-neg84.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. unpow284.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. fma-udef84.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(\ell, \ell, 2 \cdot {t}^{2}\right)}}{x}\right)}} \cdot t \]
      10. unpow284.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{-\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{x}\right)}} \cdot t \]
    6. Simplified84.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(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in l around inf 83.7%

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

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

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

        \[\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 \]
      4. distribute-rgt-neg-in83.7%

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

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

    if -1.1999999999999999e-250 < t < 2.0000000000000002e-195

    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. sub-neg6.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000002e-195 < t < 2.69999999999999993e-105

    1. Initial program 28.8%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*r/28.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-neg28.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. sub-neg28.8%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in l around 0 73.7%

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

    if 2.69999999999999993e-105 < t < 4.5999999999999997e-71

    1. Initial program 14.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/14.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-neg14.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. sub-neg14.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.5999999999999997e-71 < t

    1. Initial program 31.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/30.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-neg30.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. sub-neg30.9%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in l around 0 82.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+25}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-162}:\\ \;\;\;\;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 -1.2 \cdot 10^{-250}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-195}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x} + \left(\frac{2}{x \cdot x} + \frac{2}{{x}^{3}}\right)}}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-105}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-71}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \end{array} \]

Alternative 9: 81.6% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ t_2 := -t_1\\ t_3 := \frac{\ell \cdot \ell}{x}\\ \mathbf{if}\;t \leq -1.9 \cdot 10^{+27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.75 \cdot 10^{-163}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_3 + \left(t_3 + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-253}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-195}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-71}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{t \cdot \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
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0))))
        (t_2 (- t_1))
        (t_3 (/ (* l l) x)))
   (if (<= t -1.9e+27)
     t_2
     (if (<= t -2.75e-163)
       (*
        t
        (/
         (sqrt 2.0)
         (sqrt (+ t_3 (+ t_3 (* 2.0 (+ (* t t) (/ (* t t) x))))))))
       (if (<= t -2.2e-253)
         t_2
         (if (<= t 1.25e-195)
           (* (sqrt 2.0) (/ t (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
           (if (<= t 9.5e-107)
             t_1
             (if (<= t 3.3e-71)
               (* (sqrt 2.0) (/ t (* l (sqrt (/ 2.0 x)))))
               (/ t (* t (sqrt (/ (+ x 1.0) (+ x -1.0)))))))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double t_2 = -t_1;
	double t_3 = (l * l) / x;
	double tmp;
	if (t <= -1.9e+27) {
		tmp = t_2;
	} else if (t <= -2.75e-163) {
		tmp = t * (sqrt(2.0) / sqrt((t_3 + (t_3 + (2.0 * ((t * t) + ((t * t) / x)))))));
	} else if (t <= -2.2e-253) {
		tmp = t_2;
	} else if (t <= 1.25e-195) {
		tmp = sqrt(2.0) * (t / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
	} else if (t <= 9.5e-107) {
		tmp = t_1;
	} else if (t <= 3.3e-71) {
		tmp = sqrt(2.0) * (t / (l * sqrt((2.0 / x))));
	} else {
		tmp = t / (t * 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) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    t_2 = -t_1
    t_3 = (l * l) / x
    if (t <= (-1.9d+27)) then
        tmp = t_2
    else if (t <= (-2.75d-163)) then
        tmp = t * (sqrt(2.0d0) / sqrt((t_3 + (t_3 + (2.0d0 * ((t * t) + ((t * t) / x)))))))
    else if (t <= (-2.2d-253)) then
        tmp = t_2
    else if (t <= 1.25d-195) then
        tmp = sqrt(2.0d0) * (t / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x))))))
    else if (t <= 9.5d-107) then
        tmp = t_1
    else if (t <= 3.3d-71) then
        tmp = sqrt(2.0d0) * (t / (l * sqrt((2.0d0 / x))))
    else
        tmp = t / (t * 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 t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double t_2 = -t_1;
	double t_3 = (l * l) / x;
	double tmp;
	if (t <= -1.9e+27) {
		tmp = t_2;
	} else if (t <= -2.75e-163) {
		tmp = t * (Math.sqrt(2.0) / Math.sqrt((t_3 + (t_3 + (2.0 * ((t * t) + ((t * t) / x)))))));
	} else if (t <= -2.2e-253) {
		tmp = t_2;
	} else if (t <= 1.25e-195) {
		tmp = Math.sqrt(2.0) * (t / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x))))));
	} else if (t <= 9.5e-107) {
		tmp = t_1;
	} else if (t <= 3.3e-71) {
		tmp = Math.sqrt(2.0) * (t / (l * Math.sqrt((2.0 / x))));
	} else {
		tmp = t / (t * Math.sqrt(((x + 1.0) / (x + -1.0))));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = math.sqrt(((x + -1.0) / (x + 1.0)))
	t_2 = -t_1
	t_3 = (l * l) / x
	tmp = 0
	if t <= -1.9e+27:
		tmp = t_2
	elif t <= -2.75e-163:
		tmp = t * (math.sqrt(2.0) / math.sqrt((t_3 + (t_3 + (2.0 * ((t * t) + ((t * t) / x)))))))
	elif t <= -2.2e-253:
		tmp = t_2
	elif t <= 1.25e-195:
		tmp = math.sqrt(2.0) * (t / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x))))))
	elif t <= 9.5e-107:
		tmp = t_1
	elif t <= 3.3e-71:
		tmp = math.sqrt(2.0) * (t / (l * math.sqrt((2.0 / x))))
	else:
		tmp = t / (t * math.sqrt(((x + 1.0) / (x + -1.0))))
	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(-t_1)
	t_3 = Float64(Float64(l * l) / x)
	tmp = 0.0
	if (t <= -1.9e+27)
		tmp = t_2;
	elseif (t <= -2.75e-163)
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_3 + Float64(t_3 + Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))))))));
	elseif (t <= -2.2e-253)
		tmp = t_2;
	elseif (t <= 1.25e-195)
		tmp = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x)))))));
	elseif (t <= 9.5e-107)
		tmp = t_1;
	elseif (t <= 3.3e-71)
		tmp = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(2.0 / x)))));
	else
		tmp = Float64(t / Float64(t * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))));
	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 = -t_1;
	t_3 = (l * l) / x;
	tmp = 0.0;
	if (t <= -1.9e+27)
		tmp = t_2;
	elseif (t <= -2.75e-163)
		tmp = t * (sqrt(2.0) / sqrt((t_3 + (t_3 + (2.0 * ((t * t) + ((t * t) / x)))))));
	elseif (t <= -2.2e-253)
		tmp = t_2;
	elseif (t <= 1.25e-195)
		tmp = sqrt(2.0) * (t / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
	elseif (t <= 9.5e-107)
		tmp = t_1;
	elseif (t <= 3.3e-71)
		tmp = sqrt(2.0) * (t / (l * sqrt((2.0 / x))));
	else
		tmp = t / (t * 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_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = (-t$95$1)}, Block[{t$95$3 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -1.9e+27], t$95$2, If[LessEqual[t, -2.75e-163], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$3 + N[(t$95$3 + 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, -2.2e-253], t$95$2, If[LessEqual[t, 1.25e-195], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-107], t$95$1, If[LessEqual[t, 3.3e-71], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(t * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
t_2 := -t_1\\
t_3 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t \leq -1.9 \cdot 10^{+27}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq -2.2 \cdot 10^{-253}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 9.5 \cdot 10^{-107}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 3.3 \cdot 10^{-71}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -1.90000000000000011e27 or -2.7499999999999999e-163 < t < -2.19999999999999996e-253

    1. Initial program 25.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/25.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-neg25.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. sub-neg25.5%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 90.1%

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

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

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

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

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

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

    if -1.90000000000000011e27 < t < -2.7499999999999999e-163

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

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

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in x around inf 84.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+84.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. unpow284.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-out84.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. unpow284.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. unpow284.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/84.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-neg84.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. unpow284.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. fma-udef84.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(\ell, \ell, 2 \cdot {t}^{2}\right)}}{x}\right)}} \cdot t \]
      10. unpow284.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{-\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{x}\right)}} \cdot t \]
    6. Simplified84.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(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}\right)}}} \cdot t \]
    7. Taylor expanded in l around inf 83.7%

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

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

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

        \[\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 \]
      4. distribute-rgt-neg-in83.7%

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

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

    if -2.19999999999999996e-253 < t < 1.25000000000000002e-195

    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. sub-neg6.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.25000000000000002e-195 < t < 9.4999999999999999e-107

    1. Initial program 28.8%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*r/28.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-neg28.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. sub-neg28.8%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in l around 0 73.7%

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

    if 9.4999999999999999e-107 < t < 3.3000000000000002e-71

    1. Initial program 14.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/14.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-neg14.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. sub-neg14.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3000000000000002e-71 < t

    1. Initial program 31.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/30.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-neg30.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. sub-neg30.9%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in l around 0 82.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+27}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -2.75 \cdot 10^{-163}:\\ \;\;\;\;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.2 \cdot 10^{-253}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-195}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-71}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \end{array} \]

Alternative 10: 79.5% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -7.5 \cdot 10^{-252}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-195}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{-71}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{t \cdot \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
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -7.5e-252)
     (- t_1)
     (if (<= t 1.05e-195)
       (* (sqrt 2.0) (/ t (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
       (if (<= t 2.4e-104)
         t_1
         (if (<= t 6.6e-71)
           (* (sqrt 2.0) (/ t (* l (sqrt (/ 2.0 x)))))
           (/ t (* t (sqrt (/ (+ x 1.0) (+ x -1.0)))))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -7.5e-252) {
		tmp = -t_1;
	} else if (t <= 1.05e-195) {
		tmp = sqrt(2.0) * (t / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
	} else if (t <= 2.4e-104) {
		tmp = t_1;
	} else if (t <= 6.6e-71) {
		tmp = sqrt(2.0) * (t / (l * sqrt((2.0 / x))));
	} else {
		tmp = t / (t * 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) :: t_1
    real(8) :: tmp
    t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    if (t <= (-7.5d-252)) then
        tmp = -t_1
    else if (t <= 1.05d-195) then
        tmp = sqrt(2.0d0) * (t / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x))))))
    else if (t <= 2.4d-104) then
        tmp = t_1
    else if (t <= 6.6d-71) then
        tmp = sqrt(2.0d0) * (t / (l * sqrt((2.0d0 / x))))
    else
        tmp = t / (t * 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 t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -7.5e-252) {
		tmp = -t_1;
	} else if (t <= 1.05e-195) {
		tmp = Math.sqrt(2.0) * (t / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x))))));
	} else if (t <= 2.4e-104) {
		tmp = t_1;
	} else if (t <= 6.6e-71) {
		tmp = Math.sqrt(2.0) * (t / (l * Math.sqrt((2.0 / x))));
	} else {
		tmp = t / (t * Math.sqrt(((x + 1.0) / (x + -1.0))));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -7.5e-252:
		tmp = -t_1
	elif t <= 1.05e-195:
		tmp = math.sqrt(2.0) * (t / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x))))))
	elif t <= 2.4e-104:
		tmp = t_1
	elif t <= 6.6e-71:
		tmp = math.sqrt(2.0) * (t / (l * math.sqrt((2.0 / x))))
	else:
		tmp = t / (t * math.sqrt(((x + 1.0) / (x + -1.0))))
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -7.5e-252)
		tmp = Float64(-t_1);
	elseif (t <= 1.05e-195)
		tmp = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x)))))));
	elseif (t <= 2.4e-104)
		tmp = t_1;
	elseif (t <= 6.6e-71)
		tmp = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(2.0 / x)))));
	else
		tmp = Float64(t / Float64(t * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -7.5e-252)
		tmp = -t_1;
	elseif (t <= 1.05e-195)
		tmp = sqrt(2.0) * (t / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
	elseif (t <= 2.4e-104)
		tmp = t_1;
	elseif (t <= 6.6e-71)
		tmp = sqrt(2.0) * (t / (l * sqrt((2.0 / x))));
	else
		tmp = t / (t * 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_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -7.5e-252], (-t$95$1), If[LessEqual[t, 1.05e-195], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-104], t$95$1, If[LessEqual[t, 6.6e-71], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(t * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{-252}:\\
\;\;\;\;-t_1\\

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

\mathbf{elif}\;t \leq 2.4 \cdot 10^{-104}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 6.6 \cdot 10^{-71}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\

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


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

    1. Initial program 35.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/35.1%

        \[\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-neg35.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. sub-neg35.2%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 83.8%

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

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

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

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

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

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

    if -7.4999999999999996e-252 < t < 1.05e-195

    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. sub-neg6.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.05e-195 < t < 2.4000000000000001e-104

    1. Initial program 28.8%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*r/28.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-neg28.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. sub-neg28.8%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in l around 0 73.7%

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

    if 2.4000000000000001e-104 < t < 6.6000000000000003e-71

    1. Initial program 14.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/14.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-neg14.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. sub-neg14.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.6000000000000003e-71 < t

    1. Initial program 31.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/30.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-neg30.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. sub-neg30.9%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in l around 0 82.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{-252}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-195}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-104}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{-71}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \end{array} \]

Alternative 11: 79.5% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\ t_2 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{-250}:\\ \;\;\;\;-t_2\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-195}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-107}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-71}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{t \cdot \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
 (let* ((t_1 (* (sqrt 2.0) (/ t (* l (sqrt (/ 2.0 x))))))
        (t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -1.15e-250)
     (- t_2)
     (if (<= t 2.5e-195)
       t_1
       (if (<= t 9e-107)
         t_2
         (if (<= t 3.3e-71)
           t_1
           (/ t (* t (sqrt (/ (+ x 1.0) (+ x -1.0)))))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(2.0) * (t / (l * sqrt((2.0 / x))));
	double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -1.15e-250) {
		tmp = -t_2;
	} else if (t <= 2.5e-195) {
		tmp = t_1;
	} else if (t <= 9e-107) {
		tmp = t_2;
	} else if (t <= 3.3e-71) {
		tmp = t_1;
	} else {
		tmp = t / (t * 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = sqrt(2.0d0) * (t / (l * sqrt((2.0d0 / x))))
    t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    if (t <= (-1.15d-250)) then
        tmp = -t_2
    else if (t <= 2.5d-195) then
        tmp = t_1
    else if (t <= 9d-107) then
        tmp = t_2
    else if (t <= 3.3d-71) then
        tmp = t_1
    else
        tmp = t / (t * 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 t_1 = Math.sqrt(2.0) * (t / (l * Math.sqrt((2.0 / x))));
	double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -1.15e-250) {
		tmp = -t_2;
	} else if (t <= 2.5e-195) {
		tmp = t_1;
	} else if (t <= 9e-107) {
		tmp = t_2;
	} else if (t <= 3.3e-71) {
		tmp = t_1;
	} else {
		tmp = t / (t * Math.sqrt(((x + 1.0) / (x + -1.0))));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = math.sqrt(2.0) * (t / (l * math.sqrt((2.0 / x))))
	t_2 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -1.15e-250:
		tmp = -t_2
	elif t <= 2.5e-195:
		tmp = t_1
	elif t <= 9e-107:
		tmp = t_2
	elif t <= 3.3e-71:
		tmp = t_1
	else:
		tmp = t / (t * math.sqrt(((x + 1.0) / (x + -1.0))))
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(2.0 / x)))))
	t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -1.15e-250)
		tmp = Float64(-t_2);
	elseif (t <= 2.5e-195)
		tmp = t_1;
	elseif (t <= 9e-107)
		tmp = t_2;
	elseif (t <= 3.3e-71)
		tmp = t_1;
	else
		tmp = Float64(t / Float64(t * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = sqrt(2.0) * (t / (l * sqrt((2.0 / x))));
	t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -1.15e-250)
		tmp = -t_2;
	elseif (t <= 2.5e-195)
		tmp = t_1;
	elseif (t <= 9e-107)
		tmp = t_2;
	elseif (t <= 3.3e-71)
		tmp = t_1;
	else
		tmp = t / (t * 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_] := Block[{t$95$1 = N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.15e-250], (-t$95$2), If[LessEqual[t, 2.5e-195], t$95$1, If[LessEqual[t, 9e-107], t$95$2, If[LessEqual[t, 3.3e-71], t$95$1, N[(t / N[(t * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{-250}:\\
\;\;\;\;-t_2\\

\mathbf{elif}\;t \leq 2.5 \cdot 10^{-195}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 9 \cdot 10^{-107}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 3.3 \cdot 10^{-71}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 35.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/35.1%

        \[\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-neg35.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. sub-neg35.2%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 83.8%

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

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

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

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

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

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

    if -1.15e-250 < t < 2.50000000000000004e-195 or 9.00000000000000032e-107 < t < 3.3000000000000002e-71

    1. Initial program 8.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/8.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-neg8.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. sub-neg8.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.50000000000000004e-195 < t < 9.00000000000000032e-107

    1. Initial program 28.8%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*r/28.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-neg28.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. sub-neg28.8%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in l around 0 73.7%

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

    if 3.3000000000000002e-71 < t

    1. Initial program 31.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/30.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-neg30.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. sub-neg30.9%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in l around 0 82.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{-250}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-195}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-71}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \end{array} \]

Alternative 12: 79.5% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ t_2 := \sqrt{\frac{2}{x}}\\ \mathbf{if}\;t \leq -6.3 \cdot 10^{-251}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-195}:\\ \;\;\;\;\frac{\sqrt{2}}{\ell} \cdot \frac{t}{t_2}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-103}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-71}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot t_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{t \cdot \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
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))) (t_2 (sqrt (/ 2.0 x))))
   (if (<= t -6.3e-251)
     (- t_1)
     (if (<= t 1.2e-195)
       (* (/ (sqrt 2.0) l) (/ t t_2))
       (if (<= t 8.5e-103)
         t_1
         (if (<= t 3.3e-71)
           (* (sqrt 2.0) (/ t (* l t_2)))
           (/ t (* t (sqrt (/ (+ x 1.0) (+ x -1.0)))))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double t_2 = sqrt((2.0 / x));
	double tmp;
	if (t <= -6.3e-251) {
		tmp = -t_1;
	} else if (t <= 1.2e-195) {
		tmp = (sqrt(2.0) / l) * (t / t_2);
	} else if (t <= 8.5e-103) {
		tmp = t_1;
	} else if (t <= 3.3e-71) {
		tmp = sqrt(2.0) * (t / (l * t_2));
	} else {
		tmp = t / (t * 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    t_2 = sqrt((2.0d0 / x))
    if (t <= (-6.3d-251)) then
        tmp = -t_1
    else if (t <= 1.2d-195) then
        tmp = (sqrt(2.0d0) / l) * (t / t_2)
    else if (t <= 8.5d-103) then
        tmp = t_1
    else if (t <= 3.3d-71) then
        tmp = sqrt(2.0d0) * (t / (l * t_2))
    else
        tmp = t / (t * 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 t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double t_2 = Math.sqrt((2.0 / x));
	double tmp;
	if (t <= -6.3e-251) {
		tmp = -t_1;
	} else if (t <= 1.2e-195) {
		tmp = (Math.sqrt(2.0) / l) * (t / t_2);
	} else if (t <= 8.5e-103) {
		tmp = t_1;
	} else if (t <= 3.3e-71) {
		tmp = Math.sqrt(2.0) * (t / (l * t_2));
	} else {
		tmp = t / (t * Math.sqrt(((x + 1.0) / (x + -1.0))));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = math.sqrt(((x + -1.0) / (x + 1.0)))
	t_2 = math.sqrt((2.0 / x))
	tmp = 0
	if t <= -6.3e-251:
		tmp = -t_1
	elif t <= 1.2e-195:
		tmp = (math.sqrt(2.0) / l) * (t / t_2)
	elif t <= 8.5e-103:
		tmp = t_1
	elif t <= 3.3e-71:
		tmp = math.sqrt(2.0) * (t / (l * t_2))
	else:
		tmp = t / (t * math.sqrt(((x + 1.0) / (x + -1.0))))
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	t_2 = sqrt(Float64(2.0 / x))
	tmp = 0.0
	if (t <= -6.3e-251)
		tmp = Float64(-t_1);
	elseif (t <= 1.2e-195)
		tmp = Float64(Float64(sqrt(2.0) / l) * Float64(t / t_2));
	elseif (t <= 8.5e-103)
		tmp = t_1;
	elseif (t <= 3.3e-71)
		tmp = Float64(sqrt(2.0) * Float64(t / Float64(l * t_2)));
	else
		tmp = Float64(t / Float64(t * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))));
	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 = sqrt((2.0 / x));
	tmp = 0.0;
	if (t <= -6.3e-251)
		tmp = -t_1;
	elseif (t <= 1.2e-195)
		tmp = (sqrt(2.0) / l) * (t / t_2);
	elseif (t <= 8.5e-103)
		tmp = t_1;
	elseif (t <= 3.3e-71)
		tmp = sqrt(2.0) * (t / (l * t_2));
	else
		tmp = t / (t * 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_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -6.3e-251], (-t$95$1), If[LessEqual[t, 1.2e-195], N[(N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e-103], t$95$1, If[LessEqual[t, 3.3e-71], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(t * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
t_2 := \sqrt{\frac{2}{x}}\\
\mathbf{if}\;t \leq -6.3 \cdot 10^{-251}:\\
\;\;\;\;-t_1\\

\mathbf{elif}\;t \leq 1.2 \cdot 10^{-195}:\\
\;\;\;\;\frac{\sqrt{2}}{\ell} \cdot \frac{t}{t_2}\\

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-103}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 3.3 \cdot 10^{-71}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot t_2}\\

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


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

    1. Initial program 35.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/35.1%

        \[\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-neg35.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. sub-neg35.2%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 83.8%

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

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

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

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

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

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

    if -6.2999999999999998e-251 < t < 1.2e-195

    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. sub-neg6.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2}{x}}}} \]
    10. Step-by-step derivation
      1. times-frac74.6%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\ell} \cdot \frac{t}{\sqrt{\frac{2}{x}}}} \]
    11. Simplified74.6%

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

    if 1.2e-195 < t < 8.50000000000000032e-103

    1. Initial program 28.8%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*r/28.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-neg28.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. sub-neg28.8%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in l around 0 73.7%

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

    if 8.50000000000000032e-103 < t < 3.3000000000000002e-71

    1. Initial program 14.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/14.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-neg14.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. sub-neg14.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3000000000000002e-71 < t

    1. Initial program 31.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/30.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-neg30.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. sub-neg30.9%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in l around 0 82.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.3 \cdot 10^{-251}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-195}:\\ \;\;\;\;\frac{\sqrt{2}}{\ell} \cdot \frac{t}{\sqrt{\frac{2}{x}}}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-103}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-71}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \end{array} \]

Alternative 13: 79.1% accurate, 2.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{-251}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-195}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{t \cdot \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 -2.4e-251)
   (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t 1.25e-195)
     (* (/ t l) (sqrt x))
     (/ t (* t (sqrt (/ (+ x 1.0) (+ x -1.0))))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -2.4e-251) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1.25e-195) {
		tmp = (t / l) * sqrt(x);
	} else {
		tmp = t / (t * 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 <= (-2.4d-251)) then
        tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if (t <= 1.25d-195) then
        tmp = (t / l) * sqrt(x)
    else
        tmp = t / (t * 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 <= -2.4e-251) {
		tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1.25e-195) {
		tmp = (t / l) * Math.sqrt(x);
	} else {
		tmp = t / (t * Math.sqrt(((x + 1.0) / (x + -1.0))));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -2.4e-251:
		tmp = -math.sqrt(((x + -1.0) / (x + 1.0)))
	elif t <= 1.25e-195:
		tmp = (t / l) * math.sqrt(x)
	else:
		tmp = t / (t * math.sqrt(((x + 1.0) / (x + -1.0))))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -2.4e-251)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 1.25e-195)
		tmp = Float64(Float64(t / l) * sqrt(x));
	else
		tmp = Float64(t / Float64(t * 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 <= -2.4e-251)
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	elseif (t <= 1.25e-195)
		tmp = (t / l) * sqrt(x);
	else
		tmp = t / (t * 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, -2.4e-251], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.25e-195], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(t / N[(t * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{-251}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;t \leq 1.25 \cdot 10^{-195}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\

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


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

    1. Initial program 35.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/35.1%

        \[\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-neg35.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. sub-neg35.2%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 83.8%

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

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

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

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

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

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

    if -2.39999999999999996e-251 < t < 1.25000000000000002e-195

    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. sub-neg6.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\color{blue}{\frac{2}{x}}}} \]
    8. Taylor expanded in t around 0 67.4%

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

    if 1.25000000000000002e-195 < t

    1. Initial program 29.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/29.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-neg29.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. sub-neg29.6%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in l around 0 77.1%

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

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

\mathbf{elif}\;t \leq 1.35 \cdot 10^{-195}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\

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


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

    1. Initial program 35.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/35.1%

        \[\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-neg35.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. sub-neg35.2%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 83.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.49999999999999927e-251 < t < 1.35e-195

    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. sub-neg6.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\color{blue}{\frac{2}{x}}}} \]
    8. Taylor expanded in t around 0 67.4%

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

    if 1.35e-195 < t

    1. Initial program 29.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/29.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-neg29.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. sub-neg29.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \ell \cdot \left(-\ell\right)\right)}}} \]
    4. Applied egg-rr64.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}}}} \]
    5. Taylor expanded in l around 0 77.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{-251}:\\ \;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-195}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 15: 79.1% accurate, 2.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -8.2 \cdot 10^{-254}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-195}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{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 -8.2e-254)
     (- t_1)
     (if (<= t 1.45e-195) (* (/ t l) (sqrt 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 <= -8.2e-254) {
		tmp = -t_1;
	} else if (t <= 1.45e-195) {
		tmp = (t / l) * sqrt(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 <= (-8.2d-254)) then
        tmp = -t_1
    else if (t <= 1.45d-195) then
        tmp = (t / l) * sqrt(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 <= -8.2e-254) {
		tmp = -t_1;
	} else if (t <= 1.45e-195) {
		tmp = (t / l) * Math.sqrt(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 <= -8.2e-254:
		tmp = -t_1
	elif t <= 1.45e-195:
		tmp = (t / l) * math.sqrt(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 <= -8.2e-254)
		tmp = Float64(-t_1);
	elseif (t <= 1.45e-195)
		tmp = Float64(Float64(t / l) * sqrt(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 <= -8.2e-254)
		tmp = -t_1;
	elseif (t <= 1.45e-195)
		tmp = (t / l) * sqrt(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, -8.2e-254], (-t$95$1), If[LessEqual[t, 1.45e-195], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $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 -8.2 \cdot 10^{-254}:\\
\;\;\;\;-t_1\\

\mathbf{elif}\;t \leq 1.45 \cdot 10^{-195}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\

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


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

    1. Initial program 35.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/35.1%

        \[\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-neg35.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. sub-neg35.2%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 83.8%

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

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

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

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

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

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

    if -8.20000000000000034e-254 < t < 1.4500000000000001e-195

    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. sub-neg6.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\color{blue}{\frac{2}{x}}}} \]
    8. Taylor expanded in t around 0 67.4%

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

    if 1.4500000000000001e-195 < t

    1. Initial program 29.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/29.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-neg29.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. sub-neg29.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \ell \cdot \left(-\ell\right)\right)}}} \]
    4. Applied egg-rr64.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}}}} \]
    5. Taylor expanded in l around 0 77.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.2 \cdot 10^{-254}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-195}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 16: 78.6% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{-251}:\\ \;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-195}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \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 -9e-251)
   (+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x))))
   (if (<= t 1.2e-195) (* (/ t l) (sqrt x)) (+ 1.0 (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -9e-251) {
		tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
	} else if (t <= 1.2e-195) {
		tmp = (t / l) * sqrt(x);
	} 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 <= (-9d-251)) then
        tmp = (-1.0d0) + ((1.0d0 / x) - (0.5d0 / (x * x)))
    else if (t <= 1.2d-195) then
        tmp = (t / l) * sqrt(x)
    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 <= -9e-251) {
		tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
	} else if (t <= 1.2e-195) {
		tmp = (t / l) * Math.sqrt(x);
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -9e-251:
		tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)))
	elif t <= 1.2e-195:
		tmp = (t / l) * math.sqrt(x)
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -9e-251)
		tmp = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * x))));
	elseif (t <= 1.2e-195)
		tmp = Float64(Float64(t / l) * sqrt(x));
	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 <= -9e-251)
		tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
	elseif (t <= 1.2e-195)
		tmp = (t / l) * sqrt(x);
	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, -9e-251], N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-195], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{-251}:\\
\;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\

\mathbf{elif}\;t \leq 1.2 \cdot 10^{-195}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\

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


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

    1. Initial program 35.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/35.1%

        \[\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-neg35.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. sub-neg35.2%

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

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

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

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

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

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

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 83.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.99999999999999956e-251 < t < 1.2e-195

    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. sub-neg6.6%

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

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}, -\ell \cdot \ell\right)}} \]
      7. distribute-rgt-neg-in6.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \color{blue}{\ell \cdot \left(-\ell\right)}\right)}} \]
    3. Simplified6.6%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \ell \cdot \left(-\ell\right)\right)}}} \]
    4. Taylor expanded in l around inf 4.4%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\color{blue}{\sqrt{\left(\frac{x}{x - 1} + \frac{1}{x - 1}\right) - 1} \cdot \ell}} \]
    5. Step-by-step derivation
      1. *-commutative4.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\color{blue}{\ell \cdot \sqrt{\left(\frac{x}{x - 1} + \frac{1}{x - 1}\right) - 1}}} \]
      2. associate--l+4.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\color{blue}{\frac{x}{x - 1} + \left(\frac{1}{x - 1} - 1\right)}}} \]
      3. sub-neg4.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{x}{\color{blue}{x + \left(-1\right)}} + \left(\frac{1}{x - 1} - 1\right)}} \]
      4. metadata-eval4.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{x}{x + \color{blue}{-1}} + \left(\frac{1}{x - 1} - 1\right)}} \]
      5. +-commutative4.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{x}{\color{blue}{-1 + x}} + \left(\frac{1}{x - 1} - 1\right)}} \]
      6. sub-neg4.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{x}{-1 + x} + \left(\frac{1}{\color{blue}{x + \left(-1\right)}} - 1\right)}} \]
      7. metadata-eval4.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{x}{-1 + x} + \left(\frac{1}{x + \color{blue}{-1}} - 1\right)}} \]
      8. +-commutative4.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{x}{-1 + x} + \left(\frac{1}{\color{blue}{-1 + x}} - 1\right)}} \]
    6. Simplified4.4%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\color{blue}{\ell \cdot \sqrt{\frac{x}{-1 + x} + \left(\frac{1}{-1 + x} - 1\right)}}} \]
    7. Taylor expanded in x around inf 74.6%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\color{blue}{\frac{2}{x}}}} \]
    8. Taylor expanded in t around 0 67.4%

      \[\leadsto \color{blue}{\frac{t}{\ell} \cdot \sqrt{x}} \]

    if 1.2e-195 < t

    1. Initial program 29.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/29.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. Simplified29.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 39.7%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{0.5 \cdot \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)} + \sqrt{2} \cdot t}} \cdot t \]
    5. Step-by-step derivation
      1. fma-def39.7%

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)}} \cdot t \]
      2. sub-neg39.7%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      3. unpow239.7%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      4. fma-udef39.7%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)} + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      5. unpow239.7%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      6. mul-1-neg39.7%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(-\color{blue}{\left(-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      7. remove-double-neg39.7%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      8. unpow239.7%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      9. fma-udef39.7%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      10. unpow239.7%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      11. *-commutative39.7%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \color{blue}{t \cdot \sqrt{2}}\right)} \cdot t \]
    6. Simplified39.7%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}} \cdot t \]
    7. Taylor expanded in x around inf 60.6%

      \[\leadsto \color{blue}{1 + -1 \cdot \frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}} \]
    8. Step-by-step derivation
      1. mul-1-neg60.6%

        \[\leadsto 1 + \color{blue}{\left(-\frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}\right)} \]
      2. unsub-neg60.6%

        \[\leadsto \color{blue}{1 - \frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}} \]
      3. +-commutative60.6%

        \[\leadsto 1 - \frac{\color{blue}{2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}}{x} \]
      4. associate-*r/60.6%

        \[\leadsto 1 - \frac{\color{blue}{\frac{2 \cdot 1}{{\left(\sqrt{2}\right)}^{2}}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      5. metadata-eval60.6%

        \[\leadsto 1 - \frac{\frac{\color{blue}{2}}{{\left(\sqrt{2}\right)}^{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      6. unpow260.6%

        \[\leadsto 1 - \frac{\frac{2}{\color{blue}{\sqrt{2} \cdot \sqrt{2}}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      7. rem-square-sqrt60.6%

        \[\leadsto 1 - \frac{\frac{2}{\color{blue}{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      8. metadata-eval60.6%

        \[\leadsto 1 - \frac{\color{blue}{1} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      9. unpow260.6%

        \[\leadsto 1 - \frac{1 + \frac{\color{blue}{\ell \cdot \ell}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      10. unpow260.6%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)} \cdot {t}^{2}}}{x} \]
      11. rem-square-sqrt60.6%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{\color{blue}{2} \cdot {t}^{2}}}{x} \]
      12. unpow260.6%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{2 \cdot \color{blue}{\left(t \cdot t\right)}}}{x} \]
    9. Simplified60.6%

      \[\leadsto \color{blue}{1 - \frac{1 + \frac{\ell \cdot \ell}{2 \cdot \left(t \cdot t\right)}}{x}} \]
    10. Taylor expanded in l around 0 76.3%

      \[\leadsto 1 - \color{blue}{\frac{1}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification78.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{-251}:\\ \;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-195}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 17: 76.6% accurate, 14.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{-252}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-236}:\\ \;\;\;\;2 \cdot \frac{x}{\frac{\ell}{t} \cdot \frac{\ell}{t}}\\ \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.2e-252)
   (+ -1.0 (/ 1.0 x))
   (if (<= t 6.2e-236) (* 2.0 (/ x (* (/ l t) (/ l t)))) (+ 1.0 (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -7.2e-252) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 6.2e-236) {
		tmp = 2.0 * (x / ((l / t) * (l / t)));
	} 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.2d-252)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else if (t <= 6.2d-236) then
        tmp = 2.0d0 * (x / ((l / t) * (l / t)))
    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.2e-252) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 6.2e-236) {
		tmp = 2.0 * (x / ((l / t) * (l / t)));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -7.2e-252:
		tmp = -1.0 + (1.0 / x)
	elif t <= 6.2e-236:
		tmp = 2.0 * (x / ((l / t) * (l / t)))
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -7.2e-252)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	elseif (t <= 6.2e-236)
		tmp = Float64(2.0 * Float64(x / Float64(Float64(l / t) * Float64(l / t))));
	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.2e-252)
		tmp = -1.0 + (1.0 / x);
	elseif (t <= 6.2e-236)
		tmp = 2.0 * (x / ((l / t) * (l / t)));
	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.2e-252], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e-236], N[(2.0 * N[(x / N[(N[(l / t), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{-252}:\\
\;\;\;\;-1 + \frac{1}{x}\\

\mathbf{elif}\;t \leq 6.2 \cdot 10^{-236}:\\
\;\;\;\;2 \cdot \frac{x}{\frac{\ell}{t} \cdot \frac{\ell}{t}}\\

\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.20000000000000046e-252

    1. Initial program 35.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/35.1%

        \[\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-neg35.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. sub-neg35.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{\color{blue}{x + \left(-1\right)}}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}} \]
      4. metadata-eval35.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + \color{blue}{-1}}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}} \]
      5. +-commutative35.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \color{blue}{2 \cdot \left(t \cdot t\right) + \ell \cdot \ell}, -\ell \cdot \ell\right)}} \]
      6. fma-def35.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}, -\ell \cdot \ell\right)}} \]
      7. distribute-rgt-neg-in35.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \color{blue}{\ell \cdot \left(-\ell\right)}\right)}} \]
    3. Simplified35.2%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \ell \cdot \left(-\ell\right)\right)}}} \]
    4. Applied egg-rr75.4%

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 83.8%

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    6. Step-by-step derivation
      1. mul-1-neg83.8%

        \[\leadsto \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}} \]
      2. sub-neg83.8%

        \[\leadsto -\sqrt{\frac{\color{blue}{x + \left(-1\right)}}{1 + x}} \]
      3. metadata-eval83.8%

        \[\leadsto -\sqrt{\frac{x + \color{blue}{-1}}{1 + x}} \]
      4. +-commutative83.8%

        \[\leadsto -\sqrt{\frac{\color{blue}{-1 + x}}{1 + x}} \]
    7. Simplified83.8%

      \[\leadsto \color{blue}{-\sqrt{\frac{-1 + x}{1 + x}}} \]
    8. Taylor expanded in x around inf 82.2%

      \[\leadsto -\color{blue}{\left(1 - \frac{1}{x}\right)} \]

    if -7.20000000000000046e-252 < t < 6.1999999999999997e-236

    1. Initial program 4.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/4.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. Simplified4.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 57.8%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{0.5 \cdot \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)} + \sqrt{2} \cdot t}} \cdot t \]
    5. Step-by-step derivation
      1. fma-def57.8%

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)}} \cdot t \]
      2. sub-neg57.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      3. unpow257.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      4. fma-udef57.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)} + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      5. unpow257.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      6. mul-1-neg57.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(-\color{blue}{\left(-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      7. remove-double-neg57.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      8. unpow257.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      9. fma-udef57.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      10. unpow257.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      11. *-commutative57.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \color{blue}{t \cdot \sqrt{2}}\right)} \cdot t \]
    6. Simplified57.8%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}} \cdot t \]
    7. Taylor expanded in l around inf 52.5%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt{2}\right)}^{2} \cdot \left(t \cdot x\right)}{{\ell}^{2}}} \cdot t \]
    8. Step-by-step derivation
      1. associate-/l*52.5%

        \[\leadsto \color{blue}{\frac{{\left(\sqrt{2}\right)}^{2}}{\frac{{\ell}^{2}}{t \cdot x}}} \cdot t \]
      2. unpow252.5%

        \[\leadsto \frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{\frac{{\ell}^{2}}{t \cdot x}} \cdot t \]
      3. rem-square-sqrt52.5%

        \[\leadsto \frac{\color{blue}{2}}{\frac{{\ell}^{2}}{t \cdot x}} \cdot t \]
      4. unpow252.5%

        \[\leadsto \frac{2}{\frac{\color{blue}{\ell \cdot \ell}}{t \cdot x}} \cdot t \]
    9. Simplified52.5%

      \[\leadsto \color{blue}{\frac{2}{\frac{\ell \cdot \ell}{t \cdot x}}} \cdot t \]
    10. Taylor expanded in l around 0 52.1%

      \[\leadsto \color{blue}{2 \cdot \frac{{t}^{2} \cdot x}{{\ell}^{2}}} \]
    11. Step-by-step derivation
      1. *-commutative52.1%

        \[\leadsto 2 \cdot \frac{\color{blue}{x \cdot {t}^{2}}}{{\ell}^{2}} \]
      2. associate-/l*52.1%

        \[\leadsto 2 \cdot \color{blue}{\frac{x}{\frac{{\ell}^{2}}{{t}^{2}}}} \]
      3. unpow252.1%

        \[\leadsto 2 \cdot \frac{x}{\frac{\color{blue}{\ell \cdot \ell}}{{t}^{2}}} \]
      4. unpow252.1%

        \[\leadsto 2 \cdot \frac{x}{\frac{\ell \cdot \ell}{\color{blue}{t \cdot t}}} \]
      5. times-frac52.9%

        \[\leadsto 2 \cdot \frac{x}{\color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{t}}} \]
    12. Simplified52.9%

      \[\leadsto \color{blue}{2 \cdot \frac{x}{\frac{\ell}{t} \cdot \frac{\ell}{t}}} \]

    if 6.1999999999999997e-236 < t

    1. Initial program 29.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/29.2%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified29.2%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in x around inf 41.5%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{0.5 \cdot \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)} + \sqrt{2} \cdot t}} \cdot t \]
    5. Step-by-step derivation
      1. fma-def41.5%

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)}} \cdot t \]
      2. sub-neg41.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      3. unpow241.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      4. fma-udef41.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)} + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      5. unpow241.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      6. mul-1-neg41.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(-\color{blue}{\left(-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      7. remove-double-neg41.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      8. unpow241.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      9. fma-udef41.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      10. unpow241.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      11. *-commutative41.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \color{blue}{t \cdot \sqrt{2}}\right)} \cdot t \]
    6. Simplified41.5%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}} \cdot t \]
    7. Taylor expanded in x around inf 58.0%

      \[\leadsto \color{blue}{1 + -1 \cdot \frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}} \]
    8. Step-by-step derivation
      1. mul-1-neg58.0%

        \[\leadsto 1 + \color{blue}{\left(-\frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}\right)} \]
      2. unsub-neg58.0%

        \[\leadsto \color{blue}{1 - \frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}} \]
      3. +-commutative58.0%

        \[\leadsto 1 - \frac{\color{blue}{2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}}{x} \]
      4. associate-*r/58.0%

        \[\leadsto 1 - \frac{\color{blue}{\frac{2 \cdot 1}{{\left(\sqrt{2}\right)}^{2}}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      5. metadata-eval58.0%

        \[\leadsto 1 - \frac{\frac{\color{blue}{2}}{{\left(\sqrt{2}\right)}^{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      6. unpow258.0%

        \[\leadsto 1 - \frac{\frac{2}{\color{blue}{\sqrt{2} \cdot \sqrt{2}}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      7. rem-square-sqrt58.0%

        \[\leadsto 1 - \frac{\frac{2}{\color{blue}{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      8. metadata-eval58.0%

        \[\leadsto 1 - \frac{\color{blue}{1} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      9. unpow258.0%

        \[\leadsto 1 - \frac{1 + \frac{\color{blue}{\ell \cdot \ell}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      10. unpow258.0%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)} \cdot {t}^{2}}}{x} \]
      11. rem-square-sqrt58.0%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{\color{blue}{2} \cdot {t}^{2}}}{x} \]
      12. unpow258.0%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{2 \cdot \color{blue}{\left(t \cdot t\right)}}}{x} \]
    9. Simplified58.0%

      \[\leadsto \color{blue}{1 - \frac{1 + \frac{\ell \cdot \ell}{2 \cdot \left(t \cdot t\right)}}{x}} \]
    10. Taylor expanded in l around 0 74.8%

      \[\leadsto 1 - \color{blue}{\frac{1}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification76.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{-252}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-236}:\\ \;\;\;\;2 \cdot \frac{x}{\frac{\ell}{t} \cdot \frac{\ell}{t}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 18: 76.8% accurate, 14.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{-253}:\\ \;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-237}:\\ \;\;\;\;2 \cdot \frac{x}{\frac{\ell}{t} \cdot \frac{\ell}{t}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -2.3e-253)
   (+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x))))
   (if (<= t 1.55e-237) (* 2.0 (/ x (* (/ l t) (/ l t)))) (+ 1.0 (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -2.3e-253) {
		tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
	} else if (t <= 1.55e-237) {
		tmp = 2.0 * (x / ((l / t) * (l / t)));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-2.3d-253)) then
        tmp = (-1.0d0) + ((1.0d0 / x) - (0.5d0 / (x * x)))
    else if (t <= 1.55d-237) then
        tmp = 2.0d0 * (x / ((l / t) * (l / t)))
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -2.3e-253) {
		tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
	} else if (t <= 1.55e-237) {
		tmp = 2.0 * (x / ((l / t) * (l / t)));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -2.3e-253:
		tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)))
	elif t <= 1.55e-237:
		tmp = 2.0 * (x / ((l / t) * (l / t)))
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -2.3e-253)
		tmp = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * x))));
	elseif (t <= 1.55e-237)
		tmp = Float64(2.0 * Float64(x / Float64(Float64(l / t) * Float64(l / t))));
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -2.3e-253)
		tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
	elseif (t <= 1.55e-237)
		tmp = 2.0 * (x / ((l / t) * (l / t)));
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -2.3e-253], N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e-237], N[(2.0 * N[(x / N[(N[(l / t), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{-253}:\\
\;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\

\mathbf{elif}\;t \leq 1.55 \cdot 10^{-237}:\\
\;\;\;\;2 \cdot \frac{x}{\frac{\ell}{t} \cdot \frac{\ell}{t}}\\

\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.3e-253

    1. Initial program 35.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/35.1%

        \[\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-neg35.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. sub-neg35.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{\color{blue}{x + \left(-1\right)}}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}} \]
      4. metadata-eval35.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + \color{blue}{-1}}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}} \]
      5. +-commutative35.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \color{blue}{2 \cdot \left(t \cdot t\right) + \ell \cdot \ell}, -\ell \cdot \ell\right)}} \]
      6. fma-def35.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}, -\ell \cdot \ell\right)}} \]
      7. distribute-rgt-neg-in35.2%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \color{blue}{\ell \cdot \left(-\ell\right)}\right)}} \]
    3. Simplified35.2%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \ell \cdot \left(-\ell\right)\right)}}} \]
    4. Applied egg-rr75.4%

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 83.8%

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    6. Step-by-step derivation
      1. mul-1-neg83.8%

        \[\leadsto \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}} \]
      2. sub-neg83.8%

        \[\leadsto -\sqrt{\frac{\color{blue}{x + \left(-1\right)}}{1 + x}} \]
      3. metadata-eval83.8%

        \[\leadsto -\sqrt{\frac{x + \color{blue}{-1}}{1 + x}} \]
      4. +-commutative83.8%

        \[\leadsto -\sqrt{\frac{\color{blue}{-1 + x}}{1 + x}} \]
    7. Simplified83.8%

      \[\leadsto \color{blue}{-\sqrt{\frac{-1 + x}{1 + x}}} \]
    8. Taylor expanded in x around inf 82.8%

      \[\leadsto -\color{blue}{\left(\left(1 + 0.5 \cdot \frac{1}{{x}^{2}}\right) - \frac{1}{x}\right)} \]
    9. Step-by-step derivation
      1. associate--l+82.8%

        \[\leadsto -\color{blue}{\left(1 + \left(0.5 \cdot \frac{1}{{x}^{2}} - \frac{1}{x}\right)\right)} \]
      2. associate-*r/82.8%

        \[\leadsto -\left(1 + \left(\color{blue}{\frac{0.5 \cdot 1}{{x}^{2}}} - \frac{1}{x}\right)\right) \]
      3. metadata-eval82.8%

        \[\leadsto -\left(1 + \left(\frac{\color{blue}{0.5}}{{x}^{2}} - \frac{1}{x}\right)\right) \]
      4. unpow282.8%

        \[\leadsto -\left(1 + \left(\frac{0.5}{\color{blue}{x \cdot x}} - \frac{1}{x}\right)\right) \]
    10. Simplified82.8%

      \[\leadsto -\color{blue}{\left(1 + \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\right)} \]

    if -2.3e-253 < t < 1.5499999999999999e-237

    1. Initial program 4.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/4.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. Simplified4.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 57.8%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{0.5 \cdot \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)} + \sqrt{2} \cdot t}} \cdot t \]
    5. Step-by-step derivation
      1. fma-def57.8%

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)}} \cdot t \]
      2. sub-neg57.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      3. unpow257.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      4. fma-udef57.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)} + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      5. unpow257.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      6. mul-1-neg57.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(-\color{blue}{\left(-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      7. remove-double-neg57.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      8. unpow257.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      9. fma-udef57.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      10. unpow257.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      11. *-commutative57.8%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \color{blue}{t \cdot \sqrt{2}}\right)} \cdot t \]
    6. Simplified57.8%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}} \cdot t \]
    7. Taylor expanded in l around inf 52.5%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt{2}\right)}^{2} \cdot \left(t \cdot x\right)}{{\ell}^{2}}} \cdot t \]
    8. Step-by-step derivation
      1. associate-/l*52.5%

        \[\leadsto \color{blue}{\frac{{\left(\sqrt{2}\right)}^{2}}{\frac{{\ell}^{2}}{t \cdot x}}} \cdot t \]
      2. unpow252.5%

        \[\leadsto \frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{\frac{{\ell}^{2}}{t \cdot x}} \cdot t \]
      3. rem-square-sqrt52.5%

        \[\leadsto \frac{\color{blue}{2}}{\frac{{\ell}^{2}}{t \cdot x}} \cdot t \]
      4. unpow252.5%

        \[\leadsto \frac{2}{\frac{\color{blue}{\ell \cdot \ell}}{t \cdot x}} \cdot t \]
    9. Simplified52.5%

      \[\leadsto \color{blue}{\frac{2}{\frac{\ell \cdot \ell}{t \cdot x}}} \cdot t \]
    10. Taylor expanded in l around 0 52.1%

      \[\leadsto \color{blue}{2 \cdot \frac{{t}^{2} \cdot x}{{\ell}^{2}}} \]
    11. Step-by-step derivation
      1. *-commutative52.1%

        \[\leadsto 2 \cdot \frac{\color{blue}{x \cdot {t}^{2}}}{{\ell}^{2}} \]
      2. associate-/l*52.1%

        \[\leadsto 2 \cdot \color{blue}{\frac{x}{\frac{{\ell}^{2}}{{t}^{2}}}} \]
      3. unpow252.1%

        \[\leadsto 2 \cdot \frac{x}{\frac{\color{blue}{\ell \cdot \ell}}{{t}^{2}}} \]
      4. unpow252.1%

        \[\leadsto 2 \cdot \frac{x}{\frac{\ell \cdot \ell}{\color{blue}{t \cdot t}}} \]
      5. times-frac52.9%

        \[\leadsto 2 \cdot \frac{x}{\color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{t}}} \]
    12. Simplified52.9%

      \[\leadsto \color{blue}{2 \cdot \frac{x}{\frac{\ell}{t} \cdot \frac{\ell}{t}}} \]

    if 1.5499999999999999e-237 < t

    1. Initial program 29.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/29.2%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified29.2%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in x around inf 41.5%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{0.5 \cdot \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)} + \sqrt{2} \cdot t}} \cdot t \]
    5. Step-by-step derivation
      1. fma-def41.5%

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)}} \cdot t \]
      2. sub-neg41.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      3. unpow241.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      4. fma-udef41.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)} + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      5. unpow241.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      6. mul-1-neg41.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(-\color{blue}{\left(-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      7. remove-double-neg41.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      8. unpow241.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      9. fma-udef41.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      10. unpow241.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      11. *-commutative41.5%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \color{blue}{t \cdot \sqrt{2}}\right)} \cdot t \]
    6. Simplified41.5%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}} \cdot t \]
    7. Taylor expanded in x around inf 58.0%

      \[\leadsto \color{blue}{1 + -1 \cdot \frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}} \]
    8. Step-by-step derivation
      1. mul-1-neg58.0%

        \[\leadsto 1 + \color{blue}{\left(-\frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}\right)} \]
      2. unsub-neg58.0%

        \[\leadsto \color{blue}{1 - \frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}} \]
      3. +-commutative58.0%

        \[\leadsto 1 - \frac{\color{blue}{2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}}{x} \]
      4. associate-*r/58.0%

        \[\leadsto 1 - \frac{\color{blue}{\frac{2 \cdot 1}{{\left(\sqrt{2}\right)}^{2}}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      5. metadata-eval58.0%

        \[\leadsto 1 - \frac{\frac{\color{blue}{2}}{{\left(\sqrt{2}\right)}^{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      6. unpow258.0%

        \[\leadsto 1 - \frac{\frac{2}{\color{blue}{\sqrt{2} \cdot \sqrt{2}}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      7. rem-square-sqrt58.0%

        \[\leadsto 1 - \frac{\frac{2}{\color{blue}{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      8. metadata-eval58.0%

        \[\leadsto 1 - \frac{\color{blue}{1} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      9. unpow258.0%

        \[\leadsto 1 - \frac{1 + \frac{\color{blue}{\ell \cdot \ell}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      10. unpow258.0%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)} \cdot {t}^{2}}}{x} \]
      11. rem-square-sqrt58.0%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{\color{blue}{2} \cdot {t}^{2}}}{x} \]
      12. unpow258.0%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{2 \cdot \color{blue}{\left(t \cdot t\right)}}}{x} \]
    9. Simplified58.0%

      \[\leadsto \color{blue}{1 - \frac{1 + \frac{\ell \cdot \ell}{2 \cdot \left(t \cdot t\right)}}{x}} \]
    10. Taylor expanded in l around 0 74.8%

      \[\leadsto 1 - \color{blue}{\frac{1}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification76.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{-253}:\\ \;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-237}:\\ \;\;\;\;2 \cdot \frac{x}{\frac{\ell}{t} \cdot \frac{\ell}{t}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 19: 76.6% accurate, 31.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1\\ \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 -5e-310) -1.0 (+ 1.0 (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0;
	} 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 <= (-5d-310)) then
        tmp = -1.0d0
    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 <= -5e-310) {
		tmp = -1.0;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = -1.0
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-310)
		tmp = -1.0;
	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 <= -5e-310)
		tmp = -1.0;
	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, -5e-310], -1.0, N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1\\

\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.999999999999985e-310

    1. Initial program 33.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.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. sub-neg33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{\color{blue}{x + \left(-1\right)}}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}} \]
      4. metadata-eval33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + \color{blue}{-1}}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}} \]
      5. +-commutative33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \color{blue}{2 \cdot \left(t \cdot t\right) + \ell \cdot \ell}, -\ell \cdot \ell\right)}} \]
      6. fma-def33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}, -\ell \cdot \ell\right)}} \]
      7. distribute-rgt-neg-in33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \color{blue}{\ell \cdot \left(-\ell\right)}\right)}} \]
    3. Simplified33.6%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \ell \cdot \left(-\ell\right)\right)}}} \]
    4. Applied egg-rr73.5%

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 79.7%

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    6. Step-by-step derivation
      1. mul-1-neg79.7%

        \[\leadsto \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}} \]
      2. sub-neg79.7%

        \[\leadsto -\sqrt{\frac{\color{blue}{x + \left(-1\right)}}{1 + x}} \]
      3. metadata-eval79.7%

        \[\leadsto -\sqrt{\frac{x + \color{blue}{-1}}{1 + x}} \]
      4. +-commutative79.7%

        \[\leadsto -\sqrt{\frac{\color{blue}{-1 + x}}{1 + x}} \]
    7. Simplified79.7%

      \[\leadsto \color{blue}{-\sqrt{\frac{-1 + x}{1 + x}}} \]
    8. Taylor expanded in x around inf 77.3%

      \[\leadsto -\color{blue}{1} \]

    if -4.999999999999985e-310 < t

    1. Initial program 26.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/26.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. Simplified26.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 44.2%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{0.5 \cdot \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)} + \sqrt{2} \cdot t}} \cdot t \]
    5. Step-by-step derivation
      1. fma-def44.2%

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)}} \cdot t \]
      2. sub-neg44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      3. unpow244.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      4. fma-udef44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)} + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      5. unpow244.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      6. mul-1-neg44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(-\color{blue}{\left(-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      7. remove-double-neg44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      8. unpow244.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      9. fma-udef44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      10. unpow244.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      11. *-commutative44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \color{blue}{t \cdot \sqrt{2}}\right)} \cdot t \]
    6. Simplified44.2%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}} \cdot t \]
    7. Taylor expanded in x around inf 52.5%

      \[\leadsto \color{blue}{1 + -1 \cdot \frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}} \]
    8. Step-by-step derivation
      1. mul-1-neg52.5%

        \[\leadsto 1 + \color{blue}{\left(-\frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}\right)} \]
      2. unsub-neg52.5%

        \[\leadsto \color{blue}{1 - \frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}} \]
      3. +-commutative52.5%

        \[\leadsto 1 - \frac{\color{blue}{2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}}{x} \]
      4. associate-*r/52.5%

        \[\leadsto 1 - \frac{\color{blue}{\frac{2 \cdot 1}{{\left(\sqrt{2}\right)}^{2}}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      5. metadata-eval52.5%

        \[\leadsto 1 - \frac{\frac{\color{blue}{2}}{{\left(\sqrt{2}\right)}^{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      6. unpow252.5%

        \[\leadsto 1 - \frac{\frac{2}{\color{blue}{\sqrt{2} \cdot \sqrt{2}}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      7. rem-square-sqrt52.5%

        \[\leadsto 1 - \frac{\frac{2}{\color{blue}{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      8. metadata-eval52.5%

        \[\leadsto 1 - \frac{\color{blue}{1} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      9. unpow252.5%

        \[\leadsto 1 - \frac{1 + \frac{\color{blue}{\ell \cdot \ell}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      10. unpow252.5%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)} \cdot {t}^{2}}}{x} \]
      11. rem-square-sqrt52.5%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{\color{blue}{2} \cdot {t}^{2}}}{x} \]
      12. unpow252.5%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{2 \cdot \color{blue}{\left(t \cdot t\right)}}}{x} \]
    9. Simplified52.5%

      \[\leadsto \color{blue}{1 - \frac{1 + \frac{\ell \cdot \ell}{2 \cdot \left(t \cdot t\right)}}{x}} \]
    10. Taylor expanded in l around 0 68.8%

      \[\leadsto 1 - \color{blue}{\frac{1}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification73.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 20: 77.0% accurate, 31.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -5e-310) (+ -1.0 (/ 1.0 x)) (+ 1.0 (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
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 <= (-5d-310)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    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 <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = -1.0 + (1.0 / x)
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-310)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -5e-310)
		tmp = -1.0 + (1.0 / x);
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1 + \frac{1}{x}\\

\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.999999999999985e-310

    1. Initial program 33.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.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. sub-neg33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{\color{blue}{x + \left(-1\right)}}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}} \]
      4. metadata-eval33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + \color{blue}{-1}}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}} \]
      5. +-commutative33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \color{blue}{2 \cdot \left(t \cdot t\right) + \ell \cdot \ell}, -\ell \cdot \ell\right)}} \]
      6. fma-def33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}, -\ell \cdot \ell\right)}} \]
      7. distribute-rgt-neg-in33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \color{blue}{\ell \cdot \left(-\ell\right)}\right)}} \]
    3. Simplified33.6%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \ell \cdot \left(-\ell\right)\right)}}} \]
    4. Applied egg-rr73.5%

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 79.7%

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    6. Step-by-step derivation
      1. mul-1-neg79.7%

        \[\leadsto \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}} \]
      2. sub-neg79.7%

        \[\leadsto -\sqrt{\frac{\color{blue}{x + \left(-1\right)}}{1 + x}} \]
      3. metadata-eval79.7%

        \[\leadsto -\sqrt{\frac{x + \color{blue}{-1}}{1 + x}} \]
      4. +-commutative79.7%

        \[\leadsto -\sqrt{\frac{\color{blue}{-1 + x}}{1 + x}} \]
    7. Simplified79.7%

      \[\leadsto \color{blue}{-\sqrt{\frac{-1 + x}{1 + x}}} \]
    8. Taylor expanded in x around inf 78.1%

      \[\leadsto -\color{blue}{\left(1 - \frac{1}{x}\right)} \]

    if -4.999999999999985e-310 < t

    1. Initial program 26.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/26.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. Simplified26.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 44.2%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{0.5 \cdot \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)} + \sqrt{2} \cdot t}} \cdot t \]
    5. Step-by-step derivation
      1. fma-def44.2%

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)}} \cdot t \]
      2. sub-neg44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      3. unpow244.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      4. fma-udef44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)} + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      5. unpow244.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      6. mul-1-neg44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(-\color{blue}{\left(-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      7. remove-double-neg44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      8. unpow244.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      9. fma-udef44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      10. unpow244.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      11. *-commutative44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \color{blue}{t \cdot \sqrt{2}}\right)} \cdot t \]
    6. Simplified44.2%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}} \cdot t \]
    7. Taylor expanded in x around inf 52.5%

      \[\leadsto \color{blue}{1 + -1 \cdot \frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}} \]
    8. Step-by-step derivation
      1. mul-1-neg52.5%

        \[\leadsto 1 + \color{blue}{\left(-\frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}\right)} \]
      2. unsub-neg52.5%

        \[\leadsto \color{blue}{1 - \frac{\frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}} + 2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}}}{x}} \]
      3. +-commutative52.5%

        \[\leadsto 1 - \frac{\color{blue}{2 \cdot \frac{1}{{\left(\sqrt{2}\right)}^{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}}{x} \]
      4. associate-*r/52.5%

        \[\leadsto 1 - \frac{\color{blue}{\frac{2 \cdot 1}{{\left(\sqrt{2}\right)}^{2}}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      5. metadata-eval52.5%

        \[\leadsto 1 - \frac{\frac{\color{blue}{2}}{{\left(\sqrt{2}\right)}^{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      6. unpow252.5%

        \[\leadsto 1 - \frac{\frac{2}{\color{blue}{\sqrt{2} \cdot \sqrt{2}}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      7. rem-square-sqrt52.5%

        \[\leadsto 1 - \frac{\frac{2}{\color{blue}{2}} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      8. metadata-eval52.5%

        \[\leadsto 1 - \frac{\color{blue}{1} + \frac{{\ell}^{2}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      9. unpow252.5%

        \[\leadsto 1 - \frac{1 + \frac{\color{blue}{\ell \cdot \ell}}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{x} \]
      10. unpow252.5%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)} \cdot {t}^{2}}}{x} \]
      11. rem-square-sqrt52.5%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{\color{blue}{2} \cdot {t}^{2}}}{x} \]
      12. unpow252.5%

        \[\leadsto 1 - \frac{1 + \frac{\ell \cdot \ell}{2 \cdot \color{blue}{\left(t \cdot t\right)}}}{x} \]
    9. Simplified52.5%

      \[\leadsto \color{blue}{1 - \frac{1 + \frac{\ell \cdot \ell}{2 \cdot \left(t \cdot t\right)}}{x}} \]
    10. Taylor expanded in l around 0 68.8%

      \[\leadsto 1 - \color{blue}{\frac{1}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification73.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 21: 76.3% accurate, 73.5× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-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 -5e-310) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		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 <= (-5d-310)) 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 <= -5e-310) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = -1.0
	else:
		tmp = 1.0
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-310)
		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 <= -5e-310)
		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, -5e-310], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.999999999999985e-310

    1. Initial program 33.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.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. sub-neg33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{\color{blue}{x + \left(-1\right)}}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}} \]
      4. metadata-eval33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + \color{blue}{-1}}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}} \]
      5. +-commutative33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \color{blue}{2 \cdot \left(t \cdot t\right) + \ell \cdot \ell}, -\ell \cdot \ell\right)}} \]
      6. fma-def33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}, -\ell \cdot \ell\right)}} \]
      7. distribute-rgt-neg-in33.6%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \color{blue}{\ell \cdot \left(-\ell\right)}\right)}} \]
    3. Simplified33.6%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \ell \cdot \left(-\ell\right)\right)}}} \]
    4. Applied egg-rr73.5%

      \[\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}}}} \]
    5. Taylor expanded in t around -inf 79.7%

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    6. Step-by-step derivation
      1. mul-1-neg79.7%

        \[\leadsto \color{blue}{-\sqrt{\frac{x - 1}{1 + x}}} \]
      2. sub-neg79.7%

        \[\leadsto -\sqrt{\frac{\color{blue}{x + \left(-1\right)}}{1 + x}} \]
      3. metadata-eval79.7%

        \[\leadsto -\sqrt{\frac{x + \color{blue}{-1}}{1 + x}} \]
      4. +-commutative79.7%

        \[\leadsto -\sqrt{\frac{\color{blue}{-1 + x}}{1 + x}} \]
    7. Simplified79.7%

      \[\leadsto \color{blue}{-\sqrt{\frac{-1 + x}{1 + x}}} \]
    8. Taylor expanded in x around inf 77.3%

      \[\leadsto -\color{blue}{1} \]

    if -4.999999999999985e-310 < t

    1. Initial program 26.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/26.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. Simplified26.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 44.2%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{0.5 \cdot \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)} + \sqrt{2} \cdot t}} \cdot t \]
    5. Step-by-step derivation
      1. fma-def44.2%

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)}} \cdot t \]
      2. sub-neg44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      3. unpow244.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      4. fma-udef44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)} + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      5. unpow244.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      6. mul-1-neg44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(-\color{blue}{\left(-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      7. remove-double-neg44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      8. unpow244.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      9. fma-udef44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      10. unpow244.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
      11. *-commutative44.2%

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \color{blue}{t \cdot \sqrt{2}}\right)} \cdot t \]
    6. Simplified44.2%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}} \cdot t \]
    7. Taylor expanded in x around inf 67.7%

      \[\leadsto \color{blue}{\frac{1}{t}} \cdot t \]
    8. Taylor expanded in t around 0 67.9%

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 22: 39.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 30.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/30.2%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
  3. Simplified30.2%

    \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
  4. Taylor expanded in x around inf 24.1%

    \[\leadsto \frac{\sqrt{2}}{\color{blue}{0.5 \cdot \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)} + \sqrt{2} \cdot t}} \cdot t \]
  5. Step-by-step derivation
    1. fma-def24.1%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) - -1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)}} \cdot t \]
    2. sub-neg24.1%

      \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
    3. unpow224.1%

      \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
    4. fma-udef24.1%

      \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)} + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
    5. unpow224.1%

      \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) + \left(--1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
    6. mul-1-neg24.1%

      \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(-\color{blue}{\left(-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
    7. remove-double-neg24.1%

      \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\left({\ell}^{2} + 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
    8. unpow224.1%

      \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \left(\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
    9. fma-udef24.1%

      \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot {t}^{2}\right)}}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
    10. unpow224.1%

      \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \color{blue}{\left(t \cdot t\right)}\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \sqrt{2} \cdot t\right)} \cdot t \]
    11. *-commutative24.1%

      \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, \color{blue}{t \cdot \sqrt{2}}\right)} \cdot t \]
  6. Simplified24.1%

    \[\leadsto \frac{\sqrt{2}}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}} \cdot t \]
  7. Taylor expanded in x around inf 34.0%

    \[\leadsto \color{blue}{\frac{1}{t}} \cdot t \]
  8. Taylor expanded in t around 0 34.0%

    \[\leadsto \color{blue}{1} \]
  9. Final simplification34.0%

    \[\leadsto 1 \]

Reproduce

?
herbie shell --seed 2023229 
(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)))))