Toniolo and Linder, Equation (7)

Percentage Accurate: 32.7% → 90.9%
Time: 21.7s
Alternatives: 14
Speedup: 225.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 32.7% 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: 90.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \sqrt{2}\\ t_2 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -2.05 \cdot 10^{-18}:\\ \;\;\;\;-t_2\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-135}:\\ \;\;\;\;\frac{t_1}{\sqrt{2} \cdot \mathsf{hypot}\left(t, \sqrt{\frac{\ell}{\frac{x}{\ell}}}\right)}\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+83}:\\ \;\;\;\;\frac{t_1}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (* t (sqrt 2.0))) (t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -2.05e-18)
     (- t_2)
     (if (<= t 3e-135)
       (/ t_1 (* (sqrt 2.0) (hypot t (sqrt (/ l (/ x l))))))
       (if (<= t 3.1e+83)
         (/ t_1 (sqrt (* 2.0 (+ (* l (/ l x)) (* t t)))))
         t_2)))))
double code(double x, double l, double t) {
	double t_1 = t * sqrt(2.0);
	double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -2.05e-18) {
		tmp = -t_2;
	} else if (t <= 3e-135) {
		tmp = t_1 / (sqrt(2.0) * hypot(t, sqrt((l / (x / l)))));
	} else if (t <= 3.1e+83) {
		tmp = t_1 / sqrt((2.0 * ((l * (l / x)) + (t * t))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
public static double code(double x, double l, double t) {
	double t_1 = t * Math.sqrt(2.0);
	double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -2.05e-18) {
		tmp = -t_2;
	} else if (t <= 3e-135) {
		tmp = t_1 / (Math.sqrt(2.0) * Math.hypot(t, Math.sqrt((l / (x / l)))));
	} else if (t <= 3.1e+83) {
		tmp = t_1 / Math.sqrt((2.0 * ((l * (l / x)) + (t * t))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = t * math.sqrt(2.0)
	t_2 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -2.05e-18:
		tmp = -t_2
	elif t <= 3e-135:
		tmp = t_1 / (math.sqrt(2.0) * math.hypot(t, math.sqrt((l / (x / l)))))
	elif t <= 3.1e+83:
		tmp = t_1 / math.sqrt((2.0 * ((l * (l / x)) + (t * t))))
	else:
		tmp = t_2
	return tmp
function code(x, l, t)
	t_1 = Float64(t * sqrt(2.0))
	t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -2.05e-18)
		tmp = Float64(-t_2);
	elseif (t <= 3e-135)
		tmp = Float64(t_1 / Float64(sqrt(2.0) * hypot(t, sqrt(Float64(l / Float64(x / l))))));
	elseif (t <= 3.1e+83)
		tmp = Float64(t_1 / sqrt(Float64(2.0 * Float64(Float64(l * Float64(l / x)) + Float64(t * t)))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = t * sqrt(2.0);
	t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -2.05e-18)
		tmp = -t_2;
	elseif (t <= 3e-135)
		tmp = t_1 / (sqrt(2.0) * hypot(t, sqrt((l / (x / l)))));
	elseif (t <= 3.1e+83)
		tmp = t_1 / sqrt((2.0 * ((l * (l / x)) + (t * t))));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.05e-18], (-t$95$2), If[LessEqual[t, 3e-135], N[(t$95$1 / N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[t ^ 2 + N[Sqrt[N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e+83], N[(t$95$1 / N[Sqrt[N[(2.0 * N[(N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision] + N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \sqrt{2}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -2.05 \cdot 10^{-18}:\\
\;\;\;\;-t_2\\

\mathbf{elif}\;t \leq 3 \cdot 10^{-135}:\\
\;\;\;\;\frac{t_1}{\sqrt{2} \cdot \mathsf{hypot}\left(t, \sqrt{\frac{\ell}{\frac{x}{\ell}}}\right)}\\

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

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


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

    1. Initial program 34.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/34.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. Simplified34.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-rr80.6%

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

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

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

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

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

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

    if -2.0499999999999999e-18 < t < 3.00000000000000012e-135

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot \sqrt{\color{blue}{t \cdot t + \frac{\ell \cdot \ell}{x}}}} \]
      3. add-sqr-sqrt58.0%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot \sqrt{t \cdot t + \color{blue}{\sqrt{\frac{\ell \cdot \ell}{x}} \cdot \sqrt{\frac{\ell \cdot \ell}{x}}}}} \]
      4. hypot-def84.9%

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

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

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

    if 3.00000000000000012e-135 < t < 3.09999999999999992e83

    1. Initial program 53.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-neg53.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-neg53.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-neg53.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-neg53.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-neg53.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-neg53.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. Simplified53.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 75.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\color{blue}{\frac{{\ell}^{2}}{x}} + t \cdot t\right)}} \]
    11. Step-by-step derivation
      1. unpow275.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/89.0%

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

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

    if 3.09999999999999992e83 < t

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.05 \cdot 10^{-18}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-135}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2} \cdot \mathsf{hypot}\left(t, \sqrt{\frac{\ell}{\frac{x}{\ell}}}\right)}\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+83}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 2: 84.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\ t_2 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -2.7 \cdot 10^{+153}:\\ \;\;\;\;-t_2\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-159}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -9.2 \cdot 10^{-184}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-197}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\frac{1}{x} + \frac{1}{x \cdot x}\right) + \frac{1}{x + -1}}}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-160}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ (* t (sqrt 2.0)) (sqrt (* 2.0 (+ (* l (/ l x)) (* t t))))))
        (t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -2.7e+153)
     (- t_2)
     (if (<= t -1.1e-159)
       t_1
       (if (<= t -9.2e-184)
         -1.0
         (if (<= t 2.8e-197)
           (*
            t
            (/
             (sqrt 2.0)
             (*
              l
              (sqrt (+ (+ (/ 1.0 x) (/ 1.0 (* x x))) (/ 1.0 (+ x -1.0)))))))
           (if (<= t 3e-160) 1.0 (if (<= t 2.6e+83) t_1 t_2))))))))
double code(double x, double l, double t) {
	double t_1 = (t * sqrt(2.0)) / sqrt((2.0 * ((l * (l / x)) + (t * t))));
	double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -2.7e+153) {
		tmp = -t_2;
	} else if (t <= -1.1e-159) {
		tmp = t_1;
	} else if (t <= -9.2e-184) {
		tmp = -1.0;
	} else if (t <= 2.8e-197) {
		tmp = t * (sqrt(2.0) / (l * sqrt((((1.0 / x) + (1.0 / (x * x))) + (1.0 / (x + -1.0))))));
	} else if (t <= 3e-160) {
		tmp = 1.0;
	} else if (t <= 2.6e+83) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
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)) / sqrt((2.0d0 * ((l * (l / x)) + (t * t))))
    t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    if (t <= (-2.7d+153)) then
        tmp = -t_2
    else if (t <= (-1.1d-159)) then
        tmp = t_1
    else if (t <= (-9.2d-184)) then
        tmp = -1.0d0
    else if (t <= 2.8d-197) then
        tmp = t * (sqrt(2.0d0) / (l * sqrt((((1.0d0 / x) + (1.0d0 / (x * x))) + (1.0d0 / (x + (-1.0d0)))))))
    else if (t <= 3d-160) then
        tmp = 1.0d0
    else if (t <= 2.6d+83) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = (t * Math.sqrt(2.0)) / Math.sqrt((2.0 * ((l * (l / x)) + (t * t))));
	double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -2.7e+153) {
		tmp = -t_2;
	} else if (t <= -1.1e-159) {
		tmp = t_1;
	} else if (t <= -9.2e-184) {
		tmp = -1.0;
	} else if (t <= 2.8e-197) {
		tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt((((1.0 / x) + (1.0 / (x * x))) + (1.0 / (x + -1.0))))));
	} else if (t <= 3e-160) {
		tmp = 1.0;
	} else if (t <= 2.6e+83) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = (t * math.sqrt(2.0)) / math.sqrt((2.0 * ((l * (l / x)) + (t * t))))
	t_2 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -2.7e+153:
		tmp = -t_2
	elif t <= -1.1e-159:
		tmp = t_1
	elif t <= -9.2e-184:
		tmp = -1.0
	elif t <= 2.8e-197:
		tmp = t * (math.sqrt(2.0) / (l * math.sqrt((((1.0 / x) + (1.0 / (x * x))) + (1.0 / (x + -1.0))))))
	elif t <= 3e-160:
		tmp = 1.0
	elif t <= 2.6e+83:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, l, t)
	t_1 = Float64(Float64(t * sqrt(2.0)) / sqrt(Float64(2.0 * Float64(Float64(l * Float64(l / x)) + Float64(t * t)))))
	t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -2.7e+153)
		tmp = Float64(-t_2);
	elseif (t <= -1.1e-159)
		tmp = t_1;
	elseif (t <= -9.2e-184)
		tmp = -1.0;
	elseif (t <= 2.8e-197)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x * x))) + Float64(1.0 / Float64(x + -1.0)))))));
	elseif (t <= 3e-160)
		tmp = 1.0;
	elseif (t <= 2.6e+83)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = (t * sqrt(2.0)) / sqrt((2.0 * ((l * (l / x)) + (t * t))));
	t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -2.7e+153)
		tmp = -t_2;
	elseif (t <= -1.1e-159)
		tmp = t_1;
	elseif (t <= -9.2e-184)
		tmp = -1.0;
	elseif (t <= 2.8e-197)
		tmp = t * (sqrt(2.0) / (l * sqrt((((1.0 / x) + (1.0 / (x * x))) + (1.0 / (x + -1.0))))));
	elseif (t <= 3e-160)
		tmp = 1.0;
	elseif (t <= 2.6e+83)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * N[(N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision] + N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.7e+153], (-t$95$2), If[LessEqual[t, -1.1e-159], t$95$1, If[LessEqual[t, -9.2e-184], -1.0, If[LessEqual[t, 2.8e-197], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-160], 1.0, If[LessEqual[t, 2.6e+83], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+153}:\\
\;\;\;\;-t_2\\

\mathbf{elif}\;t \leq -1.1 \cdot 10^{-159}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -9.2 \cdot 10^{-184}:\\
\;\;\;\;-1\\

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

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

\mathbf{elif}\;t \leq 2.6 \cdot 10^{+83}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 2.2%

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

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

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

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

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

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

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

    if -2.7000000000000001e153 < t < -1.1e-159 or 2.99999999999999997e-160 < t < 2.6000000000000001e83

    1. Initial program 55.3%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. fma-neg55.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 77.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. unpow277.2%

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\color{blue}{\frac{{\ell}^{2}}{x}} + t \cdot t\right)}} \]
    11. Step-by-step derivation
      1. unpow277.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/87.9%

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

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

    if -1.1e-159 < t < -9.1999999999999998e-184

    1. Initial program 9.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/9.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. Simplified9.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-rr60.5%

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

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

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

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt100.0%

        \[\leadsto \color{blue}{-1} \]
    8. Simplified100.0%

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

    if -9.1999999999999998e-184 < t < 2.8000000000000002e-197

    1. Initial program 3.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.8000000000000002e-197 < t < 2.99999999999999997e-160

    1. Initial program 12.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. fma-neg12.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.6000000000000001e83 < t

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{+153}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-159}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\ \mathbf{elif}\;t \leq -9.2 \cdot 10^{-184}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-197}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\frac{1}{x} + \frac{1}{x \cdot x}\right) + \frac{1}{x + -1}}}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-160}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+83}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 3: 84.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\ t_2 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -8.3 \cdot 10^{+152}:\\ \;\;\;\;-t_2\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-160}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-185}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-198}:\\ \;\;\;\;\frac{t \cdot \sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}}}{\ell}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-160}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ (* t (sqrt 2.0)) (sqrt (* 2.0 (+ (* l (/ l x)) (* t t))))))
        (t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -8.3e+152)
     (- t_2)
     (if (<= t -7e-160)
       t_1
       (if (<= t -1.2e-185)
         -1.0
         (if (<= t 5.2e-198)
           (/ (* t (sqrt (/ 2.0 (+ (/ 1.0 x) (/ 1.0 (+ x -1.0)))))) l)
           (if (<= t 3.2e-160) 1.0 (if (<= t 3.8e+83) t_1 t_2))))))))
double code(double x, double l, double t) {
	double t_1 = (t * sqrt(2.0)) / sqrt((2.0 * ((l * (l / x)) + (t * t))));
	double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -8.3e+152) {
		tmp = -t_2;
	} else if (t <= -7e-160) {
		tmp = t_1;
	} else if (t <= -1.2e-185) {
		tmp = -1.0;
	} else if (t <= 5.2e-198) {
		tmp = (t * sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l;
	} else if (t <= 3.2e-160) {
		tmp = 1.0;
	} else if (t <= 3.8e+83) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
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)) / sqrt((2.0d0 * ((l * (l / x)) + (t * t))))
    t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    if (t <= (-8.3d+152)) then
        tmp = -t_2
    else if (t <= (-7d-160)) then
        tmp = t_1
    else if (t <= (-1.2d-185)) then
        tmp = -1.0d0
    else if (t <= 5.2d-198) then
        tmp = (t * sqrt((2.0d0 / ((1.0d0 / x) + (1.0d0 / (x + (-1.0d0))))))) / l
    else if (t <= 3.2d-160) then
        tmp = 1.0d0
    else if (t <= 3.8d+83) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = (t * Math.sqrt(2.0)) / Math.sqrt((2.0 * ((l * (l / x)) + (t * t))));
	double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -8.3e+152) {
		tmp = -t_2;
	} else if (t <= -7e-160) {
		tmp = t_1;
	} else if (t <= -1.2e-185) {
		tmp = -1.0;
	} else if (t <= 5.2e-198) {
		tmp = (t * Math.sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l;
	} else if (t <= 3.2e-160) {
		tmp = 1.0;
	} else if (t <= 3.8e+83) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = (t * math.sqrt(2.0)) / math.sqrt((2.0 * ((l * (l / x)) + (t * t))))
	t_2 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -8.3e+152:
		tmp = -t_2
	elif t <= -7e-160:
		tmp = t_1
	elif t <= -1.2e-185:
		tmp = -1.0
	elif t <= 5.2e-198:
		tmp = (t * math.sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l
	elif t <= 3.2e-160:
		tmp = 1.0
	elif t <= 3.8e+83:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, l, t)
	t_1 = Float64(Float64(t * sqrt(2.0)) / sqrt(Float64(2.0 * Float64(Float64(l * Float64(l / x)) + Float64(t * t)))))
	t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -8.3e+152)
		tmp = Float64(-t_2);
	elseif (t <= -7e-160)
		tmp = t_1;
	elseif (t <= -1.2e-185)
		tmp = -1.0;
	elseif (t <= 5.2e-198)
		tmp = Float64(Float64(t * sqrt(Float64(2.0 / Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0)))))) / l);
	elseif (t <= 3.2e-160)
		tmp = 1.0;
	elseif (t <= 3.8e+83)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = (t * sqrt(2.0)) / sqrt((2.0 * ((l * (l / x)) + (t * t))));
	t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -8.3e+152)
		tmp = -t_2;
	elseif (t <= -7e-160)
		tmp = t_1;
	elseif (t <= -1.2e-185)
		tmp = -1.0;
	elseif (t <= 5.2e-198)
		tmp = (t * sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l;
	elseif (t <= 3.2e-160)
		tmp = 1.0;
	elseif (t <= 3.8e+83)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * N[(N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision] + N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -8.3e+152], (-t$95$2), If[LessEqual[t, -7e-160], t$95$1, If[LessEqual[t, -1.2e-185], -1.0, If[LessEqual[t, 5.2e-198], N[(N[(t * N[Sqrt[N[(2.0 / N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], If[LessEqual[t, 3.2e-160], 1.0, If[LessEqual[t, 3.8e+83], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -8.3 \cdot 10^{+152}:\\
\;\;\;\;-t_2\\

\mathbf{elif}\;t \leq -7 \cdot 10^{-160}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;t \leq 3.2 \cdot 10^{-160}:\\
\;\;\;\;1\\

\mathbf{elif}\;t \leq 3.8 \cdot 10^{+83}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 2.2%

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

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

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

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

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

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

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

    if -8.3000000000000001e152 < t < -7.0000000000000006e-160 or 3.20000000000000009e-160 < t < 3.8000000000000002e83

    1. Initial program 55.3%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. fma-neg55.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 77.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. unpow277.2%

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\color{blue}{\frac{{\ell}^{2}}{x}} + t \cdot t\right)}} \]
    11. Step-by-step derivation
      1. unpow277.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/87.9%

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

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

    if -7.0000000000000006e-160 < t < -1.2000000000000001e-185

    1. Initial program 9.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/9.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. Simplified9.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-rr60.5%

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

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

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

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt100.0%

        \[\leadsto \color{blue}{-1} \]
    8. Simplified100.0%

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

    if -1.2000000000000001e-185 < t < 5.20000000000000014e-198

    1. Initial program 3.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\frac{1}{\color{blue}{x + -1}} + \frac{1}{x}}} \]
    9. Applied egg-rr44.0%

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

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

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

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

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

        \[\leadsto \frac{t \cdot \color{blue}{\sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}}}}{\ell} \]
    13. Applied egg-rr44.3%

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

    if 5.20000000000000014e-198 < t < 3.20000000000000009e-160

    1. Initial program 12.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. fma-neg12.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.8000000000000002e83 < t

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.3 \cdot 10^{+152}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-160}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-185}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-198}:\\ \;\;\;\;\frac{t \cdot \sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}}}{\ell}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-160}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+83}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 4: 73.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t \cdot \sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}}}{\ell}\\ t_2 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -4.45 \cdot 10^{-72}:\\ \;\;\;\;-t_2\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.45 \cdot 10^{-186}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-197}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 10^{-122}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-70}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ (* t (sqrt (/ 2.0 (+ (/ 1.0 x) (/ 1.0 (+ x -1.0)))))) l))
        (t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -4.45e-72)
     (- t_2)
     (if (<= t -8.5e-112)
       t_1
       (if (<= t -3.45e-186)
         -1.0
         (if (<= t 3e-197)
           t_1
           (if (<= t 1e-122) 1.0 (if (<= t 3e-70) t_1 t_2))))))))
double code(double x, double l, double t) {
	double t_1 = (t * sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l;
	double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -4.45e-72) {
		tmp = -t_2;
	} else if (t <= -8.5e-112) {
		tmp = t_1;
	} else if (t <= -3.45e-186) {
		tmp = -1.0;
	} else if (t <= 3e-197) {
		tmp = t_1;
	} else if (t <= 1e-122) {
		tmp = 1.0;
	} else if (t <= 3e-70) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
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 / ((1.0d0 / x) + (1.0d0 / (x + (-1.0d0))))))) / l
    t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    if (t <= (-4.45d-72)) then
        tmp = -t_2
    else if (t <= (-8.5d-112)) then
        tmp = t_1
    else if (t <= (-3.45d-186)) then
        tmp = -1.0d0
    else if (t <= 3d-197) then
        tmp = t_1
    else if (t <= 1d-122) then
        tmp = 1.0d0
    else if (t <= 3d-70) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = (t * Math.sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l;
	double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -4.45e-72) {
		tmp = -t_2;
	} else if (t <= -8.5e-112) {
		tmp = t_1;
	} else if (t <= -3.45e-186) {
		tmp = -1.0;
	} else if (t <= 3e-197) {
		tmp = t_1;
	} else if (t <= 1e-122) {
		tmp = 1.0;
	} else if (t <= 3e-70) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = (t * math.sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l
	t_2 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -4.45e-72:
		tmp = -t_2
	elif t <= -8.5e-112:
		tmp = t_1
	elif t <= -3.45e-186:
		tmp = -1.0
	elif t <= 3e-197:
		tmp = t_1
	elif t <= 1e-122:
		tmp = 1.0
	elif t <= 3e-70:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, l, t)
	t_1 = Float64(Float64(t * sqrt(Float64(2.0 / Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0)))))) / l)
	t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -4.45e-72)
		tmp = Float64(-t_2);
	elseif (t <= -8.5e-112)
		tmp = t_1;
	elseif (t <= -3.45e-186)
		tmp = -1.0;
	elseif (t <= 3e-197)
		tmp = t_1;
	elseif (t <= 1e-122)
		tmp = 1.0;
	elseif (t <= 3e-70)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = (t * sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l;
	t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -4.45e-72)
		tmp = -t_2;
	elseif (t <= -8.5e-112)
		tmp = t_1;
	elseif (t <= -3.45e-186)
		tmp = -1.0;
	elseif (t <= 3e-197)
		tmp = t_1;
	elseif (t <= 1e-122)
		tmp = 1.0;
	elseif (t <= 3e-70)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t * N[Sqrt[N[(2.0 / N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -4.45e-72], (-t$95$2), If[LessEqual[t, -8.5e-112], t$95$1, If[LessEqual[t, -3.45e-186], -1.0, If[LessEqual[t, 3e-197], t$95$1, If[LessEqual[t, 1e-122], 1.0, If[LessEqual[t, 3e-70], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t \cdot \sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}}}{\ell}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -4.45 \cdot 10^{-72}:\\
\;\;\;\;-t_2\\

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

\mathbf{elif}\;t \leq -3.45 \cdot 10^{-186}:\\
\;\;\;\;-1\\

\mathbf{elif}\;t \leq 3 \cdot 10^{-197}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 10^{-122}:\\
\;\;\;\;1\\

\mathbf{elif}\;t \leq 3 \cdot 10^{-70}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 36.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/36.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. Simplified36.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-rr79.4%

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

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

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

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

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

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

    if -4.4499999999999999e-72 < t < -8.49999999999999992e-112 or -3.4500000000000001e-186 < t < 3.00000000000000026e-197 or 1.00000000000000006e-122 < t < 3.0000000000000001e-70

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\frac{1}{\color{blue}{x + -1}} + \frac{1}{x}}} \]
    9. Applied egg-rr47.7%

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

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

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

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

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

        \[\leadsto \frac{t \cdot \color{blue}{\sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}}}}{\ell} \]
    13. Applied egg-rr48.0%

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

    if -8.49999999999999992e-112 < t < -3.4500000000000001e-186

    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. associate-*l/31.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. Simplified31.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-rr57.0%

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

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

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

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt93.6%

        \[\leadsto \color{blue}{-1} \]
    8. Simplified93.6%

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

    if 3.00000000000000026e-197 < t < 1.00000000000000006e-122

    1. Initial program 43.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-neg44.3%

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x} + {t}^{2}\right)}} \]
      5. unpow252.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. Simplified52.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 x around inf 86.7%

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

    if 3.0000000000000001e-70 < t

    1. Initial program 42.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.45 \cdot 10^{-72}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-112}:\\ \;\;\;\;\frac{t \cdot \sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}}}{\ell}\\ \mathbf{elif}\;t \leq -3.45 \cdot 10^{-186}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-197}:\\ \;\;\;\;\frac{t \cdot \sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}}}{\ell}\\ \mathbf{elif}\;t \leq 10^{-122}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-70}:\\ \;\;\;\;\frac{t \cdot \sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 5: 74.3% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -4.45 \cdot 10^{-72}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq -7.8 \cdot 10^{-109}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-185}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-197}:\\ \;\;\;\;\sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -4.45e-72)
     (- t_1)
     (if (<= t -7.8e-109)
       (* (/ t l) (sqrt x))
       (if (<= t -1.8e-185)
         -1.0
         (if (<= t 6.2e-197)
           (* (sqrt (/ 2.0 (+ (/ 1.0 x) (/ 1.0 (+ x -1.0))))) (/ t l))
           t_1))))))
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -4.45e-72) {
		tmp = -t_1;
	} else if (t <= -7.8e-109) {
		tmp = (t / l) * sqrt(x);
	} else if (t <= -1.8e-185) {
		tmp = -1.0;
	} else if (t <= 6.2e-197) {
		tmp = sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0))))) * (t / l);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    if (t <= (-4.45d-72)) then
        tmp = -t_1
    else if (t <= (-7.8d-109)) then
        tmp = (t / l) * sqrt(x)
    else if (t <= (-1.8d-185)) then
        tmp = -1.0d0
    else if (t <= 6.2d-197) then
        tmp = sqrt((2.0d0 / ((1.0d0 / x) + (1.0d0 / (x + (-1.0d0)))))) * (t / l)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -4.45e-72) {
		tmp = -t_1;
	} else if (t <= -7.8e-109) {
		tmp = (t / l) * Math.sqrt(x);
	} else if (t <= -1.8e-185) {
		tmp = -1.0;
	} else if (t <= 6.2e-197) {
		tmp = Math.sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0))))) * (t / l);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -4.45e-72:
		tmp = -t_1
	elif t <= -7.8e-109:
		tmp = (t / l) * math.sqrt(x)
	elif t <= -1.8e-185:
		tmp = -1.0
	elif t <= 6.2e-197:
		tmp = math.sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0))))) * (t / l)
	else:
		tmp = t_1
	return tmp
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -4.45e-72)
		tmp = Float64(-t_1);
	elseif (t <= -7.8e-109)
		tmp = Float64(Float64(t / l) * sqrt(x));
	elseif (t <= -1.8e-185)
		tmp = -1.0;
	elseif (t <= 6.2e-197)
		tmp = Float64(sqrt(Float64(2.0 / Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0))))) * Float64(t / l));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -4.45e-72)
		tmp = -t_1;
	elseif (t <= -7.8e-109)
		tmp = (t / l) * sqrt(x);
	elseif (t <= -1.8e-185)
		tmp = -1.0;
	elseif (t <= 6.2e-197)
		tmp = sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0))))) * (t / l);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -4.45e-72], (-t$95$1), If[LessEqual[t, -7.8e-109], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.8e-185], -1.0, If[LessEqual[t, 6.2e-197], N[(N[Sqrt[N[(2.0 / N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -4.45 \cdot 10^{-72}:\\
\;\;\;\;-t_1\\

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

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

\mathbf{elif}\;t \leq 6.2 \cdot 10^{-197}:\\
\;\;\;\;\sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}} \cdot \frac{t}{\ell}\\

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


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

    1. Initial program 36.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/36.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. Simplified36.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-rr79.4%

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

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

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

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

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

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

    if -4.4499999999999999e-72 < t < -7.80000000000000046e-109

    1. Initial program 17.2%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. fma-neg17.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.80000000000000046e-109 < t < -1.7999999999999999e-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. associate-*l/31.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. Simplified31.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-rr57.0%

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

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

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

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt93.6%

        \[\leadsto \color{blue}{-1} \]
    8. Simplified93.6%

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

    if -1.7999999999999999e-185 < t < 6.20000000000000057e-197

    1. Initial program 3.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\frac{1}{\color{blue}{x + -1}} + \frac{1}{x}}} \]
    9. Applied egg-rr44.0%

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\ell} \cdot \frac{\sqrt{2}}{\sqrt{\frac{1}{x} + \frac{1}{x + -1}}}} \]
    12. Step-by-step derivation
      1. expm1-log1p-u39.0%

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

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

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

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

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

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

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

    if 6.20000000000000057e-197 < t

    1. Initial program 40.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/40.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. Simplified40.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-rr76.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.45 \cdot 10^{-72}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -7.8 \cdot 10^{-109}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-185}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-197}:\\ \;\;\;\;\sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 6: 74.1% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{if}\;t \leq -4.4 \cdot 10^{-72}:\\ \;\;\;\;\left(-1 + \frac{1}{x}\right) - \frac{0.5}{x \cdot x}\\ \mathbf{elif}\;t \leq -7.8 \cdot 10^{-109}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-185}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-197}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (* (/ t l) (sqrt x))))
   (if (<= t -4.4e-72)
     (- (+ -1.0 (/ 1.0 x)) (/ 0.5 (* x x)))
     (if (<= t -7.8e-109)
       t_1
       (if (<= t -1.9e-185)
         -1.0
         (if (<= t 1.12e-197) t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))))))
double code(double x, double l, double t) {
	double t_1 = (t / l) * sqrt(x);
	double tmp;
	if (t <= -4.4e-72) {
		tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x));
	} else if (t <= -7.8e-109) {
		tmp = t_1;
	} else if (t <= -1.9e-185) {
		tmp = -1.0;
	} else if (t <= 1.12e-197) {
		tmp = t_1;
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (t / l) * sqrt(x)
    if (t <= (-4.4d-72)) then
        tmp = ((-1.0d0) + (1.0d0 / x)) - (0.5d0 / (x * x))
    else if (t <= (-7.8d-109)) then
        tmp = t_1
    else if (t <= (-1.9d-185)) then
        tmp = -1.0d0
    else if (t <= 1.12d-197) then
        tmp = t_1
    else
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = (t / l) * Math.sqrt(x);
	double tmp;
	if (t <= -4.4e-72) {
		tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x));
	} else if (t <= -7.8e-109) {
		tmp = t_1;
	} else if (t <= -1.9e-185) {
		tmp = -1.0;
	} else if (t <= 1.12e-197) {
		tmp = t_1;
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
def code(x, l, t):
	t_1 = (t / l) * math.sqrt(x)
	tmp = 0
	if t <= -4.4e-72:
		tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x))
	elif t <= -7.8e-109:
		tmp = t_1
	elif t <= -1.9e-185:
		tmp = -1.0
	elif t <= 1.12e-197:
		tmp = t_1
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return tmp
function code(x, l, t)
	t_1 = Float64(Float64(t / l) * sqrt(x))
	tmp = 0.0
	if (t <= -4.4e-72)
		tmp = Float64(Float64(-1.0 + Float64(1.0 / x)) - Float64(0.5 / Float64(x * x)));
	elseif (t <= -7.8e-109)
		tmp = t_1;
	elseif (t <= -1.9e-185)
		tmp = -1.0;
	elseif (t <= 1.12e-197)
		tmp = t_1;
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = (t / l) * sqrt(x);
	tmp = 0.0;
	if (t <= -4.4e-72)
		tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x));
	elseif (t <= -7.8e-109)
		tmp = t_1;
	elseif (t <= -1.9e-185)
		tmp = -1.0;
	elseif (t <= 1.12e-197)
		tmp = t_1;
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e-72], N[(N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.8e-109], t$95$1, If[LessEqual[t, -1.9e-185], -1.0, If[LessEqual[t, 1.12e-197], t$95$1, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{-72}:\\
\;\;\;\;\left(-1 + \frac{1}{x}\right) - \frac{0.5}{x \cdot x}\\

\mathbf{elif}\;t \leq -7.8 \cdot 10^{-109}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.12 \cdot 10^{-197}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 36.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/36.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. Simplified36.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{1}{x} - 1\right) - 0.5 \cdot \frac{1}{{x}^{2}}} \]
      2. sub-neg83.4%

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

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

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

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

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

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

    if -4.40000000000000005e-72 < t < -7.80000000000000046e-109 or -1.9e-185 < t < 1.12e-197

    1. Initial program 7.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-neg7.2%

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

        \[\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-neg7.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-neg7.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-neg7.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-neg7.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. Simplified7.2%

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x} + {t}^{2}\right)}} \]
      5. unpow265.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. Simplified65.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 42.5%

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

    if -7.80000000000000046e-109 < t < -1.9e-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. associate-*l/31.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. Simplified31.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-rr57.0%

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

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

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

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt93.6%

        \[\leadsto \color{blue}{-1} \]
    8. Simplified93.6%

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

    if 1.12e-197 < t

    1. Initial program 40.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/40.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. Simplified40.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-rr76.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{-72}:\\ \;\;\;\;\left(-1 + \frac{1}{x}\right) - \frac{0.5}{x \cdot x}\\ \mathbf{elif}\;t \leq -7.8 \cdot 10^{-109}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-185}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-197}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 7: 74.2% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\ell} \cdot \sqrt{x}\\ t_2 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -4.45 \cdot 10^{-72}:\\ \;\;\;\;-t_2\\ \mathbf{elif}\;t \leq -7.8 \cdot 10^{-109}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-182}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-197}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (* (/ t l) (sqrt x))) (t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -4.45e-72)
     (- t_2)
     (if (<= t -7.8e-109)
       t_1
       (if (<= t -2.6e-182) -1.0 (if (<= t 3.5e-197) t_1 t_2))))))
double code(double x, double l, double t) {
	double t_1 = (t / l) * sqrt(x);
	double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -4.45e-72) {
		tmp = -t_2;
	} else if (t <= -7.8e-109) {
		tmp = t_1;
	} else if (t <= -2.6e-182) {
		tmp = -1.0;
	} else if (t <= 3.5e-197) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
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 / l) * sqrt(x)
    t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    if (t <= (-4.45d-72)) then
        tmp = -t_2
    else if (t <= (-7.8d-109)) then
        tmp = t_1
    else if (t <= (-2.6d-182)) then
        tmp = -1.0d0
    else if (t <= 3.5d-197) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = (t / l) * Math.sqrt(x);
	double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -4.45e-72) {
		tmp = -t_2;
	} else if (t <= -7.8e-109) {
		tmp = t_1;
	} else if (t <= -2.6e-182) {
		tmp = -1.0;
	} else if (t <= 3.5e-197) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = (t / l) * math.sqrt(x)
	t_2 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -4.45e-72:
		tmp = -t_2
	elif t <= -7.8e-109:
		tmp = t_1
	elif t <= -2.6e-182:
		tmp = -1.0
	elif t <= 3.5e-197:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, l, t)
	t_1 = Float64(Float64(t / l) * sqrt(x))
	t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -4.45e-72)
		tmp = Float64(-t_2);
	elseif (t <= -7.8e-109)
		tmp = t_1;
	elseif (t <= -2.6e-182)
		tmp = -1.0;
	elseif (t <= 3.5e-197)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = (t / l) * sqrt(x);
	t_2 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -4.45e-72)
		tmp = -t_2;
	elseif (t <= -7.8e-109)
		tmp = t_1;
	elseif (t <= -2.6e-182)
		tmp = -1.0;
	elseif (t <= 3.5e-197)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -4.45e-72], (-t$95$2), If[LessEqual[t, -7.8e-109], t$95$1, If[LessEqual[t, -2.6e-182], -1.0, If[LessEqual[t, 3.5e-197], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{\ell} \cdot \sqrt{x}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -4.45 \cdot 10^{-72}:\\
\;\;\;\;-t_2\\

\mathbf{elif}\;t \leq -7.8 \cdot 10^{-109}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -2.6 \cdot 10^{-182}:\\
\;\;\;\;-1\\

\mathbf{elif}\;t \leq 3.5 \cdot 10^{-197}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 36.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/36.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. Simplified36.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-rr79.4%

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

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

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

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

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

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

    if -4.4499999999999999e-72 < t < -7.80000000000000046e-109 or -2.60000000000000006e-182 < t < 3.4999999999999998e-197

    1. Initial program 7.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-neg7.2%

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

        \[\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-neg7.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-neg7.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-neg7.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-neg7.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. Simplified7.2%

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x} + {t}^{2}\right)}} \]
      5. unpow265.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. Simplified65.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 42.5%

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

    if -7.80000000000000046e-109 < t < -2.60000000000000006e-182

    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. associate-*l/31.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. Simplified31.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-rr57.0%

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

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

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

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt93.6%

        \[\leadsto \color{blue}{-1} \]
    8. Simplified93.6%

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

    if 3.4999999999999998e-197 < t

    1. Initial program 40.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/40.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. Simplified40.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-rr76.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.45 \cdot 10^{-72}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq -7.8 \cdot 10^{-109}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-182}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-197}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 8: 73.6% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\ell} \cdot \sqrt{x}\\ t_2 := \frac{0.5}{x \cdot x}\\ \mathbf{if}\;t \leq -4.4 \cdot 10^{-72}:\\ \;\;\;\;\left(-1 + \frac{1}{x}\right) - t_2\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-114}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-183}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-196}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1 + \left(t_2 + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (* (/ t l) (sqrt x))) (t_2 (/ 0.5 (* x x))))
   (if (<= t -4.4e-72)
     (- (+ -1.0 (/ 1.0 x)) t_2)
     (if (<= t -2.4e-114)
       t_1
       (if (<= t -9e-183)
         -1.0
         (if (<= t 1.2e-196) t_1 (+ 1.0 (+ t_2 (/ -1.0 x)))))))))
double code(double x, double l, double t) {
	double t_1 = (t / l) * sqrt(x);
	double t_2 = 0.5 / (x * x);
	double tmp;
	if (t <= -4.4e-72) {
		tmp = (-1.0 + (1.0 / x)) - t_2;
	} else if (t <= -2.4e-114) {
		tmp = t_1;
	} else if (t <= -9e-183) {
		tmp = -1.0;
	} else if (t <= 1.2e-196) {
		tmp = t_1;
	} else {
		tmp = 1.0 + (t_2 + (-1.0 / x));
	}
	return tmp;
}
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 / l) * sqrt(x)
    t_2 = 0.5d0 / (x * x)
    if (t <= (-4.4d-72)) then
        tmp = ((-1.0d0) + (1.0d0 / x)) - t_2
    else if (t <= (-2.4d-114)) then
        tmp = t_1
    else if (t <= (-9d-183)) then
        tmp = -1.0d0
    else if (t <= 1.2d-196) then
        tmp = t_1
    else
        tmp = 1.0d0 + (t_2 + ((-1.0d0) / x))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = (t / l) * Math.sqrt(x);
	double t_2 = 0.5 / (x * x);
	double tmp;
	if (t <= -4.4e-72) {
		tmp = (-1.0 + (1.0 / x)) - t_2;
	} else if (t <= -2.4e-114) {
		tmp = t_1;
	} else if (t <= -9e-183) {
		tmp = -1.0;
	} else if (t <= 1.2e-196) {
		tmp = t_1;
	} else {
		tmp = 1.0 + (t_2 + (-1.0 / x));
	}
	return tmp;
}
def code(x, l, t):
	t_1 = (t / l) * math.sqrt(x)
	t_2 = 0.5 / (x * x)
	tmp = 0
	if t <= -4.4e-72:
		tmp = (-1.0 + (1.0 / x)) - t_2
	elif t <= -2.4e-114:
		tmp = t_1
	elif t <= -9e-183:
		tmp = -1.0
	elif t <= 1.2e-196:
		tmp = t_1
	else:
		tmp = 1.0 + (t_2 + (-1.0 / x))
	return tmp
function code(x, l, t)
	t_1 = Float64(Float64(t / l) * sqrt(x))
	t_2 = Float64(0.5 / Float64(x * x))
	tmp = 0.0
	if (t <= -4.4e-72)
		tmp = Float64(Float64(-1.0 + Float64(1.0 / x)) - t_2);
	elseif (t <= -2.4e-114)
		tmp = t_1;
	elseif (t <= -9e-183)
		tmp = -1.0;
	elseif (t <= 1.2e-196)
		tmp = t_1;
	else
		tmp = Float64(1.0 + Float64(t_2 + Float64(-1.0 / x)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = (t / l) * sqrt(x);
	t_2 = 0.5 / (x * x);
	tmp = 0.0;
	if (t <= -4.4e-72)
		tmp = (-1.0 + (1.0 / x)) - t_2;
	elseif (t <= -2.4e-114)
		tmp = t_1;
	elseif (t <= -9e-183)
		tmp = -1.0;
	elseif (t <= 1.2e-196)
		tmp = t_1;
	else
		tmp = 1.0 + (t_2 + (-1.0 / x));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e-72], N[(N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t, -2.4e-114], t$95$1, If[LessEqual[t, -9e-183], -1.0, If[LessEqual[t, 1.2e-196], t$95$1, N[(1.0 + N[(t$95$2 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{\ell} \cdot \sqrt{x}\\
t_2 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{-72}:\\
\;\;\;\;\left(-1 + \frac{1}{x}\right) - t_2\\

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

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

\mathbf{elif}\;t \leq 1.2 \cdot 10^{-196}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 36.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/36.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. Simplified36.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{1}{x} - 1\right) - 0.5 \cdot \frac{1}{{x}^{2}}} \]
      2. sub-neg83.4%

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

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

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

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

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

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

    if -4.40000000000000005e-72 < t < -2.4000000000000001e-114 or -8.99999999999999942e-183 < t < 1.2000000000000001e-196

    1. Initial program 7.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-neg7.2%

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

        \[\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-neg7.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-neg7.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-neg7.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-neg7.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. Simplified7.2%

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x} + {t}^{2}\right)}} \]
      5. unpow265.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. Simplified65.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 42.5%

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

    if -2.4000000000000001e-114 < t < -8.99999999999999942e-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. associate-*l/31.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. Simplified31.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-rr57.0%

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

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

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

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt93.6%

        \[\leadsto \color{blue}{-1} \]
    8. Simplified93.6%

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

    if 1.2000000000000001e-196 < t

    1. Initial program 40.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/40.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. Simplified40.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-rr76.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{-72}:\\ \;\;\;\;\left(-1 + \frac{1}{x}\right) - \frac{0.5}{x \cdot x}\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-114}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-183}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-196}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]

Alternative 9: 75.5% accurate, 17.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -1e-309) (+ -1.0 (/ 1.0 x)) (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-309) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-1d-309)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else
        tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-309) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -1e-309:
		tmp = -1.0 + (1.0 / x)
	else:
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -1e-309)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	else
		tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1e-309)
		tmp = -1.0 + (1.0 / x);
	else
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -1e-309], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;-1 + \frac{1}{x}\\

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


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

    1. Initial program 29.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.000000000000002e-309 < t

    1. Initial program 36.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/36.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 75.6% accurate, 17.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{0.5}{x \cdot x}\\ \mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\left(-1 + \frac{1}{x}\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;1 + \left(t_1 + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ 0.5 (* x x))))
   (if (<= t -1e-309) (- (+ -1.0 (/ 1.0 x)) t_1) (+ 1.0 (+ t_1 (/ -1.0 x))))))
double code(double x, double l, double t) {
	double t_1 = 0.5 / (x * x);
	double tmp;
	if (t <= -1e-309) {
		tmp = (-1.0 + (1.0 / x)) - t_1;
	} else {
		tmp = 1.0 + (t_1 + (-1.0 / x));
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 0.5d0 / (x * x)
    if (t <= (-1d-309)) then
        tmp = ((-1.0d0) + (1.0d0 / x)) - t_1
    else
        tmp = 1.0d0 + (t_1 + ((-1.0d0) / x))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = 0.5 / (x * x);
	double tmp;
	if (t <= -1e-309) {
		tmp = (-1.0 + (1.0 / x)) - t_1;
	} else {
		tmp = 1.0 + (t_1 + (-1.0 / x));
	}
	return tmp;
}
def code(x, l, t):
	t_1 = 0.5 / (x * x)
	tmp = 0
	if t <= -1e-309:
		tmp = (-1.0 + (1.0 / x)) - t_1
	else:
		tmp = 1.0 + (t_1 + (-1.0 / x))
	return tmp
function code(x, l, t)
	t_1 = Float64(0.5 / Float64(x * x))
	tmp = 0.0
	if (t <= -1e-309)
		tmp = Float64(Float64(-1.0 + Float64(1.0 / x)) - t_1);
	else
		tmp = Float64(1.0 + Float64(t_1 + Float64(-1.0 / x)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = 0.5 / (x * x);
	tmp = 0.0;
	if (t <= -1e-309)
		tmp = (-1.0 + (1.0 / x)) - t_1;
	else
		tmp = 1.0 + (t_1 + (-1.0 / x));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e-309], N[(N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(1.0 + N[(t$95$1 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\left(-1 + \frac{1}{x}\right) - t_1\\

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


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

    1. Initial program 29.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{1}{x} - 1\right) - 0.5 \cdot \frac{1}{{x}^{2}}} \]
      2. sub-neg71.8%

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

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

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

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

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

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

    if -1.000000000000002e-309 < t

    1. Initial program 36.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/36.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 75.1% accurate, 31.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;-1\\

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


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

    1. Initial program 29.6%

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt70.0%

        \[\leadsto \color{blue}{-1} \]
    8. Simplified70.0%

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

    if -1.000000000000002e-309 < t

    1. Initial program 36.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/36.9%

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

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

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

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

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

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

Alternative 12: 75.4% accurate, 31.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;-1 + \frac{1}{x}\\

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


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

    1. Initial program 29.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.000000000000002e-309 < t

    1. Initial program 36.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/36.9%

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

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

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

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

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

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

Alternative 13: 74.8% accurate, 73.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;-1\\

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


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

    1. Initial program 29.6%

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt70.0%

        \[\leadsto \color{blue}{-1} \]
    8. Simplified70.0%

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

    if -1.000000000000002e-309 < t

    1. Initial program 36.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-neg36.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-neg36.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-neg36.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-neg36.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-neg36.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-neg36.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. Simplified36.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 52.0%

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

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

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{\mathsf{fma}\left(2, t \cdot t, \color{blue}{\ell \cdot \ell}\right)}{x} + {t}^{2}\right)}} \]
      5. unpow252.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. Simplified52.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 x around inf 76.5%

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

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

Alternative 14: 38.5% accurate, 225.0× speedup?

\[\begin{array}{l} \\ -1 \end{array} \]
(FPCore (x l t) :precision binary64 -1.0)
double code(double x, double l, double t) {
	return -1.0;
}
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
public static double code(double x, double l, double t) {
	return -1.0;
}
def code(x, l, t):
	return -1.0
function code(x, l, t)
	return -1.0
end
function tmp = code(x, l, t)
	tmp = -1.0;
end
code[x_, l_, t_] := -1.0
\begin{array}{l}

\\
-1
\end{array}
Derivation
  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.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. Simplified33.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. Applied egg-rr70.7%

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

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

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

      \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
    2. rem-square-sqrt38.3%

      \[\leadsto \color{blue}{-1} \]
  8. Simplified38.3%

    \[\leadsto \color{blue}{-1} \]
  9. Final simplification38.3%

    \[\leadsto -1 \]

Reproduce

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