Toniolo and Linder, Equation (7)

Percentage Accurate: 33.5% → 86.7%
Time: 31.3s
Alternatives: 20
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 20 alternatives:

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

Initial Program: 33.5% 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: 86.7% accurate, 0.4× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\ t_2 := t \cdot \sqrt{2}\\ \mathbf{if}\;t \leq -1.25 \cdot 10^{+24}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-183}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-224}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\left(\frac{2}{x} + \frac{2}{{x}^{3}}\right) + \frac{2}{x \cdot x}\right) + \frac{2}{{x}^{4}}}}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-161} \lor \neg \left(t \leq 2.6 \cdot 10^{+118}\right):\\ \;\;\;\;\frac{t_2}{\frac{\ell}{\frac{\sqrt{2}}{\frac{\ell}{t \cdot x}}} + \mathsf{fma}\left(2, \frac{t}{x \cdot \sqrt{2}}, t_2\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (* t (/ (sqrt 2.0) (sqrt (* 2.0 (fma t t (* l (/ l x))))))))
        (t_2 (* t (sqrt 2.0))))
   (if (<= t -1.25e+24)
     (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
     (if (<= t -1.75e-131)
       t_1
       (if (<= t -3e-183)
         -1.0
         (if (<= t 1.8e-224)
           (*
            t
            (/
             (sqrt 2.0)
             (*
              l
              (sqrt
               (+
                (+ (+ (/ 2.0 x) (/ 2.0 (pow x 3.0))) (/ 2.0 (* x x)))
                (/ 2.0 (pow x 4.0)))))))
           (if (or (<= t 1.65e-161) (not (<= t 2.6e+118)))
             (/
              t_2
              (+
               (/ l (/ (sqrt 2.0) (/ l (* t x))))
               (fma 2.0 (/ t (* x (sqrt 2.0))) t_2)))
             t_1)))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = t * (sqrt(2.0) / sqrt((2.0 * fma(t, t, (l * (l / x))))));
	double t_2 = t * sqrt(2.0);
	double tmp;
	if (t <= -1.25e+24) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= -1.75e-131) {
		tmp = t_1;
	} else if (t <= -3e-183) {
		tmp = -1.0;
	} else if (t <= 1.8e-224) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((((2.0 / x) + (2.0 / pow(x, 3.0))) + (2.0 / (x * x))) + (2.0 / pow(x, 4.0))))));
	} else if ((t <= 1.65e-161) || !(t <= 2.6e+118)) {
		tmp = t_2 / ((l / (sqrt(2.0) / (l / (t * x)))) + fma(2.0, (t / (x * sqrt(2.0))), t_2));
	} else {
		tmp = t_1;
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(2.0 * fma(t, t, Float64(l * Float64(l / x)))))))
	t_2 = Float64(t * sqrt(2.0))
	tmp = 0.0
	if (t <= -1.25e+24)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= -1.75e-131)
		tmp = t_1;
	elseif (t <= -3e-183)
		tmp = -1.0;
	elseif (t <= 1.8e-224)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(Float64(Float64(2.0 / x) + Float64(2.0 / (x ^ 3.0))) + Float64(2.0 / Float64(x * x))) + Float64(2.0 / (x ^ 4.0)))))));
	elseif ((t <= 1.65e-161) || !(t <= 2.6e+118))
		tmp = Float64(t_2 / Float64(Float64(l / Float64(sqrt(2.0) / Float64(l / Float64(t * x)))) + fma(2.0, Float64(t / Float64(x * sqrt(2.0))), t_2)));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 * N[(t * t + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.25e+24], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -1.75e-131], t$95$1, If[LessEqual[t, -3e-183], -1.0, If[LessEqual[t, 1.8e-224], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.65e-161], N[Not[LessEqual[t, 2.6e+118]], $MachinePrecision]], N[(t$95$2 / N[(N[(l / N[(N[Sqrt[2.0], $MachinePrecision] / N[(l / N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t / N[(x * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\
t_2 := t \cdot \sqrt{2}\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{+24}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -3 \cdot 10^{-183}:\\
\;\;\;\;-1\\

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

\mathbf{elif}\;t \leq 1.65 \cdot 10^{-161} \lor \neg \left(t \leq 2.6 \cdot 10^{+118}\right):\\
\;\;\;\;\frac{t_2}{\frac{\ell}{\frac{\sqrt{2}}{\frac{\ell}{t \cdot x}}} + \mathsf{fma}\left(2, \frac{t}{x \cdot \sqrt{2}}, t_2\right)}\\

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


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

    1. Initial program 33.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/33.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. Simplified33.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. Applied egg-rr84.2%

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

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

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

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

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

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

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

    if -1.25000000000000011e24 < t < -1.7500000000000001e-131 or 1.6499999999999999e-161 < t < 2.60000000000000016e118

    1. Initial program 60.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. fma-neg60.1%

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg60.1%

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\ell \cdot \ell}{x} + t \cdot t\right)}}\right)} - 1} \]
    11. Applied egg-rr69.6%

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

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

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

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

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

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

    if -1.7500000000000001e-131 < t < -2.9999999999999998e-183

    1. Initial program 31.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. fma-neg31.6%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out31.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9999999999999998e-183 < t < 1.8e-224

    1. Initial program 9.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/9.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8e-224 < t < 1.6499999999999999e-161 or 2.60000000000000016e118 < t

    1. Initial program 19.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. fma-neg19.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{+24}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-183}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-224}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\left(\frac{2}{x} + \frac{2}{{x}^{3}}\right) + \frac{2}{x \cdot x}\right) + \frac{2}{{x}^{4}}}}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-161} \lor \neg \left(t \leq 2.6 \cdot 10^{+118}\right):\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{\ell}{\frac{\sqrt{2}}{\frac{\ell}{t \cdot x}}} + \mathsf{fma}\left(2, \frac{t}{x \cdot \sqrt{2}}, t \cdot \sqrt{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\ \end{array} \]

Alternative 2: 86.4% accurate, 0.5× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\ t_2 := 1 + \frac{2}{x}\\ \mathbf{if}\;t \leq -1.7 \cdot 10^{+24}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-187}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-209}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\left(\frac{2}{x} + \frac{2}{{x}^{3}}\right) + \frac{2}{x \cdot x}\right) + \frac{2}{{x}^{4}}}}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-162}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+121}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \sqrt{\frac{1}{{t_2}^{3}}} \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{t \cdot x}\right), \sqrt{\frac{1}{t_2}}\right)\\ \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 (* 2.0 (fma t t (* l (/ l x))))))))
        (t_2 (+ 1.0 (/ 2.0 x))))
   (if (<= t -1.7e+24)
     (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
     (if (<= t -1.75e-131)
       t_1
       (if (<= t -4e-187)
         -1.0
         (if (<= t 2.6e-209)
           (*
            t
            (/
             (sqrt 2.0)
             (*
              l
              (sqrt
               (+
                (+ (+ (/ 2.0 x) (/ 2.0 (pow x 3.0))) (/ 2.0 (* x x)))
                (/ 2.0 (pow x 4.0)))))))
           (if (<= t 2.4e-162)
             1.0
             (if (<= t 3.1e+121)
               t_1
               (fma
                -0.5
                (* (sqrt (/ 1.0 (pow t_2 3.0))) (* (/ l t) (/ l (* t x))))
                (sqrt (/ 1.0 t_2)))))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = t * (sqrt(2.0) / sqrt((2.0 * fma(t, t, (l * (l / x))))));
	double t_2 = 1.0 + (2.0 / x);
	double tmp;
	if (t <= -1.7e+24) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= -1.75e-131) {
		tmp = t_1;
	} else if (t <= -4e-187) {
		tmp = -1.0;
	} else if (t <= 2.6e-209) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((((2.0 / x) + (2.0 / pow(x, 3.0))) + (2.0 / (x * x))) + (2.0 / pow(x, 4.0))))));
	} else if (t <= 2.4e-162) {
		tmp = 1.0;
	} else if (t <= 3.1e+121) {
		tmp = t_1;
	} else {
		tmp = fma(-0.5, (sqrt((1.0 / pow(t_2, 3.0))) * ((l / t) * (l / (t * x)))), sqrt((1.0 / t_2)));
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(2.0 * fma(t, t, Float64(l * Float64(l / x)))))))
	t_2 = Float64(1.0 + Float64(2.0 / x))
	tmp = 0.0
	if (t <= -1.7e+24)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= -1.75e-131)
		tmp = t_1;
	elseif (t <= -4e-187)
		tmp = -1.0;
	elseif (t <= 2.6e-209)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(Float64(Float64(2.0 / x) + Float64(2.0 / (x ^ 3.0))) + Float64(2.0 / Float64(x * x))) + Float64(2.0 / (x ^ 4.0)))))));
	elseif (t <= 2.4e-162)
		tmp = 1.0;
	elseif (t <= 3.1e+121)
		tmp = t_1;
	else
		tmp = fma(-0.5, Float64(sqrt(Float64(1.0 / (t_2 ^ 3.0))) * Float64(Float64(l / t) * Float64(l / Float64(t * x)))), sqrt(Float64(1.0 / 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[(2.0 * N[(t * t + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+24], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -1.75e-131], t$95$1, If[LessEqual[t, -4e-187], -1.0, If[LessEqual[t, 2.6e-209], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-162], 1.0, If[LessEqual[t, 3.1e+121], t$95$1, N[(-0.5 * N[(N[Sqrt[N[(1.0 / N[Power[t$95$2, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(l / N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[(1.0 / t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\
t_2 := 1 + \frac{2}{x}\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+24}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -4 \cdot 10^{-187}:\\
\;\;\;\;-1\\

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

\mathbf{elif}\;t \leq 2.4 \cdot 10^{-162}:\\
\;\;\;\;1\\

\mathbf{elif}\;t \leq 3.1 \cdot 10^{+121}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, \sqrt{\frac{1}{{t_2}^{3}}} \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{t \cdot x}\right), \sqrt{\frac{1}{t_2}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -1.7e24

    1. Initial program 33.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/33.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. Simplified33.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. Applied egg-rr84.2%

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

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

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

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

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

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

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

    if -1.7e24 < t < -1.7500000000000001e-131 or 2.4000000000000002e-162 < t < 3.10000000000000008e121

    1. Initial program 60.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. fma-neg60.1%

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg60.1%

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\ell \cdot \ell}{x} + t \cdot t\right)}}\right)} - 1} \]
    11. Applied egg-rr69.6%

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

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

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

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

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

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

    if -1.7500000000000001e-131 < t < -4.0000000000000001e-187

    1. Initial program 31.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. fma-neg31.6%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out31.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000001e-187 < t < 2.59999999999999984e-209

    1. Initial program 9.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/9.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.59999999999999984e-209 < t < 2.4000000000000002e-162

    1. Initial program 3.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. fma-neg3.0%

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg3.0%

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out13.9%

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

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

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

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

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

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

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

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

    if 3.10000000000000008e121 < t

    1. Initial program 23.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. fma-neg23.5%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out22.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+24}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-187}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-209}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\left(\frac{2}{x} + \frac{2}{{x}^{3}}\right) + \frac{2}{x \cdot x}\right) + \frac{2}{{x}^{4}}}}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-162}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+121}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \sqrt{\frac{1}{{\left(1 + \frac{2}{x}\right)}^{3}}} \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{t \cdot x}\right), \sqrt{\frac{1}{1 + \frac{2}{x}}}\right)\\ \end{array} \]

Alternative 3: 86.1% accurate, 0.5× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{if}\;t \leq -1.25 \cdot 10^{+24}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-176}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-208}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\left(\frac{2}{x} + \frac{2}{{x}^{3}}\right) + \frac{2}{x \cdot x}\right) + \frac{2}{{x}^{4}}}}\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-175}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+117}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1\\ \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 (* 2.0 (fma t t (* l (/ l x)))))))))
   (if (<= t -1.25e+24)
     (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
     (if (<= t -1.75e-131)
       t_1
       (if (<= t -3.1e-176)
         -1.0
         (if (<= t 1.7e-208)
           (*
            t
            (/
             (sqrt 2.0)
             (*
              l
              (sqrt
               (+
                (+ (+ (/ 2.0 x) (/ 2.0 (pow x 3.0))) (/ 2.0 (* x x)))
                (/ 2.0 (pow x 4.0)))))))
           (if (<= t 5.4e-175) 1.0 (if (<= t 2.2e+117) t_1 1.0))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = t * (sqrt(2.0) / sqrt((2.0 * fma(t, t, (l * (l / x))))));
	double tmp;
	if (t <= -1.25e+24) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= -1.75e-131) {
		tmp = t_1;
	} else if (t <= -3.1e-176) {
		tmp = -1.0;
	} else if (t <= 1.7e-208) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((((2.0 / x) + (2.0 / pow(x, 3.0))) + (2.0 / (x * x))) + (2.0 / pow(x, 4.0))))));
	} else if (t <= 5.4e-175) {
		tmp = 1.0;
	} else if (t <= 2.2e+117) {
		tmp = t_1;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(2.0 * fma(t, t, Float64(l * Float64(l / x)))))))
	tmp = 0.0
	if (t <= -1.25e+24)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= -1.75e-131)
		tmp = t_1;
	elseif (t <= -3.1e-176)
		tmp = -1.0;
	elseif (t <= 1.7e-208)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(Float64(Float64(2.0 / x) + Float64(2.0 / (x ^ 3.0))) + Float64(2.0 / Float64(x * x))) + Float64(2.0 / (x ^ 4.0)))))));
	elseif (t <= 5.4e-175)
		tmp = 1.0;
	elseif (t <= 2.2e+117)
		tmp = t_1;
	else
		tmp = 1.0;
	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[(2.0 * N[(t * t + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.25e+24], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -1.75e-131], t$95$1, If[LessEqual[t, -3.1e-176], -1.0, If[LessEqual[t, 1.7e-208], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e-175], 1.0, If[LessEqual[t, 2.2e+117], t$95$1, 1.0]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{+24}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -3.1 \cdot 10^{-176}:\\
\;\;\;\;-1\\

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

\mathbf{elif}\;t \leq 5.4 \cdot 10^{-175}:\\
\;\;\;\;1\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{+117}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 33.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/33.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. Simplified33.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. Applied egg-rr84.2%

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

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

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

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

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

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

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

    if -1.25000000000000011e24 < t < -1.7500000000000001e-131 or 5.39999999999999998e-175 < t < 2.20000000000000014e117

    1. Initial program 60.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. fma-neg60.1%

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg60.1%

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\ell \cdot \ell}{x} + t \cdot t\right)}}\right)} - 1} \]
    11. Applied egg-rr69.6%

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

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

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

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

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

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

    if -1.7500000000000001e-131 < t < -3.09999999999999992e-176

    1. Initial program 31.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. fma-neg31.6%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out31.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.09999999999999992e-176 < t < 1.7e-208

    1. Initial program 9.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/9.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7e-208 < t < 5.39999999999999998e-175 or 2.20000000000000014e117 < t

    1. Initial program 20.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. fma-neg20.6%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out21.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{+24}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-176}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-208}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\left(\frac{2}{x} + \frac{2}{{x}^{3}}\right) + \frac{2}{x \cdot x}\right) + \frac{2}{{x}^{4}}}}\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-175}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+117}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 4: 86.2% accurate, 0.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{if}\;t \leq -6 \cdot 10^{+23}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{-185}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-208}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 7.3 \cdot 10^{-165}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+116}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1\\ \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 (* 2.0 (fma t t (* l (/ l x)))))))))
   (if (<= t -6e+23)
     (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
     (if (<= t -1.75e-131)
       t_1
       (if (<= t -6.6e-185)
         -1.0
         (if (<= t 1.65e-208)
           (/ (* t (sqrt 2.0)) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x))))))
           (if (<= t 7.3e-165) 1.0 (if (<= t 2e+116) t_1 1.0))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = t * (sqrt(2.0) / sqrt((2.0 * fma(t, t, (l * (l / x))))));
	double tmp;
	if (t <= -6e+23) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= -1.75e-131) {
		tmp = t_1;
	} else if (t <= -6.6e-185) {
		tmp = -1.0;
	} else if (t <= 1.65e-208) {
		tmp = (t * sqrt(2.0)) / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))));
	} else if (t <= 7.3e-165) {
		tmp = 1.0;
	} else if (t <= 2e+116) {
		tmp = t_1;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(2.0 * fma(t, t, Float64(l * Float64(l / x)))))))
	tmp = 0.0
	if (t <= -6e+23)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= -1.75e-131)
		tmp = t_1;
	elseif (t <= -6.6e-185)
		tmp = -1.0;
	elseif (t <= 1.65e-208)
		tmp = Float64(Float64(t * sqrt(2.0)) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))));
	elseif (t <= 7.3e-165)
		tmp = 1.0;
	elseif (t <= 2e+116)
		tmp = t_1;
	else
		tmp = 1.0;
	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[(2.0 * N[(t * t + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+23], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -1.75e-131], t$95$1, If[LessEqual[t, -6.6e-185], -1.0, If[LessEqual[t, 1.65e-208], N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.3e-165], 1.0, If[LessEqual[t, 2e+116], t$95$1, 1.0]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{if}\;t \leq -6 \cdot 10^{+23}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -6.6 \cdot 10^{-185}:\\
\;\;\;\;-1\\

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

\mathbf{elif}\;t \leq 7.3 \cdot 10^{-165}:\\
\;\;\;\;1\\

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

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


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

    1. Initial program 33.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/33.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. Simplified33.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. Applied egg-rr84.2%

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

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

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

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

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

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

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

    if -6.0000000000000002e23 < t < -1.7500000000000001e-131 or 7.2999999999999999e-165 < t < 2.00000000000000003e116

    1. Initial program 60.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. fma-neg60.1%

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg60.1%

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\ell \cdot \ell}{x} + t \cdot t\right)}}\right)} - 1} \]
    11. Applied egg-rr69.6%

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

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

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

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

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

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

    if -1.7500000000000001e-131 < t < -6.5999999999999995e-185

    1. Initial program 31.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. fma-neg31.6%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out31.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.5999999999999995e-185 < t < 1.65000000000000003e-208

    1. Initial program 9.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/9.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.65000000000000003e-208 < t < 7.2999999999999999e-165 or 2.00000000000000003e116 < t

    1. Initial program 20.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. fma-neg20.6%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out21.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{+23}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{-185}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-208}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 7.3 \cdot 10^{-165}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+116}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 5: 86.2% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := t \cdot \sqrt{2}\\ t_2 := \frac{t_1}{\sqrt{2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{if}\;t \leq -1 \cdot 10^{+24}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-187}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-210}:\\ \;\;\;\;\frac{t_1}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{-161}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+120}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;1\\ \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)))
        (t_2 (/ t_1 (sqrt (* 2.0 (+ (/ l (/ x l)) (* t t)))))))
   (if (<= t -1e+24)
     (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
     (if (<= t -1.75e-131)
       t_2
       (if (<= t -1.9e-187)
         -1.0
         (if (<= t 3.2e-210)
           (/ t_1 (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x))))))
           (if (<= t 8.2e-161) 1.0 (if (<= t 1.8e+120) t_2 1.0))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = t * sqrt(2.0);
	double t_2 = t_1 / sqrt((2.0 * ((l / (x / l)) + (t * t))));
	double tmp;
	if (t <= -1e+24) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= -1.75e-131) {
		tmp = t_2;
	} else if (t <= -1.9e-187) {
		tmp = -1.0;
	} else if (t <= 3.2e-210) {
		tmp = t_1 / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))));
	} else if (t <= 8.2e-161) {
		tmp = 1.0;
	} else if (t <= 1.8e+120) {
		tmp = t_2;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * sqrt(2.0d0)
    t_2 = t_1 / sqrt((2.0d0 * ((l / (x / l)) + (t * t))))
    if (t <= (-1d+24)) then
        tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if (t <= (-1.75d-131)) then
        tmp = t_2
    else if (t <= (-1.9d-187)) then
        tmp = -1.0d0
    else if (t <= 3.2d-210) then
        tmp = t_1 / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x)))))
    else if (t <= 8.2d-161) then
        tmp = 1.0d0
    else if (t <= 1.8d+120) then
        tmp = t_2
    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 t_1 = t * Math.sqrt(2.0);
	double t_2 = t_1 / Math.sqrt((2.0 * ((l / (x / l)) + (t * t))));
	double tmp;
	if (t <= -1e+24) {
		tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= -1.75e-131) {
		tmp = t_2;
	} else if (t <= -1.9e-187) {
		tmp = -1.0;
	} else if (t <= 3.2e-210) {
		tmp = t_1 / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x)))));
	} else if (t <= 8.2e-161) {
		tmp = 1.0;
	} else if (t <= 1.8e+120) {
		tmp = t_2;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = t * math.sqrt(2.0)
	t_2 = t_1 / math.sqrt((2.0 * ((l / (x / l)) + (t * t))))
	tmp = 0
	if t <= -1e+24:
		tmp = -math.sqrt(((x + -1.0) / (x + 1.0)))
	elif t <= -1.75e-131:
		tmp = t_2
	elif t <= -1.9e-187:
		tmp = -1.0
	elif t <= 3.2e-210:
		tmp = t_1 / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x)))))
	elif t <= 8.2e-161:
		tmp = 1.0
	elif t <= 1.8e+120:
		tmp = t_2
	else:
		tmp = 1.0
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = Float64(t * sqrt(2.0))
	t_2 = Float64(t_1 / sqrt(Float64(2.0 * Float64(Float64(l / Float64(x / l)) + Float64(t * t)))))
	tmp = 0.0
	if (t <= -1e+24)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= -1.75e-131)
		tmp = t_2;
	elseif (t <= -1.9e-187)
		tmp = -1.0;
	elseif (t <= 3.2e-210)
		tmp = Float64(t_1 / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))));
	elseif (t <= 8.2e-161)
		tmp = 1.0;
	elseif (t <= 1.8e+120)
		tmp = t_2;
	else
		tmp = 1.0;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = t * sqrt(2.0);
	t_2 = t_1 / sqrt((2.0 * ((l / (x / l)) + (t * t))));
	tmp = 0.0;
	if (t <= -1e+24)
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	elseif (t <= -1.75e-131)
		tmp = t_2;
	elseif (t <= -1.9e-187)
		tmp = -1.0;
	elseif (t <= 3.2e-210)
		tmp = t_1 / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))));
	elseif (t <= 8.2e-161)
		tmp = 1.0;
	elseif (t <= 1.8e+120)
		tmp = t_2;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[Sqrt[N[(2.0 * N[(N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision] + N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+24], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -1.75e-131], t$95$2, If[LessEqual[t, -1.9e-187], -1.0, If[LessEqual[t, 3.2e-210], N[(t$95$1 / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e-161], 1.0, If[LessEqual[t, 1.8e+120], t$95$2, 1.0]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \sqrt{2}\\
t_2 := \frac{t_1}{\sqrt{2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\
\mathbf{if}\;t \leq -1 \cdot 10^{+24}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1.9 \cdot 10^{-187}:\\
\;\;\;\;-1\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{-210}:\\
\;\;\;\;\frac{t_1}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\

\mathbf{elif}\;t \leq 8.2 \cdot 10^{-161}:\\
\;\;\;\;1\\

\mathbf{elif}\;t \leq 1.8 \cdot 10^{+120}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 33.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/33.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. Simplified33.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. Applied egg-rr84.2%

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

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

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

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

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

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

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

    if -9.9999999999999998e23 < t < -1.7500000000000001e-131 or 8.1999999999999994e-161 < t < 1.80000000000000008e120

    1. Initial program 60.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. fma-neg60.1%

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg60.1%

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out84.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1.7500000000000001e-131 < t < -1.90000000000000013e-187

    1. Initial program 31.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. fma-neg31.6%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out31.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.90000000000000013e-187 < t < 3.20000000000000028e-210

    1. Initial program 9.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/9.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.20000000000000028e-210 < t < 8.1999999999999994e-161 or 1.80000000000000008e120 < t

    1. Initial program 20.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. fma-neg20.6%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out21.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+24}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-187}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-210}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{-161}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+120}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 6: 80.7% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{-174}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-209}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.85e-174)
   (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t 6.8e-209)
     (* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x 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 <= -1.85e-174) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 6.8e-209) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * 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 <= (-1.85d-174)) then
        tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if (t <= 6.8d-209) then
        tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * 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 <= -1.85e-174) {
		tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 6.8e-209) {
		tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * 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 <= -1.85e-174:
		tmp = -math.sqrt(((x + -1.0) / (x + 1.0)))
	elif t <= 6.8e-209:
		tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / x) + (2.0 / (x * 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 <= -1.85e-174)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 6.8e-209)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x)))))));
	else
		tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) / x) + Float64(-1.0 / x)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1.85e-174)
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	elseif (t <= 6.8e-209)
		tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * 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, -1.85e-174], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 6.8e-209], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{-174}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

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

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


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

    1. Initial program 38.4%

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

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

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

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

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

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

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

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

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

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

    if -1.85000000000000005e-174 < t < 6.79999999999999976e-209

    1. Initial program 9.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/9.0%

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

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

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

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

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

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

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

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

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

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

    if 6.79999999999999976e-209 < t

    1. Initial program 39.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/39.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 80.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 38.4%

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

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

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

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

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

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

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

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

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

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

    if -2.1999999999999999e-176 < t < 6.50000000000000042e-209

    1. Initial program 9.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/9.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.50000000000000042e-209 < t

    1. Initial program 39.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/39.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 80.6% accurate, 1.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-186}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-209}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.45e-186)
   (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t 2.5e-209)
     (* t (/ (sqrt 2.0) (* l (sqrt (/ 2.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 <= -1.45e-186) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 2.5e-209) {
		tmp = t * (sqrt(2.0) / (l * sqrt((2.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 <= (-1.45d-186)) then
        tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if (t <= 2.5d-209) then
        tmp = t * (sqrt(2.0d0) / (l * sqrt((2.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 <= -1.45e-186) {
		tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 2.5e-209) {
		tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt((2.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 <= -1.45e-186:
		tmp = -math.sqrt(((x + -1.0) / (x + 1.0)))
	elif t <= 2.5e-209:
		tmp = t * (math.sqrt(2.0) / (l * math.sqrt((2.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 <= -1.45e-186)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 2.5e-209)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(2.0 / x)))));
	else
		tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) / x) + Float64(-1.0 / x)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1.45e-186)
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	elseif (t <= 2.5e-209)
		tmp = t * (sqrt(2.0) / (l * sqrt((2.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, -1.45e-186], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 2.5e-209], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{-186}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

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

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


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

    1. Initial program 38.4%

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

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

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

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

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

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

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

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

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

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

    if -1.4500000000000001e-186 < t < 2.5000000000000002e-209

    1. Initial program 9.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/9.0%

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

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

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

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

    if 2.5000000000000002e-209 < t

    1. Initial program 39.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/39.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 80.7% accurate, 1.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -7.8 \cdot 10^{-177}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-210}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -7.8e-177)
   (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t 1.65e-210)
     (/ (* t (sqrt 2.0)) (* l (sqrt (/ 2.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 <= -7.8e-177) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1.65e-210) {
		tmp = (t * sqrt(2.0)) / (l * sqrt((2.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 <= (-7.8d-177)) then
        tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if (t <= 1.65d-210) then
        tmp = (t * sqrt(2.0d0)) / (l * sqrt((2.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 <= -7.8e-177) {
		tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1.65e-210) {
		tmp = (t * Math.sqrt(2.0)) / (l * Math.sqrt((2.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 <= -7.8e-177:
		tmp = -math.sqrt(((x + -1.0) / (x + 1.0)))
	elif t <= 1.65e-210:
		tmp = (t * math.sqrt(2.0)) / (l * math.sqrt((2.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 <= -7.8e-177)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 1.65e-210)
		tmp = Float64(Float64(t * sqrt(2.0)) / Float64(l * sqrt(Float64(2.0 / x))));
	else
		tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) / x) + Float64(-1.0 / x)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -7.8e-177)
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	elseif (t <= 1.65e-210)
		tmp = (t * sqrt(2.0)) / (l * sqrt((2.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, -7.8e-177], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.65e-210], N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.8 \cdot 10^{-177}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

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

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


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

    1. Initial program 38.4%

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

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

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

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

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

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

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

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

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

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

    if -7.80000000000000028e-177 < t < 1.65e-210

    1. Initial program 9.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/9.0%

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

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

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

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

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

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

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

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

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

    if 1.65e-210 < t

    1. Initial program 39.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/39.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 80.7% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 38.4%

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

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

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

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

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

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

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

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

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

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

    if -7.9999999999999999e-185 < t < 1.54999999999999993e-210

    1. Initial program 9.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. fma-neg8.8%

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg9.0%

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out65.2%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\ell} \cdot \sqrt{x}} \]
    11. Step-by-step derivation
      1. associate-*l/55.7%

        \[\leadsto \color{blue}{\frac{t \cdot \sqrt{x}}{\ell}} \]
      2. associate-/l*55.7%

        \[\leadsto \color{blue}{\frac{t}{\frac{\ell}{\sqrt{x}}}} \]
    12. Simplified55.7%

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

    if 1.54999999999999993e-210 < t

    1. Initial program 39.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/39.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 79.0% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 38.4%

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

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

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

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

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

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

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

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

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

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

    if -3.00000000000000006e-179 < t < 1.40000000000000001e-208

    1. Initial program 9.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. fma-neg8.8%

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg9.0%

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out65.2%

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

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

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

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

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

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

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

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

    if 1.40000000000000001e-208 < t

    1. Initial program 39.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/39.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 80.4% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{-186}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-210}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.3e-186)
   (+ -1.0 (/ 1.0 x))
   (if (<= t 6e-210)
     (/ t (/ l (sqrt 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 <= -1.3e-186) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 6e-210) {
		tmp = t / (l / sqrt(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 <= (-1.3d-186)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else if (t <= 6d-210) then
        tmp = t / (l / sqrt(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 <= -1.3e-186) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 6e-210) {
		tmp = t / (l / Math.sqrt(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 <= -1.3e-186:
		tmp = -1.0 + (1.0 / x)
	elif t <= 6e-210:
		tmp = t / (l / math.sqrt(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 <= -1.3e-186)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	elseif (t <= 6e-210)
		tmp = Float64(t / Float64(l / sqrt(x)));
	else
		tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) / x) + Float64(-1.0 / x)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1.3e-186)
		tmp = -1.0 + (1.0 / x);
	elseif (t <= 6e-210)
		tmp = t / (l / sqrt(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, -1.3e-186], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-210], N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{-186}:\\
\;\;\;\;-1 + \frac{1}{x}\\

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

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


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

    1. Initial program 38.4%

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

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

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

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

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

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

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

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

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

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

    if -1.29999999999999997e-186 < t < 6.0000000000000003e-210

    1. Initial program 9.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. fma-neg8.8%

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg9.0%

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out65.2%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\ell} \cdot \sqrt{x}} \]
    11. Step-by-step derivation
      1. associate-*l/55.7%

        \[\leadsto \color{blue}{\frac{t \cdot \sqrt{x}}{\ell}} \]
      2. associate-/l*55.7%

        \[\leadsto \color{blue}{\frac{t}{\frac{\ell}{\sqrt{x}}}} \]
    12. Simplified55.7%

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

    if 6.0000000000000003e-210 < t

    1. Initial program 39.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/39.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 75.7% accurate, 14.9× speedup?

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

\mathbf{elif}\;t \leq 8.2 \cdot 10^{-222}:\\
\;\;\;\;2 \cdot \left(\frac{t}{\ell} \cdot \left(t \cdot \frac{x}{\ell}\right)\right)\\

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


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

    1. Initial program 35.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/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} \]
    3. Simplified35.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. Applied egg-rr71.6%

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

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

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

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

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

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

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

    if -4.4999999999999996e-248 < t < 8.2000000000000006e-222

    1. Initial program 8.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. fma-neg8.5%

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg8.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)} \cdot \left({t}^{2} \cdot x\right)}{{\ell}^{2}} \]
      2. rem-square-sqrt38.4%

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

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

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

        \[\leadsto \frac{2 \cdot \left(x \cdot \left(t \cdot t\right)\right)}{\color{blue}{\ell \cdot \ell}} \]
    9. Simplified38.4%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(x \cdot \left(t \cdot t\right)\right)}{\ell \cdot \ell}} \]
    10. Taylor expanded in x around 0 38.4%

      \[\leadsto \color{blue}{2 \cdot \frac{{t}^{2} \cdot x}{{\ell}^{2}}} \]
    11. Step-by-step derivation
      1. unpow238.4%

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

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

        \[\leadsto 2 \cdot \frac{t \cdot \left(t \cdot x\right)}{\color{blue}{\ell \cdot \ell}} \]
      4. times-frac39.1%

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\frac{t}{\ell} \cdot \frac{x \cdot t}{\ell}\right)} \]
    13. Taylor expanded in x around 0 39.1%

      \[\leadsto 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{t \cdot x}{\ell}}\right) \]
    14. Step-by-step derivation
      1. *-commutative39.1%

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

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

        \[\leadsto 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\left(t \cdot \frac{x}{\ell}\right)}\right) \]
    15. Simplified38.8%

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

    if 8.2000000000000006e-222 < t

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

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

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

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

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

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

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

Alternative 14: 75.7% accurate, 14.9× speedup?

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

\mathbf{elif}\;t \leq 4.1 \cdot 10^{-224}:\\
\;\;\;\;2 \cdot \left(\frac{t}{\ell} \cdot \frac{t \cdot x}{\ell}\right)\\

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


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

    1. Initial program 35.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/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} \]
    3. Simplified35.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. Applied egg-rr71.6%

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

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

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

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

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

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

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

    if -1.4999999999999999e-247 < t < 4.09999999999999986e-224

    1. Initial program 8.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. fma-neg8.5%

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg8.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)} \cdot \left({t}^{2} \cdot x\right)}{{\ell}^{2}} \]
      2. rem-square-sqrt38.4%

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

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

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

        \[\leadsto \frac{2 \cdot \left(x \cdot \left(t \cdot t\right)\right)}{\color{blue}{\ell \cdot \ell}} \]
    9. Simplified38.4%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(x \cdot \left(t \cdot t\right)\right)}{\ell \cdot \ell}} \]
    10. Taylor expanded in x around 0 38.4%

      \[\leadsto \color{blue}{2 \cdot \frac{{t}^{2} \cdot x}{{\ell}^{2}}} \]
    11. Step-by-step derivation
      1. unpow238.4%

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

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

        \[\leadsto 2 \cdot \frac{t \cdot \left(t \cdot x\right)}{\color{blue}{\ell \cdot \ell}} \]
      4. times-frac39.1%

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

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

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

    if 4.09999999999999986e-224 < t

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

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

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

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

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

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

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

Alternative 15: 75.8% accurate, 14.9× speedup?

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

\mathbf{elif}\;t \leq 8.2 \cdot 10^{-222}:\\
\;\;\;\;2 \cdot \frac{t \cdot \frac{x}{\frac{\ell}{t}}}{\ell}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.80000000000000006e-248

    1. Initial program 35.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/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} \]
    3. Simplified35.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. Applied egg-rr71.6%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}{t \cdot \sqrt{2}}}} \]
    5. Taylor expanded in l around 0 1.7%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    6. Taylor expanded in x around -inf 0.0%

      \[\leadsto \color{blue}{{\left(\sqrt{-1}\right)}^{2} + \frac{1}{x}} \]
    7. Step-by-step derivation
      1. +-commutative0.0%

        \[\leadsto \color{blue}{\frac{1}{x} + {\left(\sqrt{-1}\right)}^{2}} \]
      2. unpow20.0%

        \[\leadsto \frac{1}{x} + \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      3. rem-square-sqrt81.3%

        \[\leadsto \frac{1}{x} + \color{blue}{-1} \]
    8. Simplified81.3%

      \[\leadsto \color{blue}{\frac{1}{x} + -1} \]

    if -4.80000000000000006e-248 < t < 8.2000000000000006e-222

    1. Initial program 8.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. fma-neg8.5%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      2. sqr-neg8.5%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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)}} \]
      3. fma-neg8.8%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg8.8%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\color{blue}{\left(-\ell\right) \cdot \left(-\ell\right)} + 2 \cdot \left(\left(-t\right) \cdot \left(-t\right)\right)\right) - \ell \cdot \ell}} \]
      5. sqr-neg8.8%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\left(-\ell\right) \cdot \left(-\ell\right) + 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) - \ell \cdot \ell}} \]
      6. sqr-neg8.8%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\left(-\ell\right) \cdot \left(-\ell\right) + 2 \cdot \left(t \cdot t\right)\right) - \color{blue}{\left(-\ell\right) \cdot \left(-\ell\right)}}} \]
    3. Simplified8.5%

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right), -\ell \cdot \ell\right)}}} \]
    4. Taylor expanded in x around inf 49.2%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\frac{{\ell}^{2}}{\sqrt{2} \cdot \left(t \cdot x\right)} + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \sqrt{2} \cdot t\right)}} \]
    5. Step-by-step derivation
      1. unpow249.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\frac{\color{blue}{\ell \cdot \ell}}{\sqrt{2} \cdot \left(t \cdot x\right)} + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \sqrt{2} \cdot t\right)} \]
      2. fma-def49.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\frac{\ell \cdot \ell}{\sqrt{2} \cdot \left(t \cdot x\right)} + \color{blue}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, \sqrt{2} \cdot t\right)}} \]
      3. *-commutative49.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\frac{\ell \cdot \ell}{\sqrt{2} \cdot \left(t \cdot x\right)} + \mathsf{fma}\left(2, \frac{t}{\color{blue}{x \cdot \sqrt{2}}}, \sqrt{2} \cdot t\right)} \]
      4. *-commutative49.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\frac{\ell \cdot \ell}{\sqrt{2} \cdot \left(t \cdot x\right)} + \mathsf{fma}\left(2, \frac{t}{x \cdot \sqrt{2}}, \color{blue}{t \cdot \sqrt{2}}\right)} \]
    6. Simplified49.2%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\frac{\ell \cdot \ell}{\sqrt{2} \cdot \left(t \cdot x\right)} + \mathsf{fma}\left(2, \frac{t}{x \cdot \sqrt{2}}, t \cdot \sqrt{2}\right)}} \]
    7. Taylor expanded in t around 0 38.4%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt{2}\right)}^{2} \cdot \left({t}^{2} \cdot x\right)}{{\ell}^{2}}} \]
    8. Step-by-step derivation
      1. unpow238.4%

        \[\leadsto \frac{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)} \cdot \left({t}^{2} \cdot x\right)}{{\ell}^{2}} \]
      2. rem-square-sqrt38.4%

        \[\leadsto \frac{\color{blue}{2} \cdot \left({t}^{2} \cdot x\right)}{{\ell}^{2}} \]
      3. *-commutative38.4%

        \[\leadsto \frac{2 \cdot \color{blue}{\left(x \cdot {t}^{2}\right)}}{{\ell}^{2}} \]
      4. unpow238.4%

        \[\leadsto \frac{2 \cdot \left(x \cdot \color{blue}{\left(t \cdot t\right)}\right)}{{\ell}^{2}} \]
      5. unpow238.4%

        \[\leadsto \frac{2 \cdot \left(x \cdot \left(t \cdot t\right)\right)}{\color{blue}{\ell \cdot \ell}} \]
    9. Simplified38.4%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(x \cdot \left(t \cdot t\right)\right)}{\ell \cdot \ell}} \]
    10. Taylor expanded in x around 0 38.4%

      \[\leadsto \color{blue}{2 \cdot \frac{{t}^{2} \cdot x}{{\ell}^{2}}} \]
    11. Step-by-step derivation
      1. unpow238.4%

        \[\leadsto 2 \cdot \frac{\color{blue}{\left(t \cdot t\right)} \cdot x}{{\ell}^{2}} \]
      2. associate-*l*38.9%

        \[\leadsto 2 \cdot \frac{\color{blue}{t \cdot \left(t \cdot x\right)}}{{\ell}^{2}} \]
      3. unpow238.9%

        \[\leadsto 2 \cdot \frac{t \cdot \left(t \cdot x\right)}{\color{blue}{\ell \cdot \ell}} \]
      4. times-frac39.1%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t \cdot x}{\ell}\right)} \]
      5. *-commutative39.1%

        \[\leadsto 2 \cdot \left(\frac{t}{\ell} \cdot \frac{\color{blue}{x \cdot t}}{\ell}\right) \]
    12. Simplified39.1%

      \[\leadsto \color{blue}{2 \cdot \left(\frac{t}{\ell} \cdot \frac{x \cdot t}{\ell}\right)} \]
    13. Step-by-step derivation
      1. associate-*l/39.1%

        \[\leadsto 2 \cdot \color{blue}{\frac{t \cdot \frac{x \cdot t}{\ell}}{\ell}} \]
      2. associate-/l*39.1%

        \[\leadsto 2 \cdot \frac{t \cdot \color{blue}{\frac{x}{\frac{\ell}{t}}}}{\ell} \]
    14. Applied egg-rr39.1%

      \[\leadsto 2 \cdot \color{blue}{\frac{t \cdot \frac{x}{\frac{\ell}{t}}}{\ell}} \]

    if 8.2000000000000006e-222 < t

    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.6%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified38.6%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Applied egg-rr74.5%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}{t \cdot \sqrt{2}}}} \]
    5. Taylor expanded in l around 0 87.2%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    6. Taylor expanded in x around inf 87.0%

      \[\leadsto \color{blue}{1 - \frac{1}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{-248}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{-222}:\\ \;\;\;\;2 \cdot \frac{t \cdot \frac{x}{\frac{\ell}{t}}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 16: 75.8% accurate, 14.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{-248}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-224}:\\ \;\;\;\;2 \cdot \frac{t \cdot \frac{x}{\frac{\ell}{t}}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -4.5e-248)
   (+ -1.0 (/ 1.0 x))
   (if (<= t 4.2e-224)
     (* 2.0 (/ (* t (/ x (/ l t))) l))
     (+ 1.0 (+ (/ (/ 0.5 x) x) (/ -1.0 x))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -4.5e-248) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 4.2e-224) {
		tmp = 2.0 * ((t * (x / (l / t))) / l);
	} else {
		tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-4.5d-248)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else if (t <= 4.2d-224) then
        tmp = 2.0d0 * ((t * (x / (l / t))) / l)
    else
        tmp = 1.0d0 + (((0.5d0 / x) / x) + ((-1.0d0) / x))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -4.5e-248) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 4.2e-224) {
		tmp = 2.0 * ((t * (x / (l / t))) / l);
	} else {
		tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -4.5e-248:
		tmp = -1.0 + (1.0 / x)
	elif t <= 4.2e-224:
		tmp = 2.0 * ((t * (x / (l / t))) / l)
	else:
		tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -4.5e-248)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	elseif (t <= 4.2e-224)
		tmp = Float64(2.0 * Float64(Float64(t * Float64(x / Float64(l / t))) / l));
	else
		tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) / x) + Float64(-1.0 / x)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -4.5e-248)
		tmp = -1.0 + (1.0 / x);
	elseif (t <= 4.2e-224)
		tmp = 2.0 * ((t * (x / (l / t))) / l);
	else
		tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -4.5e-248], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-224], N[(2.0 * N[(N[(t * N[(x / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-248}:\\
\;\;\;\;-1 + \frac{1}{x}\\

\mathbf{elif}\;t \leq 4.2 \cdot 10^{-224}:\\
\;\;\;\;2 \cdot \frac{t \cdot \frac{x}{\frac{\ell}{t}}}{\ell}\\

\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.4999999999999996e-248

    1. Initial program 35.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/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} \]
    3. Simplified35.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. Applied egg-rr71.6%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}{t \cdot \sqrt{2}}}} \]
    5. Taylor expanded in l around 0 1.7%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    6. Taylor expanded in x around -inf 0.0%

      \[\leadsto \color{blue}{{\left(\sqrt{-1}\right)}^{2} + \frac{1}{x}} \]
    7. Step-by-step derivation
      1. +-commutative0.0%

        \[\leadsto \color{blue}{\frac{1}{x} + {\left(\sqrt{-1}\right)}^{2}} \]
      2. unpow20.0%

        \[\leadsto \frac{1}{x} + \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      3. rem-square-sqrt81.3%

        \[\leadsto \frac{1}{x} + \color{blue}{-1} \]
    8. Simplified81.3%

      \[\leadsto \color{blue}{\frac{1}{x} + -1} \]

    if -4.4999999999999996e-248 < t < 4.20000000000000013e-224

    1. Initial program 8.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. fma-neg8.5%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      2. sqr-neg8.5%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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)}} \]
      3. fma-neg8.8%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg8.8%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\color{blue}{\left(-\ell\right) \cdot \left(-\ell\right)} + 2 \cdot \left(\left(-t\right) \cdot \left(-t\right)\right)\right) - \ell \cdot \ell}} \]
      5. sqr-neg8.8%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\left(-\ell\right) \cdot \left(-\ell\right) + 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) - \ell \cdot \ell}} \]
      6. sqr-neg8.8%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\left(-\ell\right) \cdot \left(-\ell\right) + 2 \cdot \left(t \cdot t\right)\right) - \color{blue}{\left(-\ell\right) \cdot \left(-\ell\right)}}} \]
    3. Simplified8.5%

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right), -\ell \cdot \ell\right)}}} \]
    4. Taylor expanded in x around inf 49.2%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\frac{{\ell}^{2}}{\sqrt{2} \cdot \left(t \cdot x\right)} + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \sqrt{2} \cdot t\right)}} \]
    5. Step-by-step derivation
      1. unpow249.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\frac{\color{blue}{\ell \cdot \ell}}{\sqrt{2} \cdot \left(t \cdot x\right)} + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \sqrt{2} \cdot t\right)} \]
      2. fma-def49.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\frac{\ell \cdot \ell}{\sqrt{2} \cdot \left(t \cdot x\right)} + \color{blue}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, \sqrt{2} \cdot t\right)}} \]
      3. *-commutative49.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\frac{\ell \cdot \ell}{\sqrt{2} \cdot \left(t \cdot x\right)} + \mathsf{fma}\left(2, \frac{t}{\color{blue}{x \cdot \sqrt{2}}}, \sqrt{2} \cdot t\right)} \]
      4. *-commutative49.2%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\frac{\ell \cdot \ell}{\sqrt{2} \cdot \left(t \cdot x\right)} + \mathsf{fma}\left(2, \frac{t}{x \cdot \sqrt{2}}, \color{blue}{t \cdot \sqrt{2}}\right)} \]
    6. Simplified49.2%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\frac{\ell \cdot \ell}{\sqrt{2} \cdot \left(t \cdot x\right)} + \mathsf{fma}\left(2, \frac{t}{x \cdot \sqrt{2}}, t \cdot \sqrt{2}\right)}} \]
    7. Taylor expanded in t around 0 38.4%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt{2}\right)}^{2} \cdot \left({t}^{2} \cdot x\right)}{{\ell}^{2}}} \]
    8. Step-by-step derivation
      1. unpow238.4%

        \[\leadsto \frac{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)} \cdot \left({t}^{2} \cdot x\right)}{{\ell}^{2}} \]
      2. rem-square-sqrt38.4%

        \[\leadsto \frac{\color{blue}{2} \cdot \left({t}^{2} \cdot x\right)}{{\ell}^{2}} \]
      3. *-commutative38.4%

        \[\leadsto \frac{2 \cdot \color{blue}{\left(x \cdot {t}^{2}\right)}}{{\ell}^{2}} \]
      4. unpow238.4%

        \[\leadsto \frac{2 \cdot \left(x \cdot \color{blue}{\left(t \cdot t\right)}\right)}{{\ell}^{2}} \]
      5. unpow238.4%

        \[\leadsto \frac{2 \cdot \left(x \cdot \left(t \cdot t\right)\right)}{\color{blue}{\ell \cdot \ell}} \]
    9. Simplified38.4%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(x \cdot \left(t \cdot t\right)\right)}{\ell \cdot \ell}} \]
    10. Taylor expanded in x around 0 38.4%

      \[\leadsto \color{blue}{2 \cdot \frac{{t}^{2} \cdot x}{{\ell}^{2}}} \]
    11. Step-by-step derivation
      1. unpow238.4%

        \[\leadsto 2 \cdot \frac{\color{blue}{\left(t \cdot t\right)} \cdot x}{{\ell}^{2}} \]
      2. associate-*l*38.9%

        \[\leadsto 2 \cdot \frac{\color{blue}{t \cdot \left(t \cdot x\right)}}{{\ell}^{2}} \]
      3. unpow238.9%

        \[\leadsto 2 \cdot \frac{t \cdot \left(t \cdot x\right)}{\color{blue}{\ell \cdot \ell}} \]
      4. times-frac39.1%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t \cdot x}{\ell}\right)} \]
      5. *-commutative39.1%

        \[\leadsto 2 \cdot \left(\frac{t}{\ell} \cdot \frac{\color{blue}{x \cdot t}}{\ell}\right) \]
    12. Simplified39.1%

      \[\leadsto \color{blue}{2 \cdot \left(\frac{t}{\ell} \cdot \frac{x \cdot t}{\ell}\right)} \]
    13. Step-by-step derivation
      1. associate-*l/39.1%

        \[\leadsto 2 \cdot \color{blue}{\frac{t \cdot \frac{x \cdot t}{\ell}}{\ell}} \]
      2. associate-/l*39.1%

        \[\leadsto 2 \cdot \frac{t \cdot \color{blue}{\frac{x}{\frac{\ell}{t}}}}{\ell} \]
    14. Applied egg-rr39.1%

      \[\leadsto 2 \cdot \color{blue}{\frac{t \cdot \frac{x}{\frac{\ell}{t}}}{\ell}} \]

    if 4.20000000000000013e-224 < t

    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.6%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \cdot t} \]
    3. Simplified38.6%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Applied egg-rr74.5%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}{t \cdot \sqrt{2}}}} \]
    5. Taylor expanded in l around 0 87.2%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    6. Taylor expanded in x around inf 87.2%

      \[\leadsto \color{blue}{\left(1 + 0.5 \cdot \frac{1}{{x}^{2}}\right) - \frac{1}{x}} \]
    7. Step-by-step derivation
      1. associate--l+87.2%

        \[\leadsto \color{blue}{1 + \left(0.5 \cdot \frac{1}{{x}^{2}} - \frac{1}{x}\right)} \]
      2. associate-*r/87.2%

        \[\leadsto 1 + \left(\color{blue}{\frac{0.5 \cdot 1}{{x}^{2}}} - \frac{1}{x}\right) \]
      3. metadata-eval87.2%

        \[\leadsto 1 + \left(\frac{\color{blue}{0.5}}{{x}^{2}} - \frac{1}{x}\right) \]
      4. unpow287.2%

        \[\leadsto 1 + \left(\frac{0.5}{\color{blue}{x \cdot x}} - \frac{1}{x}\right) \]
      5. associate-/r*87.2%

        \[\leadsto 1 + \left(\color{blue}{\frac{\frac{0.5}{x}}{x}} - \frac{1}{x}\right) \]
    8. Simplified87.2%

      \[\leadsto \color{blue}{1 + \left(\frac{\frac{0.5}{x}}{x} - \frac{1}{x}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{-248}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-224}:\\ \;\;\;\;2 \cdot \frac{t \cdot \frac{x}{\frac{\ell}{t}}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\ \end{array} \]

Alternative 17: 75.9% accurate, 31.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;-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 -5e-312) (+ -1.0 (/ 1.0 x)) 1.0))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-312) {
		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 <= (-5d-312)) 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 <= -5e-312) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -5e-312:
		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 <= -5e-312)
		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 <= -5e-312)
		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, -5e-312], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\
\;\;\;\;-1 + \frac{1}{x}\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.0000000000022e-312

    1. Initial program 32.7%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/32.8%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\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. Simplified32.8%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Applied egg-rr69.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}{t \cdot \sqrt{2}}}} \]
    5. Taylor expanded in l around 0 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. +-commutative0.0%

        \[\leadsto \color{blue}{\frac{1}{x} + {\left(\sqrt{-1}\right)}^{2}} \]
      2. unpow20.0%

        \[\leadsto \frac{1}{x} + \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      3. rem-square-sqrt77.0%

        \[\leadsto \frac{1}{x} + \color{blue}{-1} \]
    8. Simplified77.0%

      \[\leadsto \color{blue}{\frac{1}{x} + -1} \]

    if -5.0000000000022e-312 < t

    1. Initial program 35.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. fma-neg34.9%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      2. sqr-neg34.9%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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)}} \]
      3. fma-neg35.0%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg35.0%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\color{blue}{\left(-\ell\right) \cdot \left(-\ell\right)} + 2 \cdot \left(\left(-t\right) \cdot \left(-t\right)\right)\right) - \ell \cdot \ell}} \]
      5. sqr-neg35.0%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\left(-\ell\right) \cdot \left(-\ell\right) + 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) - \ell \cdot \ell}} \]
      6. sqr-neg35.0%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\left(-\ell\right) \cdot \left(-\ell\right) + 2 \cdot \left(t \cdot t\right)\right) - \color{blue}{\left(-\ell\right) \cdot \left(-\ell\right)}}} \]
    3. Simplified34.9%

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right), -\ell \cdot \ell\right)}}} \]
    4. Taylor expanded in x around inf 52.4%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out52.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left(\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + {t}^{2}\right)}}} \]
      2. unpow252.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}}{x} + {t}^{2}\right)}} \]
      3. +-commutative52.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\color{blue}{2 \cdot {t}^{2} + \ell \cdot \ell}}{x} + {t}^{2}\right)}} \]
      4. unpow252.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{2 \cdot \color{blue}{\left(t \cdot t\right)} + \ell \cdot \ell}{x} + {t}^{2}\right)}} \]
      5. fma-udef52.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}}{x} + {t}^{2}\right)}} \]
      6. unpow252.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x} + \color{blue}{t \cdot t}\right)}} \]
    6. Simplified52.4%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left(\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x} + t \cdot t\right)}}} \]
    7. Taylor expanded in x around inf 77.6%

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification77.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 18: 76.3% accurate, 31.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -5e-312) (+ -1.0 (/ 1.0 x)) (+ 1.0 (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-312) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-5d-312)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-312) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -5e-312:
		tmp = -1.0 + (1.0 / x)
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-312)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -5e-312)
		tmp = -1.0 + (1.0 / x);
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -5e-312], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\
\;\;\;\;-1 + \frac{1}{x}\\

\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.0000000000022e-312

    1. Initial program 32.7%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/32.8%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\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. Simplified32.8%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) - \ell \cdot \ell}} \cdot t} \]
    4. Applied egg-rr69.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}{t \cdot \sqrt{2}}}} \]
    5. Taylor expanded in l around 0 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. +-commutative0.0%

        \[\leadsto \color{blue}{\frac{1}{x} + {\left(\sqrt{-1}\right)}^{2}} \]
      2. unpow20.0%

        \[\leadsto \frac{1}{x} + \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      3. rem-square-sqrt77.0%

        \[\leadsto \frac{1}{x} + \color{blue}{-1} \]
    8. Simplified77.0%

      \[\leadsto \color{blue}{\frac{1}{x} + -1} \]

    if -5.0000000000022e-312 < t

    1. Initial program 35.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/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} \]
    3. Simplified35.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. Applied egg-rr71.3%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}{t \cdot \sqrt{2}}}} \]
    5. Taylor expanded in l around 0 78.1%

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
    6. Taylor expanded in x around inf 78.0%

      \[\leadsto \color{blue}{1 - \frac{1}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification77.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 19: 75.6% accurate, 73.5× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t) :precision binary64 (if (<= t -5e-312) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-312) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-5d-312)) then
        tmp = -1.0d0
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-312) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -5e-312:
		tmp = -1.0
	else:
		tmp = 1.0
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-312)
		tmp = -1.0;
	else
		tmp = 1.0;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -5e-312)
		tmp = -1.0;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -5e-312], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\
\;\;\;\;-1\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.0000000000022e-312

    1. Initial program 32.7%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. fma-neg32.7%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      2. sqr-neg32.7%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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)}} \]
      3. fma-neg32.7%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg32.7%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\color{blue}{\left(-\ell\right) \cdot \left(-\ell\right)} + 2 \cdot \left(\left(-t\right) \cdot \left(-t\right)\right)\right) - \ell \cdot \ell}} \]
      5. sqr-neg32.7%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\left(-\ell\right) \cdot \left(-\ell\right) + 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) - \ell \cdot \ell}} \]
      6. sqr-neg32.7%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\left(-\ell\right) \cdot \left(-\ell\right) + 2 \cdot \left(t \cdot t\right)\right) - \color{blue}{\left(-\ell\right) \cdot \left(-\ell\right)}}} \]
    3. Simplified32.7%

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right), -\ell \cdot \ell\right)}}} \]
    4. Taylor expanded in x around inf 50.6%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out50.6%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left(\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + {t}^{2}\right)}}} \]
      2. unpow250.6%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}}{x} + {t}^{2}\right)}} \]
      3. +-commutative50.6%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\color{blue}{2 \cdot {t}^{2} + \ell \cdot \ell}}{x} + {t}^{2}\right)}} \]
      4. unpow250.6%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{2 \cdot \color{blue}{\left(t \cdot t\right)} + \ell \cdot \ell}{x} + {t}^{2}\right)}} \]
      5. fma-udef50.6%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}}{x} + {t}^{2}\right)}} \]
      6. unpow250.6%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x} + \color{blue}{t \cdot t}\right)}} \]
    6. Simplified50.6%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left(\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x} + t \cdot t\right)}}} \]
    7. Taylor expanded in t around 0 51.0%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\color{blue}{\frac{{\ell}^{2}}{x}} + t \cdot t\right)}} \]
    8. Step-by-step derivation
      1. unpow251.0%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\color{blue}{\ell \cdot \ell}}{x} + t \cdot t\right)}} \]
      2. associate-/l*55.0%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\color{blue}{\frac{\ell}{\frac{x}{\ell}}} + t \cdot t\right)}} \]
    9. Simplified55.0%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\color{blue}{\frac{\ell}{\frac{x}{\ell}}} + t \cdot t\right)}} \]
    10. Taylor expanded in t around -inf 76.2%

      \[\leadsto \color{blue}{-1} \]

    if -5.0000000000022e-312 < t

    1. Initial program 35.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. fma-neg34.9%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
      2. sqr-neg34.9%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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)}} \]
      3. fma-neg35.0%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
      4. sqr-neg35.0%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\color{blue}{\left(-\ell\right) \cdot \left(-\ell\right)} + 2 \cdot \left(\left(-t\right) \cdot \left(-t\right)\right)\right) - \ell \cdot \ell}} \]
      5. sqr-neg35.0%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\left(-\ell\right) \cdot \left(-\ell\right) + 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) - \ell \cdot \ell}} \]
      6. sqr-neg35.0%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\left(-\ell\right) \cdot \left(-\ell\right) + 2 \cdot \left(t \cdot t\right)\right) - \color{blue}{\left(-\ell\right) \cdot \left(-\ell\right)}}} \]
    3. Simplified34.9%

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right), -\ell \cdot \ell\right)}}} \]
    4. Taylor expanded in x around inf 52.4%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    5. Step-by-step derivation
      1. distribute-lft-out52.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left(\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + {t}^{2}\right)}}} \]
      2. unpow252.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}}{x} + {t}^{2}\right)}} \]
      3. +-commutative52.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\color{blue}{2 \cdot {t}^{2} + \ell \cdot \ell}}{x} + {t}^{2}\right)}} \]
      4. unpow252.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{2 \cdot \color{blue}{\left(t \cdot t\right)} + \ell \cdot \ell}{x} + {t}^{2}\right)}} \]
      5. fma-udef52.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}}{x} + {t}^{2}\right)}} \]
      6. unpow252.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x} + \color{blue}{t \cdot t}\right)}} \]
    6. Simplified52.4%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left(\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x} + t \cdot t\right)}}} \]
    7. Taylor expanded in x around inf 77.6%

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 20: 39.0% 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 33.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. fma-neg33.9%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \ell \cdot \ell + 2 \cdot \left(t \cdot t\right), -\ell \cdot \ell\right)}}} \]
    2. sqr-neg33.9%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\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)}} \]
    3. fma-neg33.9%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\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}}} \]
    4. sqr-neg33.9%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\color{blue}{\left(-\ell\right) \cdot \left(-\ell\right)} + 2 \cdot \left(\left(-t\right) \cdot \left(-t\right)\right)\right) - \ell \cdot \ell}} \]
    5. sqr-neg33.9%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\left(-\ell\right) \cdot \left(-\ell\right) + 2 \cdot \color{blue}{\left(t \cdot t\right)}\right) - \ell \cdot \ell}} \]
    6. sqr-neg33.9%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\left(-\ell\right) \cdot \left(-\ell\right) + 2 \cdot \left(t \cdot t\right)\right) - \color{blue}{\left(-\ell\right) \cdot \left(-\ell\right)}}} \]
  3. Simplified33.9%

    \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right), -\ell \cdot \ell\right)}}} \]
  4. Taylor expanded in x around inf 51.6%

    \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
  5. Step-by-step derivation
    1. distribute-lft-out51.6%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left(\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + {t}^{2}\right)}}} \]
    2. unpow251.6%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\color{blue}{\ell \cdot \ell} + 2 \cdot {t}^{2}}{x} + {t}^{2}\right)}} \]
    3. +-commutative51.6%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\color{blue}{2 \cdot {t}^{2} + \ell \cdot \ell}}{x} + {t}^{2}\right)}} \]
    4. unpow251.6%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{2 \cdot \color{blue}{\left(t \cdot t\right)} + \ell \cdot \ell}{x} + {t}^{2}\right)}} \]
    5. fma-udef51.6%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}}{x} + {t}^{2}\right)}} \]
    6. unpow251.6%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x} + \color{blue}{t \cdot t}\right)}} \]
  6. Simplified51.6%

    \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left(\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x} + t \cdot t\right)}}} \]
  7. Taylor expanded in t around 0 51.7%

    \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\color{blue}{\frac{{\ell}^{2}}{x}} + t \cdot t\right)}} \]
  8. Step-by-step derivation
    1. unpow251.7%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\color{blue}{\ell \cdot \ell}}{x} + t \cdot t\right)}} \]
    2. associate-/l*56.6%

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\color{blue}{\frac{\ell}{\frac{x}{\ell}}} + t \cdot t\right)}} \]
  9. Simplified56.6%

    \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\color{blue}{\frac{\ell}{\frac{x}{\ell}}} + t \cdot t\right)}} \]
  10. Taylor expanded in t around -inf 36.7%

    \[\leadsto \color{blue}{-1} \]
  11. Final simplification36.7%

    \[\leadsto -1 \]

Reproduce

?
herbie shell --seed 2023274 
(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)))))