Toniolo and Linder, Equation (7)

Percentage Accurate: 34.3% → 85.3%
Time: 27.3s
Alternatives: 14
Speedup: 225.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 34.3% 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.3% accurate, 0.4× speedup?

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

\mathbf{elif}\;t \leq -5.8 \cdot 10^{-161}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\left(t_4 + t_5\right) + t_2}}\\

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

\mathbf{elif}\;t \leq 6000000:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\left(t_5 + \left(t_4 + \frac{t_1 + t_1}{x \cdot x}\right)\right) + t_2}}\\

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


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

    1. Initial program 35.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5e18 < t < -5.8e-161

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.8e-161 < t < 2.4000000000000001e-181

    1. Initial program 4.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/4.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4000000000000001e-181 < t < 6e6

    1. Initial program 35.1%

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

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

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

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

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

    if 6e6 < t

    1. Initial program 31.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/31.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{+18}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-161}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-181}:\\ \;\;\;\;\sqrt{2} \cdot \left(t \cdot \left(\sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}} \cdot \frac{1}{\ell}\right)\right)\\ \mathbf{elif}\;t \leq 6000000:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \left(\frac{\ell \cdot \ell}{x} + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) + \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x \cdot x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 2: 85.4% accurate, 0.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{\left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}}\\ t_2 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -9.6 \cdot 10^{+14}:\\ \;\;\;\;-t_2\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-161}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-181}:\\ \;\;\;\;\sqrt{2} \cdot \left(t \cdot \left(\sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}} \cdot \frac{1}{\ell}\right)\right)\\ \mathbf{elif}\;t \leq 5500000:\\ \;\;\;\;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)
           (sqrt
            (+
             (+ (/ (* l l) x) (* 2.0 (+ (* t t) (/ (* t t) x))))
             (/ (fma l l (* 2.0 (* t t))) x))))))
        (t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -9.6e+14)
     (- t_2)
     (if (<= t -4e-161)
       t_1
       (if (<= t 2.05e-181)
         (*
          (sqrt 2.0)
          (* t (* (sqrt (/ 1.0 (+ (/ 2.0 (* x x)) (/ 2.0 x)))) (/ 1.0 l))))
         (if (<= t 5500000.0) t_1 t_2))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = t * (sqrt(2.0) / sqrt(((((l * l) / x) + (2.0 * ((t * t) + ((t * t) / x)))) + (fma(l, l, (2.0 * (t * t))) / x))));
	double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -9.6e+14) {
		tmp = -t_2;
	} else if (t <= -4e-161) {
		tmp = t_1;
	} else if (t <= 2.05e-181) {
		tmp = sqrt(2.0) * (t * (sqrt((1.0 / ((2.0 / (x * x)) + (2.0 / x)))) * (1.0 / l)));
	} else if (t <= 5500000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(Float64(l * l) / x) + Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x)))) + Float64(fma(l, l, Float64(2.0 * Float64(t * t))) / x)))))
	t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -9.6e+14)
		tmp = Float64(-t_2);
	elseif (t <= -4e-161)
		tmp = t_1;
	elseif (t <= 2.05e-181)
		tmp = Float64(sqrt(2.0) * Float64(t * Float64(sqrt(Float64(1.0 / Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / x)))) * Float64(1.0 / l))));
	elseif (t <= 5500000.0)
		tmp = 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[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(l * l + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -9.6e+14], (-t$95$2), If[LessEqual[t, -4e-161], t$95$1, If[LessEqual[t, 2.05e-181], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * N[(N[Sqrt[N[(1.0 / N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5500000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{\left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -9.6 \cdot 10^{+14}:\\
\;\;\;\;-t_2\\

\mathbf{elif}\;t \leq -4 \cdot 10^{-161}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 5500000:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 35.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.6e14 < t < -4.00000000000000011e-161 or 2.0500000000000001e-181 < t < 5.5e6

    1. Initial program 45.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000011e-161 < t < 2.0500000000000001e-181

    1. Initial program 4.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/4.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.5e6 < t

    1. Initial program 31.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/31.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.6 \cdot 10^{+14}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-161}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}}\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-181}:\\ \;\;\;\;\sqrt{2} \cdot \left(t \cdot \left(\sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}} \cdot \frac{1}{\ell}\right)\right)\\ \mathbf{elif}\;t \leq 5500000:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 3: 77.9% accurate, 0.9× speedup?

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

\mathbf{elif}\;t \leq -1.8 \cdot 10^{-114}:\\
\;\;\;\;\sqrt{2} \cdot \left(t \cdot \frac{t_2}{\ell}\right)\\

\mathbf{elif}\;t \leq -1 \cdot 10^{-155}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\left(\ell \cdot \ell\right) \cdot t_3 + \left(\ell \cdot \ell + t_3 \cdot \left(t \cdot \left(t \cdot 2\right)\right)\right)}}\\

\mathbf{elif}\;t \leq 1.65 \cdot 10^{-56}:\\
\;\;\;\;\sqrt{2} \cdot \left(t \cdot \left(t_2 \cdot \frac{1}{\ell}\right)\right)\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.7999999999999995e-63 < t < -1.80000000000000009e-114

    1. Initial program 18.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.80000000000000009e-114 < t < -1.00000000000000001e-155

    1. Initial program 69.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/69.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000001e-155 < t < 1.64999999999999992e-56

    1. Initial program 10.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2} \cdot \left(t \cdot \sqrt{\frac{1}{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} - \frac{\left(-\color{blue}{\ell \cdot \ell}\right) - {\ell}^{2}}{{x}^{2}}\right)}}\right) \]
      12. distribute-rgt-neg-out50.5%

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

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

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

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

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

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

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

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

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

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

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

    if 1.64999999999999992e-56 < t

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{-63}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-114}:\\ \;\;\;\;\sqrt{2} \cdot \left(t \cdot \frac{\sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}}}{\ell}\right)\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-155}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\left(\ell \cdot \ell\right) \cdot \frac{x + 1}{x + -1} + \left(\ell \cdot \ell + \frac{x + 1}{x + -1} \cdot \left(t \cdot \left(t \cdot 2\right)\right)\right)}}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-56}:\\ \;\;\;\;\sqrt{2} \cdot \left(t \cdot \left(\sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}} \cdot \frac{1}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 4: 78.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq -3.3 \cdot 10^{-163}:\\
\;\;\;\;-1\\

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.7999999999999995e-63 < t < -2.7e-114

    1. Initial program 18.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7e-114 < t < -3.30000000000000001e-163

    1. Initial program 64.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/64.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.30000000000000001e-163 < t < 1.64999999999999992e-56

    1. Initial program 10.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/10.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.64999999999999992e-56 < t

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{-63}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-114}:\\ \;\;\;\;\sqrt{2} \cdot \left(t \cdot \frac{\sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}}}{\ell}\right)\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-163}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-56}:\\ \;\;\;\;\sqrt{2} \cdot \left(t \cdot \left(\sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}} \cdot \frac{1}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 5: 78.2% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{2} \cdot \left(t \cdot \frac{\sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}}}{\ell}\right)\\ t_2 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -3.9 \cdot 10^{-62}:\\ \;\;\;\;-t_2\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{-113}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-163}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-56}:\\ \;\;\;\;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
         (*
          (sqrt 2.0)
          (* t (/ (sqrt (/ 1.0 (+ (/ 2.0 (* x x)) (/ 2.0 x)))) l))))
        (t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -3.9e-62)
     (- t_2)
     (if (<= t -2.05e-113)
       t_1
       (if (<= t -4.6e-163) -1.0 (if (<= t 3.1e-56) t_1 t_2))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = sqrt(2.0) * (t * (sqrt((1.0 / ((2.0 / (x * x)) + (2.0 / x)))) / l));
	double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -3.9e-62) {
		tmp = -t_2;
	} else if (t <= -2.05e-113) {
		tmp = t_1;
	} else if (t <= -4.6e-163) {
		tmp = -1.0;
	} else if (t <= 3.1e-56) {
		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 = sqrt(2.0d0) * (t * (sqrt((1.0d0 / ((2.0d0 / (x * x)) + (2.0d0 / x)))) / l))
    t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    if (t <= (-3.9d-62)) then
        tmp = -t_2
    else if (t <= (-2.05d-113)) then
        tmp = t_1
    else if (t <= (-4.6d-163)) then
        tmp = -1.0d0
    else if (t <= 3.1d-56) 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 = Math.sqrt(2.0) * (t * (Math.sqrt((1.0 / ((2.0 / (x * x)) + (2.0 / x)))) / l));
	double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -3.9e-62) {
		tmp = -t_2;
	} else if (t <= -2.05e-113) {
		tmp = t_1;
	} else if (t <= -4.6e-163) {
		tmp = -1.0;
	} else if (t <= 3.1e-56) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = math.sqrt(2.0) * (t * (math.sqrt((1.0 / ((2.0 / (x * x)) + (2.0 / x)))) / l))
	t_2 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -3.9e-62:
		tmp = -t_2
	elif t <= -2.05e-113:
		tmp = t_1
	elif t <= -4.6e-163:
		tmp = -1.0
	elif t <= 3.1e-56:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = Float64(sqrt(2.0) * Float64(t * Float64(sqrt(Float64(1.0 / Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / x)))) / l)))
	t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -3.9e-62)
		tmp = Float64(-t_2);
	elseif (t <= -2.05e-113)
		tmp = t_1;
	elseif (t <= -4.6e-163)
		tmp = -1.0;
	elseif (t <= 3.1e-56)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = sqrt(2.0) * (t * (sqrt((1.0 / ((2.0 / (x * x)) + (2.0 / x)))) / l));
	t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -3.9e-62)
		tmp = -t_2;
	elseif (t <= -2.05e-113)
		tmp = t_1;
	elseif (t <= -4.6e-163)
		tmp = -1.0;
	elseif (t <= 3.1e-56)
		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[(N[Sqrt[2.0], $MachinePrecision] * N[(t * N[(N[Sqrt[N[(1.0 / N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / l), $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, -3.9e-62], (-t$95$2), If[LessEqual[t, -2.05e-113], t$95$1, If[LessEqual[t, -4.6e-163], -1.0, If[LessEqual[t, 3.1e-56], t$95$1, t$95$2]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot \left(t \cdot \frac{\sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}}}{\ell}\right)\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -3.9 \cdot 10^{-62}:\\
\;\;\;\;-t_2\\

\mathbf{elif}\;t \leq -2.05 \cdot 10^{-113}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -4.6 \cdot 10^{-163}:\\
\;\;\;\;-1\\

\mathbf{elif}\;t \leq 3.1 \cdot 10^{-56}:\\
\;\;\;\;t_1\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.9000000000000003e-62 < t < -2.05e-113 or -4.5999999999999999e-163 < t < 3.09999999999999987e-56

    1. Initial program 11.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/12.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2} \cdot \left(t \cdot \sqrt{\frac{1}{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} - \frac{\left(-\color{blue}{\ell \cdot \ell}\right) - {\ell}^{2}}{{x}^{2}}\right)}}\right) \]
      12. distribute-rgt-neg-out47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.05e-113 < t < -4.5999999999999999e-163

    1. Initial program 64.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/64.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.09999999999999987e-56 < t

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.9 \cdot 10^{-62}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{-113}:\\ \;\;\;\;\sqrt{2} \cdot \left(t \cdot \frac{\sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}}}{\ell}\right)\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-163}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-56}:\\ \;\;\;\;\sqrt{2} \cdot \left(t \cdot \frac{\sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}}}{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 6: 77.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 38.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/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} \]
      2. *-commutative38.5%

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

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

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

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

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

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

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

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

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

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

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

    if -4.49999999999999992e-207 < t < 5.39999999999999967e-87

    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.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2} \cdot \left(t \cdot \sqrt{\frac{1}{\frac{\left(1 + x\right) \cdot {\ell}^{2}}{x - 1} + \left(-1\right) \cdot \color{blue}{\left(\ell \cdot \ell\right)}}}\right) \]
      4. cancel-sign-sub-inv6.0%

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

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

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

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

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

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

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

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

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

    if 5.39999999999999967e-87 < t

    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} \]
      2. *-commutative35.5%

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

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

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

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

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

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

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

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

Alternative 7: 77.7% accurate, 2.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\ \;\;\;\;-t_1\\ \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 -1e-310) (- t_1) 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 <= -1e-310) {
		tmp = -t_1;
	} 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 <= (-1d-310)) then
        tmp = -t_1
    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 <= -1e-310) {
		tmp = -t_1;
	} 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 <= -1e-310:
		tmp = -t_1
	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 <= -1e-310)
		tmp = Float64(-t_1);
	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 <= -1e-310)
		tmp = -t_1;
	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, -1e-310], (-t$95$1), t$95$1]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;-t_1\\

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


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

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < t

    1. Initial program 28.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/28.4%

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

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

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

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

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

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

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

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

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

Alternative 8: 77.5% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\ \;\;\;\;-1 - \left(\frac{0.5}{x \cdot x} + \frac{-1}{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 -1e-310)
   (- -1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))
   (sqrt (/ (+ x -1.0) (+ x 1.0)))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-310) {
		tmp = -1.0 - ((0.5 / (x * x)) + (-1.0 / 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 <= (-1d-310)) then
        tmp = (-1.0d0) - ((0.5d0 / (x * x)) + ((-1.0d0) / 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 <= -1e-310) {
		tmp = -1.0 - ((0.5 / (x * x)) + (-1.0 / 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 <= -1e-310:
		tmp = -1.0 - ((0.5 / (x * x)) + (-1.0 / 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 <= -1e-310)
		tmp = Float64(-1.0 - Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / 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 <= -1e-310)
		tmp = -1.0 - ((0.5 / (x * x)) + (-1.0 / 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, -1e-310], N[(-1.0 - N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / 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 -1 \cdot 10^{-310}:\\
\;\;\;\;-1 - \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\

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


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

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < t

    1. Initial program 28.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/28.4%

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

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

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

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

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

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

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

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

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

Alternative 9: 77.2% accurate, 17.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1e-310) (+ -1.0 (/ 1.0 x)) (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-310) {
		tmp = -1.0 + (1.0 / x);
	} 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 <= (-1d-310)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else
        tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-310) {
		tmp = -1.0 + (1.0 / x);
	} 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 <= -1e-310:
		tmp = -1.0 + (1.0 / x)
	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 <= -1e-310)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	else
		tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1e-310)
		tmp = -1.0 + (1.0 / x);
	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, -1e-310], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;-1 + \frac{1}{x}\\

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


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

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < t

    1. Initial program 28.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/28.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 77.3% accurate, 17.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \frac{0.5}{x \cdot x} + \frac{-1}{x}\\ \mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\ \;\;\;\;-1 - t_1\\ \mathbf{else}:\\ \;\;\;\;1 + t_1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (+ (/ 0.5 (* x x)) (/ -1.0 x))))
   (if (<= t -1e-310) (- -1.0 t_1) (+ 1.0 t_1))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = (0.5 / (x * x)) + (-1.0 / x);
	double tmp;
	if (t <= -1e-310) {
		tmp = -1.0 - t_1;
	} else {
		tmp = 1.0 + 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 = (0.5d0 / (x * x)) + ((-1.0d0) / x)
    if (t <= (-1d-310)) then
        tmp = (-1.0d0) - t_1
    else
        tmp = 1.0d0 + 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 = (0.5 / (x * x)) + (-1.0 / x);
	double tmp;
	if (t <= -1e-310) {
		tmp = -1.0 - t_1;
	} else {
		tmp = 1.0 + t_1;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = (0.5 / (x * x)) + (-1.0 / x)
	tmp = 0
	if t <= -1e-310:
		tmp = -1.0 - t_1
	else:
		tmp = 1.0 + t_1
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x))
	tmp = 0.0
	if (t <= -1e-310)
		tmp = Float64(-1.0 - t_1);
	else
		tmp = Float64(1.0 + t_1);
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = (0.5 / (x * x)) + (-1.0 / x);
	tmp = 0.0;
	if (t <= -1e-310)
		tmp = -1.0 - t_1;
	else
		tmp = 1.0 + 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[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e-310], N[(-1.0 - t$95$1), $MachinePrecision], N[(1.0 + t$95$1), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{0.5}{x \cdot x} + \frac{-1}{x}\\
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;-1 - t_1\\

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


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

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < t

    1. Initial program 28.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/28.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 76.7% accurate, 31.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t) :precision binary64 (if (<= t -1e-310) (+ -1.0 (/ 1.0 x)) 1.0))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-310) {
		tmp = -1.0 + (1.0 / x);
	} 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 <= (-1d-310)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    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 <= -1e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1e-310:
		tmp = -1.0 + (1.0 / x)
	else:
		tmp = 1.0
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1e-310)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	else
		tmp = 1.0;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1e-310)
		tmp = -1.0 + (1.0 / x);
	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, -1e-310], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;-1 + \frac{1}{x}\\

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


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

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < t

    1. Initial program 28.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/28.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. Simplified28.4%

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

      \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{0.5}} \]
    5. Step-by-step derivation
      1. sqrt-unprod70.7%

        \[\leadsto \color{blue}{\sqrt{2 \cdot 0.5}} \]
      2. metadata-eval70.7%

        \[\leadsto \sqrt{\color{blue}{1}} \]
      3. metadata-eval70.7%

        \[\leadsto \color{blue}{1} \]
    6. Applied egg-rr70.7%

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

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

Alternative 12: 77.1% accurate, 31.9× speedup?

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

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


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

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < t

    1. Initial program 28.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/28.4%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 76.4% accurate, 73.5× speedup?

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

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


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

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < t

    1. Initial program 28.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/28.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. Simplified28.4%

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

      \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{0.5}} \]
    5. Step-by-step derivation
      1. sqrt-unprod70.7%

        \[\leadsto \color{blue}{\sqrt{2 \cdot 0.5}} \]
      2. metadata-eval70.7%

        \[\leadsto \sqrt{\color{blue}{1}} \]
      3. metadata-eval70.7%

        \[\leadsto \color{blue}{1} \]
    6. Applied egg-rr70.7%

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

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

Alternative 14: 38.9% 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 31.8%

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

    \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{0.5}} \]
  5. Step-by-step derivation
    1. sqrt-unprod35.2%

      \[\leadsto \color{blue}{\sqrt{2 \cdot 0.5}} \]
    2. metadata-eval35.2%

      \[\leadsto \sqrt{\color{blue}{1}} \]
    3. metadata-eval35.2%

      \[\leadsto \color{blue}{1} \]
  6. Applied egg-rr35.2%

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

    \[\leadsto 1 \]

Reproduce

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