Toniolo and Linder, Equation (7)

Percentage Accurate: 33.6% → 85.1%
Time: 22.3s
Alternatives: 15
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 15 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 33.6% accurate, 1.0× speedup?

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

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

Alternative 1: 85.1% accurate, 0.4× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -3.6 \cdot 10^{+140}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq -5.7 \cdot 10^{-145}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right) + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-226}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-43}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{2 \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -3.6e+140)
     (- t_1)
     (if (<= t -5.7e-145)
       (* t (sqrt (/ 2.0 (* 2.0 (+ (* t (+ t (/ t x))) (* l (/ l x)))))))
       (if (<= t 1.45e-226)
         (* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
         (if (<= t 6e-43)
           (*
            t
            (/
             (sqrt 2.0)
             (fma
              0.5
              (/ (* 2.0 (fma 2.0 (* t t) (* l l))) (* (sqrt 2.0) (* t x)))
              (* t (sqrt 2.0)))))
           t_1))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -3.6e+140) {
		tmp = -t_1;
	} else if (t <= -5.7e-145) {
		tmp = t * sqrt((2.0 / (2.0 * ((t * (t + (t / x))) + (l * (l / x))))));
	} else if (t <= 1.45e-226) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
	} else if (t <= 6e-43) {
		tmp = t * (sqrt(2.0) / fma(0.5, ((2.0 * fma(2.0, (t * t), (l * l))) / (sqrt(2.0) * (t * x))), (t * sqrt(2.0))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -3.6e+140)
		tmp = Float64(-t_1);
	elseif (t <= -5.7e-145)
		tmp = Float64(t * sqrt(Float64(2.0 / Float64(2.0 * Float64(Float64(t * Float64(t + Float64(t / x))) + Float64(l * Float64(l / x)))))));
	elseif (t <= 1.45e-226)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x)))))));
	elseif (t <= 6e-43)
		tmp = Float64(t * Float64(sqrt(2.0) / fma(0.5, Float64(Float64(2.0 * fma(2.0, Float64(t * t), Float64(l * l))) / Float64(sqrt(2.0) * Float64(t * x))), Float64(t * sqrt(2.0)))));
	else
		tmp = t_1;
	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]}, If[LessEqual[t, -3.6e+140], (-t$95$1), If[LessEqual[t, -5.7e-145], N[(t * N[Sqrt[N[(2.0 / N[(2.0 * N[(N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e-226], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / 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, 6e-43], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.5 * N[(N[(2.0 * N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{+140}:\\
\;\;\;\;-t_1\\

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

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

\mathbf{elif}\;t \leq 6 \cdot 10^{-43}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{2 \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}\\

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


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

    1. Initial program 6.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/6.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. Simplified6.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 t around inf 3.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6e140 < t < -5.70000000000000032e-145

    1. Initial program 65.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/65.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. Simplified65.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 82.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.70000000000000032e-145 < t < 1.45000000000000001e-226

    1. Initial program 3.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/3.3%

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{\color{blue}{2}}{{x}^{2}}}} \cdot t \]
      5. unpow249.8%

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{\color{blue}{x \cdot x}}}} \cdot t \]
    7. Simplified49.8%

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

    if 1.45000000000000001e-226 < t < 6.00000000000000007e-43

    1. Initial program 46.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{2 \cdot \mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{t \cdot \left(x \cdot \sqrt{2}\right)}, t \cdot \sqrt{2}\right)} \cdot t \]
      9. associate-*r*83.2%

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

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

    if 6.00000000000000007e-43 < t

    1. Initial program 41.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/41.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{+140}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -5.7 \cdot 10^{-145}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right) + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-226}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-43}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{2 \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 2: 85.1% accurate, 0.5× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := 2 + \frac{4}{x}\\ t_2 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -3.55 \cdot 10^{+140}:\\ \;\;\;\;-t_2\\ \mathbf{elif}\;t \leq -5.7 \cdot 10^{-145}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right) + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-226}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-41}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(t, \sqrt{t_1}, \frac{\ell \cdot \ell}{t \cdot x} \cdot \sqrt{\frac{1}{t_1}}\right)}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (+ 2.0 (/ 4.0 x))) (t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -3.55e+140)
     (- t_2)
     (if (<= t -5.7e-145)
       (* t (sqrt (/ 2.0 (* 2.0 (+ (* t (+ t (/ t x))) (* l (/ l x)))))))
       (if (<= t 2.7e-226)
         (* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
         (if (<= t 3.7e-41)
           (*
            t
            (/
             (sqrt 2.0)
             (fma t (sqrt t_1) (* (/ (* l l) (* t x)) (sqrt (/ 1.0 t_1))))))
           t_2))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = 2.0 + (4.0 / x);
	double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -3.55e+140) {
		tmp = -t_2;
	} else if (t <= -5.7e-145) {
		tmp = t * sqrt((2.0 / (2.0 * ((t * (t + (t / x))) + (l * (l / x))))));
	} else if (t <= 2.7e-226) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
	} else if (t <= 3.7e-41) {
		tmp = t * (sqrt(2.0) / fma(t, sqrt(t_1), (((l * l) / (t * x)) * sqrt((1.0 / t_1)))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = Float64(2.0 + Float64(4.0 / x))
	t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -3.55e+140)
		tmp = Float64(-t_2);
	elseif (t <= -5.7e-145)
		tmp = Float64(t * sqrt(Float64(2.0 / Float64(2.0 * Float64(Float64(t * Float64(t + Float64(t / x))) + Float64(l * Float64(l / x)))))));
	elseif (t <= 2.7e-226)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x)))))));
	elseif (t <= 3.7e-41)
		tmp = Float64(t * Float64(sqrt(2.0) / fma(t, sqrt(t_1), Float64(Float64(Float64(l * l) / Float64(t * x)) * sqrt(Float64(1.0 / t_1))))));
	else
		tmp = t_2;
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 + N[(4.0 / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -3.55e+140], (-t$95$2), If[LessEqual[t, -5.7e-145], N[(t * N[Sqrt[N[(2.0 / N[(2.0 * N[(N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e-226], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / 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, 3.7e-41], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(t * N[Sqrt[t$95$1], $MachinePrecision] + N[(N[(N[(l * l), $MachinePrecision] / N[(t * x), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 + \frac{4}{x}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -3.55 \cdot 10^{+140}:\\
\;\;\;\;-t_2\\

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

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

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

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


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

    1. Initial program 6.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/6.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. Simplified6.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 t around inf 3.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.55000000000000014e140 < t < -5.70000000000000032e-145

    1. Initial program 65.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/65.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. Simplified65.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 82.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.70000000000000032e-145 < t < 2.70000000000000014e-226

    1. Initial program 3.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/3.3%

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{\color{blue}{2}}{{x}^{2}}}} \cdot t \]
      5. unpow249.8%

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{\color{blue}{x \cdot x}}}} \cdot t \]
    7. Simplified49.8%

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

    if 2.70000000000000014e-226 < t < 3.7000000000000002e-41

    1. Initial program 46.9%

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

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

      \[\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 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.7000000000000002e-41 < t

    1. Initial program 41.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/41.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.55 \cdot 10^{+140}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -5.7 \cdot 10^{-145}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right) + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-226}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-41}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(t, \sqrt{2 + \frac{4}{x}}, \frac{\ell \cdot \ell}{t \cdot x} \cdot \sqrt{\frac{1}{2 + \frac{4}{x}}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 3: 85.0% accurate, 0.5× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -3.7 \cdot 10^{+140}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq -5.7 \cdot 10^{-145}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right) + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-226}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-39}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{2 \cdot \left(t \cdot t + \ell \cdot \ell\right)}{t \cdot \left(x \cdot \sqrt{2}\right)}, t \cdot \sqrt{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -3.7e+140)
     (- t_1)
     (if (<= t -5.7e-145)
       (* t (sqrt (/ 2.0 (* 2.0 (+ (* t (+ t (/ t x))) (* l (/ l x)))))))
       (if (<= t 5.2e-226)
         (* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
         (if (<= t 7.5e-39)
           (*
            t
            (/
             (sqrt 2.0)
             (fma
              0.5
              (/ (* 2.0 (+ (* t t) (* l l))) (* t (* x (sqrt 2.0))))
              (* t (sqrt 2.0)))))
           t_1))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -3.7e+140) {
		tmp = -t_1;
	} else if (t <= -5.7e-145) {
		tmp = t * sqrt((2.0 / (2.0 * ((t * (t + (t / x))) + (l * (l / x))))));
	} else if (t <= 5.2e-226) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
	} else if (t <= 7.5e-39) {
		tmp = t * (sqrt(2.0) / fma(0.5, ((2.0 * ((t * t) + (l * l))) / (t * (x * sqrt(2.0)))), (t * sqrt(2.0))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -3.7e+140)
		tmp = Float64(-t_1);
	elseif (t <= -5.7e-145)
		tmp = Float64(t * sqrt(Float64(2.0 / Float64(2.0 * Float64(Float64(t * Float64(t + Float64(t / x))) + Float64(l * Float64(l / x)))))));
	elseif (t <= 5.2e-226)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x)))))));
	elseif (t <= 7.5e-39)
		tmp = Float64(t * Float64(sqrt(2.0) / fma(0.5, Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(l * l))) / Float64(t * Float64(x * sqrt(2.0)))), Float64(t * sqrt(2.0)))));
	else
		tmp = t_1;
	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]}, If[LessEqual[t, -3.7e+140], (-t$95$1), If[LessEqual[t, -5.7e-145], N[(t * N[Sqrt[N[(2.0 / N[(2.0 * N[(N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-226], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / 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, 7.5e-39], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.5 * N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[(x * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+140}:\\
\;\;\;\;-t_1\\

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

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

\mathbf{elif}\;t \leq 7.5 \cdot 10^{-39}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{2 \cdot \left(t \cdot t + \ell \cdot \ell\right)}{t \cdot \left(x \cdot \sqrt{2}\right)}, t \cdot \sqrt{2}\right)}\\

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


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

    1. Initial program 6.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/6.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. Simplified6.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 t around inf 3.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.70000000000000003e140 < t < -5.70000000000000032e-145

    1. Initial program 65.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/65.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. Simplified65.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 82.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.70000000000000032e-145 < t < 5.1999999999999997e-226

    1. Initial program 3.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/3.3%

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{\color{blue}{2}}{{x}^{2}}}} \cdot t \]
      5. unpow249.8%

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{\color{blue}{x \cdot x}}}} \cdot t \]
    7. Simplified49.8%

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

    if 5.1999999999999997e-226 < t < 7.49999999999999971e-39

    1. Initial program 46.9%

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

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

      \[\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 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.49999999999999971e-39 < t

    1. Initial program 41.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/41.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{+140}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -5.7 \cdot 10^{-145}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right) + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-226}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-39}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{2 \cdot \left(t \cdot t + \ell \cdot \ell\right)}{t \cdot \left(x \cdot \sqrt{2}\right)}, t \cdot \sqrt{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 4: 87.8% accurate, 1.0× speedup?

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

\mathbf{elif}\;t \leq -5.7 \cdot 10^{-145}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 10^{+129}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 6.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/6.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. Simplified6.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 t around inf 3.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000024e140 < t < -5.70000000000000032e-145 or 1.04999999999999992e-229 < t < 1e129

    1. Initial program 65.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/65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.70000000000000032e-145 < t < 1.04999999999999992e-229

    1. Initial program 3.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/3.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. Simplified3.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 l around inf 2.7%

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{\color{blue}{2}}{{x}^{2}}}} \cdot t \]
      5. unpow252.5%

        \[\leadsto \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{\color{blue}{x \cdot x}}}} \cdot t \]
    7. Simplified52.5%

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

    if 1e129 < t

    1. Initial program 10.2%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+140}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -5.7 \cdot 10^{-145}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right) + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-229}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 10^{+129}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right) + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 5: 86.6% accurate, 1.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.8000000000000001e140

    1. Initial program 6.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/6.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. Simplified6.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 t around inf 3.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8000000000000001e140 < t < 9.80000000000000035e128

    1. Initial program 52.2%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/52.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. Simplified52.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 77.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.80000000000000035e128 < t

    1. Initial program 10.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 80.0% accurate, 2.0× speedup?

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

\mathbf{elif}\;t \leq 1.65 \cdot 10^{-226}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\

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


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

    1. Initial program 38.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/38.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. Simplified38.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 46.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{-t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}}} \cdot t \]
      2. distribute-rgt-neg-in85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{t \cdot \left(\color{blue}{2} \cdot x\right)} + \left(-\frac{1}{t}\right)\right) \cdot t \]
      7. distribute-neg-frac86.2%

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

        \[\leadsto \left(\frac{2}{t \cdot \left(2 \cdot x\right)} + \frac{\color{blue}{-1}}{t}\right) \cdot t \]
    15. Simplified86.2%

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

    if -2.75000000000000012e-129 < t < 1.65e-226

    1. Initial program 3.2%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/3.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. Simplified3.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 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \sqrt{x}}{\ell}} \cdot t \]
      2. *-lft-identity51.0%

        \[\leadsto \frac{\color{blue}{\sqrt{x}}}{\ell} \cdot t \]
    10. Simplified51.0%

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

    if 1.65e-226 < t

    1. Initial program 42.6%

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

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

      \[\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 t around inf 35.7%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 79.9% accurate, 2.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{-128}:\\ \;\;\;\;t \cdot \left(\frac{2}{t \cdot \left(x \cdot 2\right)} + \frac{-1}{t}\right)\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-227}:\\ \;\;\;\;t \cdot \left(\frac{1}{\ell} \cdot \sqrt{x}\right)\\ \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 -7.2e-128)
   (* t (+ (/ 2.0 (* t (* x 2.0))) (/ -1.0 t)))
   (if (<= t 7.2e-227)
     (* t (* (/ 1.0 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 <= -7.2e-128) {
		tmp = t * ((2.0 / (t * (x * 2.0))) + (-1.0 / t));
	} else if (t <= 7.2e-227) {
		tmp = t * ((1.0 / 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 <= (-7.2d-128)) then
        tmp = t * ((2.0d0 / (t * (x * 2.0d0))) + ((-1.0d0) / t))
    else if (t <= 7.2d-227) then
        tmp = t * ((1.0d0 / 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 <= -7.2e-128) {
		tmp = t * ((2.0 / (t * (x * 2.0))) + (-1.0 / t));
	} else if (t <= 7.2e-227) {
		tmp = t * ((1.0 / 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 <= -7.2e-128:
		tmp = t * ((2.0 / (t * (x * 2.0))) + (-1.0 / t))
	elif t <= 7.2e-227:
		tmp = t * ((1.0 / 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 <= -7.2e-128)
		tmp = Float64(t * Float64(Float64(2.0 / Float64(t * Float64(x * 2.0))) + Float64(-1.0 / t)));
	elseif (t <= 7.2e-227)
		tmp = Float64(t * Float64(Float64(1.0 / 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 <= -7.2e-128)
		tmp = t * ((2.0 / (t * (x * 2.0))) + (-1.0 / t));
	elseif (t <= 7.2e-227)
		tmp = t * ((1.0 / 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, -7.2e-128], N[(t * N[(N[(2.0 / N[(t * N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e-227], N[(t * N[(N[(1.0 / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $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 -7.2 \cdot 10^{-128}:\\
\;\;\;\;t \cdot \left(\frac{2}{t \cdot \left(x \cdot 2\right)} + \frac{-1}{t}\right)\\

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

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


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

    1. Initial program 38.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/38.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. Simplified38.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 46.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{-t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}}} \cdot t \]
      2. distribute-rgt-neg-in85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{t \cdot \left(\color{blue}{2} \cdot x\right)} + \left(-\frac{1}{t}\right)\right) \cdot t \]
      7. distribute-neg-frac86.2%

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

        \[\leadsto \left(\frac{2}{t \cdot \left(2 \cdot x\right)} + \frac{\color{blue}{-1}}{t}\right) \cdot t \]
    15. Simplified86.2%

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

    if -7.20000000000000049e-128 < t < 7.1999999999999999e-227

    1. Initial program 3.2%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/3.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. Simplified3.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 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.1999999999999999e-227 < t

    1. Initial program 42.6%

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

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

      \[\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 t around inf 35.7%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 80.2% accurate, 2.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -9.2 \cdot 10^{-122}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-226}:\\ \;\;\;\;t \cdot \left(\frac{1}{\ell} \cdot \sqrt{x}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -9.2e-122)
     (- t_1)
     (if (<= t 4.2e-226) (* t (* (/ 1.0 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 <= -9.2e-122) {
		tmp = -t_1;
	} else if (t <= 4.2e-226) {
		tmp = t * ((1.0 / 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 <= (-9.2d-122)) then
        tmp = -t_1
    else if (t <= 4.2d-226) then
        tmp = t * ((1.0d0 / 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 <= -9.2e-122) {
		tmp = -t_1;
	} else if (t <= 4.2e-226) {
		tmp = t * ((1.0 / 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 <= -9.2e-122:
		tmp = -t_1
	elif t <= 4.2e-226:
		tmp = t * ((1.0 / 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 <= -9.2e-122)
		tmp = Float64(-t_1);
	elseif (t <= 4.2e-226)
		tmp = Float64(t * Float64(Float64(1.0 / 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 <= -9.2e-122)
		tmp = -t_1;
	elseif (t <= 4.2e-226)
		tmp = t * ((1.0 / 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, -9.2e-122], (-t$95$1), If[LessEqual[t, 4.2e-226], N[(t * N[(N[(1.0 / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{-122}:\\
\;\;\;\;-t_1\\

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

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


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

    1. Initial program 38.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/38.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. Simplified38.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 t around inf 33.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.20000000000000028e-122 < t < 4.2000000000000003e-226

    1. Initial program 3.2%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/3.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. Simplified3.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 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000003e-226 < t

    1. Initial program 42.6%

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

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

      \[\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 t around inf 35.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.2 \cdot 10^{-122}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-226}:\\ \;\;\;\;t \cdot \left(\frac{1}{\ell} \cdot \sqrt{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 9: 78.2% accurate, 2.1× speedup?

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

\mathbf{elif}\;t \leq 5.2 \cdot 10^{-226}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\

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


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

    1. Initial program 38.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/38.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. Simplified38.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 46.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{-t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}}} \cdot t \]
      2. distribute-rgt-neg-in85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{t \cdot \left(\color{blue}{2} \cdot x\right)} + \left(-\frac{1}{t}\right)\right) \cdot t \]
      7. distribute-neg-frac86.2%

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

        \[\leadsto \left(\frac{2}{t \cdot \left(2 \cdot x\right)} + \frac{\color{blue}{-1}}{t}\right) \cdot t \]
    15. Simplified86.2%

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

    if -5.1999999999999995e-122 < t < 5.1999999999999997e-226

    1. Initial program 3.2%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/3.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. Simplified3.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 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.1999999999999997e-226 < t

    1. Initial program 42.6%

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

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

      \[\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 t around inf 35.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 79.8% accurate, 2.1× speedup?

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

\mathbf{elif}\;t \leq 1.5 \cdot 10^{-226}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\

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


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

    1. Initial program 38.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/38.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. Simplified38.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 46.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{-t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}}} \cdot t \]
      2. distribute-rgt-neg-in85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{t \cdot \left(\color{blue}{2} \cdot x\right)} + \left(-\frac{1}{t}\right)\right) \cdot t \]
      7. distribute-neg-frac86.2%

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

        \[\leadsto \left(\frac{2}{t \cdot \left(2 \cdot x\right)} + \frac{\color{blue}{-1}}{t}\right) \cdot t \]
    15. Simplified86.2%

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

    if -7.5999999999999997e-130 < t < 1.49999999999999998e-226

    1. Initial program 3.2%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/3.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. Simplified3.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 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \sqrt{x}}{\ell}} \cdot t \]
      2. *-lft-identity51.0%

        \[\leadsto \frac{\color{blue}{\sqrt{x}}}{\ell} \cdot t \]
    10. Simplified51.0%

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

    if 1.49999999999999998e-226 < t

    1. Initial program 42.6%

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

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

      \[\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 t around inf 35.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.6 \cdot 10^{-130}:\\ \;\;\;\;t \cdot \left(\frac{2}{t \cdot \left(x \cdot 2\right)} + \frac{-1}{t}\right)\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-226}:\\ \;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]

Alternative 11: 76.5% accurate, 14.9× speedup?

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

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


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

    1. Initial program 31.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{-t \cdot \sqrt{2 + 4 \cdot \frac{1}{x}}}} \cdot t \]
      2. distribute-rgt-neg-in75.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{t \cdot \left(\color{blue}{2} \cdot x\right)} + \left(-\frac{1}{t}\right)\right) \cdot t \]
      7. distribute-neg-frac75.4%

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

        \[\leadsto \left(\frac{2}{t \cdot \left(2 \cdot x\right)} + \frac{\color{blue}{-1}}{t}\right) \cdot t \]
    15. Simplified75.4%

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

    if -4.9999999999999995e-309 < t

    1. Initial program 39.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/39.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. Simplified39.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 t around inf 33.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 76.2% accurate, 17.2× speedup?

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

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


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

    1. Initial program 31.2%

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

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

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

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

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

        \[\leadsto \left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \]
      2. rem-square-sqrt73.8%

        \[\leadsto \left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \color{blue}{-1} \]
    7. Simplified73.8%

      \[\leadsto \left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \color{blue}{-1} \]
    8. Step-by-step derivation
      1. sqrt-unprod74.9%

        \[\leadsto \color{blue}{\sqrt{0.5 \cdot 2}} \cdot -1 \]
      2. metadata-eval74.9%

        \[\leadsto \sqrt{\color{blue}{1}} \cdot -1 \]
      3. metadata-eval74.9%

        \[\leadsto \color{blue}{1} \cdot -1 \]
    9. Applied egg-rr74.9%

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

    if -5.00000000000023e-311 < t

    1. Initial program 39.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/39.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. Simplified39.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 t around inf 33.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 76.1% accurate, 31.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-311}:\\ \;\;\;\;-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-311) -1.0 (+ 1.0 (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-311) {
		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-311)) 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-311) {
		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-311:
		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-311)
		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-311)
		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-311], -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^{-311}:\\
\;\;\;\;-1\\

\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.00000000000023e-311

    1. Initial program 31.2%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/31.3%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified31.3%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in t around inf 1.7%

      \[\leadsto \color{blue}{\left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    5. Taylor expanded in x around -inf 0.0%

      \[\leadsto \left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \color{blue}{{\left(\sqrt{-1}\right)}^{2}} \]
    6. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \]
      2. rem-square-sqrt73.8%

        \[\leadsto \left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \color{blue}{-1} \]
    7. Simplified73.8%

      \[\leadsto \left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \color{blue}{-1} \]
    8. Step-by-step derivation
      1. sqrt-unprod74.9%

        \[\leadsto \color{blue}{\sqrt{0.5 \cdot 2}} \cdot -1 \]
      2. metadata-eval74.9%

        \[\leadsto \sqrt{\color{blue}{1}} \cdot -1 \]
      3. metadata-eval74.9%

        \[\leadsto \color{blue}{1} \cdot -1 \]
    9. Applied egg-rr74.9%

      \[\leadsto \color{blue}{1} \cdot -1 \]

    if -5.00000000000023e-311 < t

    1. Initial program 39.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/39.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. Simplified39.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 t around inf 33.1%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{{t}^{2} \cdot \left(1 + x\right)}{x - 1}}}} \cdot t \]
    5. Step-by-step derivation
      1. +-commutative33.1%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t \]
      2. associate-*r/45.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \frac{x + 1}{x - 1}\right)}}} \cdot t \]
      3. sub-neg45.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{\color{blue}{x + \left(-1\right)}}\right)}} \cdot t \]
      4. metadata-eval45.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{x + \color{blue}{-1}}\right)}} \cdot t \]
      5. unpow245.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{x + 1}{x + -1}\right)}} \cdot t \]
      6. +-commutative45.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{\color{blue}{-1 + x}}\right)}} \cdot t \]
    6. Simplified45.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{-1 + x}\right)}}} \cdot t \]
    7. Taylor expanded in x around inf 85.2%

      \[\leadsto \color{blue}{1 - \frac{1}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-311}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 14: 75.8% accurate, 73.5× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-311}:\\ \;\;\;\;-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-311) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-311) {
		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-311)) 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-311) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -5e-311:
		tmp = -1.0
	else:
		tmp = 1.0
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-311)
		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-311)
		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-311], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-311}:\\
\;\;\;\;-1\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.00000000000023e-311

    1. Initial program 31.2%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/31.3%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified31.3%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Taylor expanded in t around inf 1.7%

      \[\leadsto \color{blue}{\left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    5. Taylor expanded in x around -inf 0.0%

      \[\leadsto \left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \color{blue}{{\left(\sqrt{-1}\right)}^{2}} \]
    6. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \]
      2. rem-square-sqrt73.8%

        \[\leadsto \left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \color{blue}{-1} \]
    7. Simplified73.8%

      \[\leadsto \left(\sqrt{0.5} \cdot \sqrt{2}\right) \cdot \color{blue}{-1} \]
    8. Step-by-step derivation
      1. sqrt-unprod74.9%

        \[\leadsto \color{blue}{\sqrt{0.5 \cdot 2}} \cdot -1 \]
      2. metadata-eval74.9%

        \[\leadsto \sqrt{\color{blue}{1}} \cdot -1 \]
      3. metadata-eval74.9%

        \[\leadsto \color{blue}{1} \cdot -1 \]
    9. Applied egg-rr74.9%

      \[\leadsto \color{blue}{1} \cdot -1 \]

    if -5.00000000000023e-311 < t

    1. Initial program 39.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/39.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. Simplified39.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 t around inf 33.1%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{{t}^{2} \cdot \left(1 + x\right)}{x - 1}}}} \cdot t \]
    5. Step-by-step derivation
      1. +-commutative33.1%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t \]
      2. associate-*r/45.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \frac{x + 1}{x - 1}\right)}}} \cdot t \]
      3. sub-neg45.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{\color{blue}{x + \left(-1\right)}}\right)}} \cdot t \]
      4. metadata-eval45.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{x + \color{blue}{-1}}\right)}} \cdot t \]
      5. unpow245.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{x + 1}{x + -1}\right)}} \cdot t \]
      6. +-commutative45.8%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{\color{blue}{-1 + x}}\right)}} \cdot t \]
    6. Simplified45.8%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{-1 + x}\right)}}} \cdot t \]
    7. Taylor expanded in x around inf 84.0%

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification79.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-311}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 15: 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 35.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/35.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. Simplified35.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 t around inf 30.2%

    \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{{t}^{2} \cdot \left(1 + x\right)}{x - 1}}}} \cdot t \]
  5. Step-by-step derivation
    1. +-commutative30.2%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \color{blue}{\left(x + 1\right)}}{x - 1}}} \cdot t \]
    2. associate-*r/41.7%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} \cdot \frac{x + 1}{x - 1}\right)}}} \cdot t \]
    3. sub-neg41.7%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{\color{blue}{x + \left(-1\right)}}\right)}} \cdot t \]
    4. metadata-eval41.7%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left({t}^{2} \cdot \frac{x + 1}{x + \color{blue}{-1}}\right)}} \cdot t \]
    5. unpow241.7%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{x + 1}{x + -1}\right)}} \cdot t \]
    6. +-commutative41.7%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{\color{blue}{-1 + x}}\right)}} \cdot t \]
  6. Simplified41.7%

    \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \left(\left(t \cdot t\right) \cdot \frac{x + 1}{-1 + x}\right)}}} \cdot t \]
  7. Taylor expanded in x around inf 43.5%

    \[\leadsto \color{blue}{1} \]
  8. Final simplification43.5%

    \[\leadsto 1 \]

Reproduce

?
herbie shell --seed 2023271 
(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)))))