Toniolo and Linder, Equation (7)

Percentage Accurate: 33.3% → 82.1%
Time: 31.8s
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: 33.3% accurate, 1.0× speedup?

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

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

Alternative 1: 82.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + -1}{x + 1}\\ \mathbf{if}\;t \leq -1.05 \cdot 10^{+27}:\\ \;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-302}:\\ \;\;\;\;\frac{1}{\frac{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}{t}}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-119}:\\ \;\;\;\;\frac{t}{t + 0.5 \cdot \frac{2 \cdot \mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{t \cdot \left(x \cdot 2\right)}}\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+143}:\\ \;\;\;\;\frac{t}{\frac{\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{t_1}, 2 \cdot \frac{{\ell}^{2}}{x} + \left(2 \cdot \frac{{\ell}^{2}}{{x}^{2}} + \left(2 \cdot \frac{{\ell}^{2}}{{x}^{3}} + 2 \cdot \frac{{\ell}^{2}}{{x}^{4}}\right)\right)\right)}}{\sqrt{2}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t_1}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t -1.05e+27)
     (/ t (* t (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
     (if (<= t 2.4e-302)
       (/
        1.0
        (/
         (sqrt
          (/
           (fma
            2.0
            (/ (* (+ x 1.0) (pow t 2.0)) (+ x -1.0))
            (* (/ 2.0 x) (pow l 2.0)))
           2.0))
         t))
       (if (<= t 7.8e-119)
         (/
          t
          (+
           t
           (*
            0.5
            (/ (* 2.0 (fma 2.0 (pow t 2.0) (pow l 2.0))) (* t (* x 2.0))))))
         (if (<= t 4.9e+143)
           (/
            t
            (/
             (sqrt
              (fma
               2.0
               (/ (pow t 2.0) t_1)
               (+
                (* 2.0 (/ (pow l 2.0) x))
                (+
                 (* 2.0 (/ (pow l 2.0) (pow x 2.0)))
                 (+
                  (* 2.0 (/ (pow l 2.0) (pow x 3.0)))
                  (* 2.0 (/ (pow l 2.0) (pow x 4.0))))))))
             (sqrt 2.0)))
           (sqrt t_1)))))))
double code(double x, double l, double t) {
	double t_1 = (x + -1.0) / (x + 1.0);
	double tmp;
	if (t <= -1.05e+27) {
		tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 2.4e-302) {
		tmp = 1.0 / (sqrt((fma(2.0, (((x + 1.0) * pow(t, 2.0)) / (x + -1.0)), ((2.0 / x) * pow(l, 2.0))) / 2.0)) / t);
	} else if (t <= 7.8e-119) {
		tmp = t / (t + (0.5 * ((2.0 * fma(2.0, pow(t, 2.0), pow(l, 2.0))) / (t * (x * 2.0)))));
	} else if (t <= 4.9e+143) {
		tmp = t / (sqrt(fma(2.0, (pow(t, 2.0) / t_1), ((2.0 * (pow(l, 2.0) / x)) + ((2.0 * (pow(l, 2.0) / pow(x, 2.0))) + ((2.0 * (pow(l, 2.0) / pow(x, 3.0))) + (2.0 * (pow(l, 2.0) / pow(x, 4.0)))))))) / sqrt(2.0));
	} else {
		tmp = sqrt(t_1);
	}
	return tmp;
}
function code(x, l, t)
	t_1 = Float64(Float64(x + -1.0) / Float64(x + 1.0))
	tmp = 0.0
	if (t <= -1.05e+27)
		tmp = Float64(t / Float64(t * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	elseif (t <= 2.4e-302)
		tmp = Float64(1.0 / Float64(sqrt(Float64(fma(2.0, Float64(Float64(Float64(x + 1.0) * (t ^ 2.0)) / Float64(x + -1.0)), Float64(Float64(2.0 / x) * (l ^ 2.0))) / 2.0)) / t));
	elseif (t <= 7.8e-119)
		tmp = Float64(t / Float64(t + Float64(0.5 * Float64(Float64(2.0 * fma(2.0, (t ^ 2.0), (l ^ 2.0))) / Float64(t * Float64(x * 2.0))))));
	elseif (t <= 4.9e+143)
		tmp = Float64(t / Float64(sqrt(fma(2.0, Float64((t ^ 2.0) / t_1), Float64(Float64(2.0 * Float64((l ^ 2.0) / x)) + Float64(Float64(2.0 * Float64((l ^ 2.0) / (x ^ 2.0))) + Float64(Float64(2.0 * Float64((l ^ 2.0) / (x ^ 3.0))) + Float64(2.0 * Float64((l ^ 2.0) / (x ^ 4.0)))))))) / sqrt(2.0)));
	else
		tmp = sqrt(t_1);
	end
	return tmp
end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e+27], N[(t / N[(t * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-302], N[(1.0 / N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[(x + 1.0), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / x), $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-119], N[(t / N[(t + N[(0.5 * N[(N[(2.0 * N[(2.0 * N[Power[t, 2.0], $MachinePrecision] + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.9e+143], N[(t / N[(N[Sqrt[N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[t$95$1], $MachinePrecision]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;t \leq 4.9 \cdot 10^{+143}:\\
\;\;\;\;\frac{t}{\frac{\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{t_1}, 2 \cdot \frac{{\ell}^{2}}{x} + \left(2 \cdot \frac{{\ell}^{2}}{{x}^{2}} + \left(2 \cdot \frac{{\ell}^{2}}{{x}^{3}} + 2 \cdot \frac{{\ell}^{2}}{{x}^{4}}\right)\right)\right)}}{\sqrt{2}}}\\

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


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

    1. Initial program 39.9%

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

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

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

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in97.1%

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

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

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

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

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

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

    if -1.04999999999999997e27 < t < 2.40000000000000022e-302

    1. Initial program 42.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. Simplified42.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.40000000000000022e-302 < t < 7.7999999999999998e-119

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.7999999999999998e-119 < t < 4.89999999999999986e143

    1. Initial program 66.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. Simplified66.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.89999999999999986e143 < t

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

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}} \]
    7. Taylor expanded in t around 0 95.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+27}:\\ \;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-302}:\\ \;\;\;\;\frac{1}{\frac{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}{t}}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-119}:\\ \;\;\;\;\frac{t}{t + 0.5 \cdot \frac{2 \cdot \mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{t \cdot \left(x \cdot 2\right)}}\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+143}:\\ \;\;\;\;\frac{t}{\frac{\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{\frac{x + -1}{x + 1}}, 2 \cdot \frac{{\ell}^{2}}{x} + \left(2 \cdot \frac{{\ell}^{2}}{{x}^{2}} + \left(2 \cdot \frac{{\ell}^{2}}{{x}^{3}} + 2 \cdot \frac{{\ell}^{2}}{{x}^{4}}\right)\right)\right)}}{\sqrt{2}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 2: 82.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + -1}{x + 1}\\ \mathbf{if}\;t \leq -1.55 \cdot 10^{+28}:\\ \;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-303}:\\ \;\;\;\;\frac{1}{\frac{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}{t}}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-119}:\\ \;\;\;\;\frac{t}{t + 0.5 \cdot \frac{2 \cdot \mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{t \cdot \left(x \cdot 2\right)}}\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+143}:\\ \;\;\;\;\frac{t}{\frac{\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{t_1}, \frac{2 \cdot {\ell}^{2}}{x}\right)}}{\sqrt{2}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t_1}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t -1.55e+28)
     (/ t (* t (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
     (if (<= t 4.2e-303)
       (/
        1.0
        (/
         (sqrt
          (/
           (fma
            2.0
            (/ (* (+ x 1.0) (pow t 2.0)) (+ x -1.0))
            (* (/ 2.0 x) (pow l 2.0)))
           2.0))
         t))
       (if (<= t 7.8e-119)
         (/
          t
          (+
           t
           (*
            0.5
            (/ (* 2.0 (fma 2.0 (pow t 2.0) (pow l 2.0))) (* t (* x 2.0))))))
         (if (<= t 4.9e+143)
           (/
            t
            (/
             (sqrt (fma 2.0 (/ (pow t 2.0) t_1) (/ (* 2.0 (pow l 2.0)) x)))
             (sqrt 2.0)))
           (sqrt t_1)))))))
double code(double x, double l, double t) {
	double t_1 = (x + -1.0) / (x + 1.0);
	double tmp;
	if (t <= -1.55e+28) {
		tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 4.2e-303) {
		tmp = 1.0 / (sqrt((fma(2.0, (((x + 1.0) * pow(t, 2.0)) / (x + -1.0)), ((2.0 / x) * pow(l, 2.0))) / 2.0)) / t);
	} else if (t <= 7.8e-119) {
		tmp = t / (t + (0.5 * ((2.0 * fma(2.0, pow(t, 2.0), pow(l, 2.0))) / (t * (x * 2.0)))));
	} else if (t <= 4.9e+143) {
		tmp = t / (sqrt(fma(2.0, (pow(t, 2.0) / t_1), ((2.0 * pow(l, 2.0)) / x))) / sqrt(2.0));
	} else {
		tmp = sqrt(t_1);
	}
	return tmp;
}
function code(x, l, t)
	t_1 = Float64(Float64(x + -1.0) / Float64(x + 1.0))
	tmp = 0.0
	if (t <= -1.55e+28)
		tmp = Float64(t / Float64(t * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	elseif (t <= 4.2e-303)
		tmp = Float64(1.0 / Float64(sqrt(Float64(fma(2.0, Float64(Float64(Float64(x + 1.0) * (t ^ 2.0)) / Float64(x + -1.0)), Float64(Float64(2.0 / x) * (l ^ 2.0))) / 2.0)) / t));
	elseif (t <= 7.8e-119)
		tmp = Float64(t / Float64(t + Float64(0.5 * Float64(Float64(2.0 * fma(2.0, (t ^ 2.0), (l ^ 2.0))) / Float64(t * Float64(x * 2.0))))));
	elseif (t <= 4.9e+143)
		tmp = Float64(t / Float64(sqrt(fma(2.0, Float64((t ^ 2.0) / t_1), Float64(Float64(2.0 * (l ^ 2.0)) / x))) / sqrt(2.0)));
	else
		tmp = sqrt(t_1);
	end
	return tmp
end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e+28], N[(t / N[(t * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-303], N[(1.0 / N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[(x + 1.0), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / x), $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-119], N[(t / N[(t + N[(0.5 * N[(N[(2.0 * N[(2.0 * N[Power[t, 2.0], $MachinePrecision] + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.9e+143], N[(t / N[(N[Sqrt[N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[t$95$1], $MachinePrecision]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;t \leq 4.9 \cdot 10^{+143}:\\
\;\;\;\;\frac{t}{\frac{\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{t_1}, \frac{2 \cdot {\ell}^{2}}{x}\right)}}{\sqrt{2}}}\\

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


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

    1. Initial program 39.9%

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

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

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

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in97.1%

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

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

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

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

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

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

    if -1.55e28 < t < 4.2e-303

    1. Initial program 42.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. Simplified42.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2e-303 < t < 7.7999999999999998e-119

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.7999999999999998e-119 < t < 4.89999999999999986e143

    1. Initial program 66.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. Simplified66.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.89999999999999986e143 < t

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

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}} \]
    7. Taylor expanded in t around 0 95.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{+28}:\\ \;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-303}:\\ \;\;\;\;\frac{1}{\frac{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}{t}}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-119}:\\ \;\;\;\;\frac{t}{t + 0.5 \cdot \frac{2 \cdot \mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{t \cdot \left(x \cdot 2\right)}}\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+143}:\\ \;\;\;\;\frac{t}{\frac{\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{\frac{x + -1}{x + 1}}, \frac{2 \cdot {\ell}^{2}}{x}\right)}}{\sqrt{2}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 3: 83.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{1}{\frac{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}{t}}\\ \mathbf{if}\;t \leq -5.7 \cdot 10^{+26}:\\ \;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 3.15 \cdot 10^{-304}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-158}:\\ \;\;\;\;\frac{t}{t + 0.5 \cdot \frac{2 \cdot \mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{t \cdot \left(x \cdot 2\right)}}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+23}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1
         (/
          1.0
          (/
           (sqrt
            (/
             (fma
              2.0
              (/ (* (+ x 1.0) (pow t 2.0)) (+ x -1.0))
              (* (/ 2.0 x) (pow l 2.0)))
             2.0))
           t))))
   (if (<= t -5.7e+26)
     (/ t (* t (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
     (if (<= t 3.15e-304)
       t_1
       (if (<= t 6.8e-158)
         (/
          t
          (+
           t
           (*
            0.5
            (/ (* 2.0 (fma 2.0 (pow t 2.0) (pow l 2.0))) (* t (* x 2.0))))))
         (if (<= t 8.5e+23) t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))))))
double code(double x, double l, double t) {
	double t_1 = 1.0 / (sqrt((fma(2.0, (((x + 1.0) * pow(t, 2.0)) / (x + -1.0)), ((2.0 / x) * pow(l, 2.0))) / 2.0)) / t);
	double tmp;
	if (t <= -5.7e+26) {
		tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 3.15e-304) {
		tmp = t_1;
	} else if (t <= 6.8e-158) {
		tmp = t / (t + (0.5 * ((2.0 * fma(2.0, pow(t, 2.0), pow(l, 2.0))) / (t * (x * 2.0)))));
	} else if (t <= 8.5e+23) {
		tmp = t_1;
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
function code(x, l, t)
	t_1 = Float64(1.0 / Float64(sqrt(Float64(fma(2.0, Float64(Float64(Float64(x + 1.0) * (t ^ 2.0)) / Float64(x + -1.0)), Float64(Float64(2.0 / x) * (l ^ 2.0))) / 2.0)) / t))
	tmp = 0.0
	if (t <= -5.7e+26)
		tmp = Float64(t / Float64(t * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	elseif (t <= 3.15e-304)
		tmp = t_1;
	elseif (t <= 6.8e-158)
		tmp = Float64(t / Float64(t + Float64(0.5 * Float64(Float64(2.0 * fma(2.0, (t ^ 2.0), (l ^ 2.0))) / Float64(t * Float64(x * 2.0))))));
	elseif (t <= 8.5e+23)
		tmp = t_1;
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
code[x_, l_, t_] := Block[{t$95$1 = N[(1.0 / N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[(x + 1.0), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / x), $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.7e+26], N[(t / N[(t * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.15e-304], t$95$1, If[LessEqual[t, 6.8e-158], N[(t / N[(t + N[(0.5 * N[(N[(2.0 * N[(2.0 * N[Power[t, 2.0], $MachinePrecision] + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e+23], 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{1}{\frac{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}{t}}\\
\mathbf{if}\;t \leq -5.7 \cdot 10^{+26}:\\
\;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\

\mathbf{elif}\;t \leq 3.15 \cdot 10^{-304}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{+23}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 39.9%

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

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

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

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in97.1%

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

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

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

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

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

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

    if -5.7000000000000003e26 < t < 3.14999999999999992e-304 or 6.7999999999999999e-158 < t < 8.5000000000000001e23

    1. Initial program 49.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. Simplified49.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.14999999999999992e-304 < t < 6.7999999999999999e-158

    1. Initial program 6.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. Simplified6.5%

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

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

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

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

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

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

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

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

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

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

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

    if 8.5000000000000001e23 < t

    1. Initial program 31.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. Simplified31.5%

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}} \]
    7. Taylor expanded in t around 0 90.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.7 \cdot 10^{+26}:\\ \;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 3.15 \cdot 10^{-304}:\\ \;\;\;\;\frac{1}{\frac{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}{t}}\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-158}:\\ \;\;\;\;\frac{t}{t + 0.5 \cdot \frac{2 \cdot \mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{t \cdot \left(x \cdot 2\right)}}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+23}:\\ \;\;\;\;\frac{1}{\frac{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 4: 83.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}\\ \mathbf{if}\;t \leq -1.3 \cdot 10^{+31}:\\ \;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{-301}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-157}:\\ \;\;\;\;\frac{t}{t + 0.5 \cdot \frac{2 \cdot \mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{t \cdot \left(x \cdot 2\right)}}\\ \mathbf{elif}\;t \leq 10^{+24}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1
         (/
          t
          (sqrt
           (/
            (fma
             2.0
             (/ (* (+ x 1.0) (pow t 2.0)) (+ x -1.0))
             (* (/ 2.0 x) (pow l 2.0)))
            2.0)))))
   (if (<= t -1.3e+31)
     (/ t (* t (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
     (if (<= t 1.22e-301)
       t_1
       (if (<= t 1.6e-157)
         (/
          t
          (+
           t
           (*
            0.5
            (/ (* 2.0 (fma 2.0 (pow t 2.0) (pow l 2.0))) (* t (* x 2.0))))))
         (if (<= t 1e+24) t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))))))
double code(double x, double l, double t) {
	double t_1 = t / sqrt((fma(2.0, (((x + 1.0) * pow(t, 2.0)) / (x + -1.0)), ((2.0 / x) * pow(l, 2.0))) / 2.0));
	double tmp;
	if (t <= -1.3e+31) {
		tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 1.22e-301) {
		tmp = t_1;
	} else if (t <= 1.6e-157) {
		tmp = t / (t + (0.5 * ((2.0 * fma(2.0, pow(t, 2.0), pow(l, 2.0))) / (t * (x * 2.0)))));
	} else if (t <= 1e+24) {
		tmp = t_1;
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
function code(x, l, t)
	t_1 = Float64(t / sqrt(Float64(fma(2.0, Float64(Float64(Float64(x + 1.0) * (t ^ 2.0)) / Float64(x + -1.0)), Float64(Float64(2.0 / x) * (l ^ 2.0))) / 2.0)))
	tmp = 0.0
	if (t <= -1.3e+31)
		tmp = Float64(t / Float64(t * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	elseif (t <= 1.22e-301)
		tmp = t_1;
	elseif (t <= 1.6e-157)
		tmp = Float64(t / Float64(t + Float64(0.5 * Float64(Float64(2.0 * fma(2.0, (t ^ 2.0), (l ^ 2.0))) / Float64(t * Float64(x * 2.0))))));
	elseif (t <= 1e+24)
		tmp = t_1;
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
code[x_, l_, t_] := Block[{t$95$1 = N[(t / N[Sqrt[N[(N[(2.0 * N[(N[(N[(x + 1.0), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / x), $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.3e+31], N[(t / N[(t * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.22e-301], t$95$1, If[LessEqual[t, 1.6e-157], N[(t / N[(t + N[(0.5 * N[(N[(2.0 * N[(2.0 * N[Power[t, 2.0], $MachinePrecision] + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e+24], 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}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{+31}:\\
\;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\

\mathbf{elif}\;t \leq 1.22 \cdot 10^{-301}:\\
\;\;\;\;t_1\\

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

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

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


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

    1. Initial program 39.9%

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

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

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

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in97.1%

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

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

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

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

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

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

    if -1.3e31 < t < 1.2199999999999999e-301 or 1.6000000000000001e-157 < t < 9.9999999999999998e23

    1. Initial program 49.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. Simplified49.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2199999999999999e-301 < t < 1.6000000000000001e-157

    1. Initial program 6.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. Simplified6.5%

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999998e23 < t

    1. Initial program 31.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. Simplified31.5%

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}} \]
    7. Taylor expanded in t around 0 90.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{+31}:\\ \;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{-301}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-157}:\\ \;\;\;\;\frac{t}{t + 0.5 \cdot \frac{2 \cdot \mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{t \cdot \left(x \cdot 2\right)}}\\ \mathbf{elif}\;t \leq 10^{+24}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 5: 77.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{-190}:\\ \;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-240}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{2}} \cdot \sqrt{\frac{2}{x} + \left(\frac{2}{{x}^{2}} + \frac{2}{{x}^{3}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.8e-190)
   (/ t (* t (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
   (if (<= t 2.6e-240)
     (/
      t
      (*
       (/ l (sqrt 2.0))
       (sqrt (+ (/ 2.0 x) (+ (/ 2.0 (pow x 2.0)) (/ 2.0 (pow x 3.0)))))))
     (sqrt (/ (+ x -1.0) (+ x 1.0))))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.8e-190) {
		tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 2.6e-240) {
		tmp = t / ((l / sqrt(2.0)) * sqrt(((2.0 / x) + ((2.0 / pow(x, 2.0)) + (2.0 / pow(x, 3.0))))));
	} 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) :: tmp
    if (t <= (-1.8d-190)) then
        tmp = t / (t * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
    else if (t <= 2.6d-240) then
        tmp = t / ((l / sqrt(2.0d0)) * sqrt(((2.0d0 / x) + ((2.0d0 / (x ** 2.0d0)) + (2.0d0 / (x ** 3.0d0))))))
    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 tmp;
	if (t <= -1.8e-190) {
		tmp = t / (t * -Math.sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 2.6e-240) {
		tmp = t / ((l / Math.sqrt(2.0)) * Math.sqrt(((2.0 / x) + ((2.0 / Math.pow(x, 2.0)) + (2.0 / Math.pow(x, 3.0))))));
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -1.8e-190:
		tmp = t / (t * -math.sqrt(((x + 1.0) / (x + -1.0))))
	elif t <= 2.6e-240:
		tmp = t / ((l / math.sqrt(2.0)) * math.sqrt(((2.0 / x) + ((2.0 / math.pow(x, 2.0)) + (2.0 / math.pow(x, 3.0))))))
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -1.8e-190)
		tmp = Float64(t / Float64(t * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	elseif (t <= 2.6e-240)
		tmp = Float64(t / Float64(Float64(l / sqrt(2.0)) * sqrt(Float64(Float64(2.0 / x) + Float64(Float64(2.0 / (x ^ 2.0)) + Float64(2.0 / (x ^ 3.0)))))));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1.8e-190)
		tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
	elseif (t <= 2.6e-240)
		tmp = t / ((l / sqrt(2.0)) * sqrt(((2.0 / x) + ((2.0 / (x ^ 2.0)) + (2.0 / (x ^ 3.0))))));
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -1.8e-190], N[(t / N[(t * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e-240], N[(t / N[(N[(l / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(N[(2.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{-190}:\\
\;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\

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

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


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

    1. Initial program 46.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. Simplified46.8%

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

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

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

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

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

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

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

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

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

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

    if -1.80000000000000003e-190 < t < 2.59999999999999992e-240

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.59999999999999992e-240 < 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. Simplified40.8%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    5. Step-by-step derivation
      1. +-commutative82.3%

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

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    6. Simplified82.3%

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}} \]
    7. Taylor expanded in t around 0 82.3%

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

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

Alternative 6: 77.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-186}:\\ \;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-240}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{2}} \cdot \sqrt{\frac{2}{x} + \frac{2}{{x}^{2}}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -2e-186)
   (/ t (* t (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
   (if (<= t 1.05e-240)
     (/ t (* (/ l (sqrt 2.0)) (sqrt (+ (/ 2.0 x) (/ 2.0 (pow x 2.0))))))
     (sqrt (/ (+ x -1.0) (+ x 1.0))))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-186) {
		tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 1.05e-240) {
		tmp = t / ((l / sqrt(2.0)) * sqrt(((2.0 / x) + (2.0 / pow(x, 2.0)))));
	} 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) :: tmp
    if (t <= (-2d-186)) then
        tmp = t / (t * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
    else if (t <= 1.05d-240) then
        tmp = t / ((l / sqrt(2.0d0)) * sqrt(((2.0d0 / x) + (2.0d0 / (x ** 2.0d0)))))
    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 tmp;
	if (t <= -2e-186) {
		tmp = t / (t * -Math.sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 1.05e-240) {
		tmp = t / ((l / Math.sqrt(2.0)) * Math.sqrt(((2.0 / x) + (2.0 / Math.pow(x, 2.0)))));
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -2e-186:
		tmp = t / (t * -math.sqrt(((x + 1.0) / (x + -1.0))))
	elif t <= 1.05e-240:
		tmp = t / ((l / math.sqrt(2.0)) * math.sqrt(((2.0 / x) + (2.0 / math.pow(x, 2.0)))))
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -2e-186)
		tmp = Float64(t / Float64(t * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	elseif (t <= 1.05e-240)
		tmp = Float64(t / Float64(Float64(l / sqrt(2.0)) * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / (x ^ 2.0))))));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -2e-186)
		tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
	elseif (t <= 1.05e-240)
		tmp = t / ((l / sqrt(2.0)) * sqrt(((2.0 / x) + (2.0 / (x ^ 2.0)))));
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -2e-186], N[(t / N[(t * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-240], N[(t / N[(N[(l / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-186}:\\
\;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\

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

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


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

    1. Initial program 46.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. Simplified46.8%

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999998e-186 < t < 1.04999999999999997e-240

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

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

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

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

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

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

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

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

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

    if 1.04999999999999997e-240 < 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. Simplified40.8%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    5. Step-by-step derivation
      1. +-commutative82.3%

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

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    6. Simplified82.3%

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}} \]
    7. Taylor expanded in t around 0 82.3%

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

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

Alternative 7: 76.7% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -8.8 \cdot 10^{-185}:\\ \;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-300}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -8.8e-185)
   (/ t (* t (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
   (if (<= t 7e-300) (/ t (/ l (sqrt x))) (sqrt (/ (+ x -1.0) (+ x 1.0))))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -8.8e-185) {
		tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 7e-300) {
		tmp = t / (l / sqrt(x));
	} 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) :: tmp
    if (t <= (-8.8d-185)) then
        tmp = t / (t * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
    else if (t <= 7d-300) then
        tmp = t / (l / sqrt(x))
    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 tmp;
	if (t <= -8.8e-185) {
		tmp = t / (t * -Math.sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 7e-300) {
		tmp = t / (l / Math.sqrt(x));
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -8.8e-185:
		tmp = t / (t * -math.sqrt(((x + 1.0) / (x + -1.0))))
	elif t <= 7e-300:
		tmp = t / (l / math.sqrt(x))
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -8.8e-185)
		tmp = Float64(t / Float64(t * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	elseif (t <= 7e-300)
		tmp = Float64(t / Float64(l / sqrt(x)));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -8.8e-185)
		tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
	elseif (t <= 7e-300)
		tmp = t / (l / sqrt(x));
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -8.8e-185], N[(t / N[(t * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-300], N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.8 \cdot 10^{-185}:\\
\;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\

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

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


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

    1. Initial program 46.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. Simplified46.8%

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

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

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

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

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

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

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

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

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

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

    if -8.8000000000000002e-185 < t < 7.0000000000000003e-300

    1. Initial program 1.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. Simplified1.8%

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

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

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

        \[\leadsto \frac{t}{\color{blue}{\frac{\ell \cdot \sqrt{\frac{2}{x}}}{\sqrt{2}}}} \]
      2. div-inv34.4%

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

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

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

        \[\leadsto \frac{t}{\color{blue}{e^{\mathsf{log1p}\left(\frac{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}{\sqrt{2}}\right)} - 1}} \]
      6. associate-/l*7.3%

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{\frac{\ell}{\sqrt{\frac{2}{\frac{2}{x}}}}}} \]
      3. associate-/r/34.5%

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

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

        \[\leadsto \frac{t}{\frac{\ell}{\sqrt{\color{blue}{x}}}} \]
    8. Simplified34.5%

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

    if 7.0000000000000003e-300 < t

    1. Initial program 37.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. Simplified37.6%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    5. Step-by-step derivation
      1. +-commutative79.4%

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

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    6. Simplified79.4%

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}} \]
    7. Taylor expanded in t around 0 79.4%

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

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

Alternative 8: 76.6% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{-189}:\\ \;\;\;\;\frac{t}{\left(-t\right) - \frac{t}{x}}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-300}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -4.8e-189)
   (/ t (- (- t) (/ t x)))
   (if (<= t 7e-300) (/ t (/ l (sqrt x))) (sqrt (/ (+ x -1.0) (+ x 1.0))))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -4.8e-189) {
		tmp = t / (-t - (t / x));
	} else if (t <= 7e-300) {
		tmp = t / (l / sqrt(x));
	} 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) :: tmp
    if (t <= (-4.8d-189)) then
        tmp = t / (-t - (t / x))
    else if (t <= 7d-300) then
        tmp = t / (l / sqrt(x))
    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 tmp;
	if (t <= -4.8e-189) {
		tmp = t / (-t - (t / x));
	} else if (t <= 7e-300) {
		tmp = t / (l / Math.sqrt(x));
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -4.8e-189:
		tmp = t / (-t - (t / x))
	elif t <= 7e-300:
		tmp = t / (l / math.sqrt(x))
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -4.8e-189)
		tmp = Float64(t / Float64(Float64(-t) - Float64(t / x)));
	elseif (t <= 7e-300)
		tmp = Float64(t / Float64(l / sqrt(x)));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -4.8e-189)
		tmp = t / (-t - (t / x));
	elseif (t <= 7e-300)
		tmp = t / (l / sqrt(x));
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -4.8e-189], N[(t / N[((-t) - N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-300], N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-189}:\\
\;\;\;\;\frac{t}{\left(-t\right) - \frac{t}{x}}\\

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

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


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

    1. Initial program 46.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. Simplified46.8%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    5. Step-by-step derivation
      1. +-commutative1.7%

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

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    6. Simplified1.7%

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-1} \cdot t - \frac{t}{x}} \]
      7. mul-1-neg85.2%

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

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

    if -4.7999999999999997e-189 < t < 7.0000000000000003e-300

    1. Initial program 1.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. Simplified1.8%

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

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

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

        \[\leadsto \frac{t}{\color{blue}{\frac{\ell \cdot \sqrt{\frac{2}{x}}}{\sqrt{2}}}} \]
      2. div-inv34.4%

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

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

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

        \[\leadsto \frac{t}{\color{blue}{e^{\mathsf{log1p}\left(\frac{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}{\sqrt{2}}\right)} - 1}} \]
      6. associate-/l*7.3%

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{\frac{\ell}{\sqrt{\frac{2}{\frac{2}{x}}}}}} \]
      3. associate-/r/34.5%

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

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

        \[\leadsto \frac{t}{\frac{\ell}{\sqrt{\color{blue}{x}}}} \]
    8. Simplified34.5%

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

    if 7.0000000000000003e-300 < t

    1. Initial program 37.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. Simplified37.6%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    5. Step-by-step derivation
      1. +-commutative79.4%

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

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    6. Simplified79.4%

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}} \]
    7. Taylor expanded in t around 0 79.4%

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

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

Alternative 9: 76.0% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{-187}:\\ \;\;\;\;\frac{t}{\left(-t\right) - \frac{t}{x}}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-300}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -4.8e-187)
   (/ t (- (- t) (/ t x)))
   (if (<= t 7e-300) (* (sqrt x) (/ t l)) (+ 1.0 (/ -1.0 x)))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -4.8e-187) {
		tmp = t / (-t - (t / x));
	} else if (t <= 7e-300) {
		tmp = sqrt(x) * (t / l);
	} 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 <= (-4.8d-187)) then
        tmp = t / (-t - (t / x))
    else if (t <= 7d-300) then
        tmp = sqrt(x) * (t / l)
    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 <= -4.8e-187) {
		tmp = t / (-t - (t / x));
	} else if (t <= 7e-300) {
		tmp = Math.sqrt(x) * (t / l);
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -4.8e-187:
		tmp = t / (-t - (t / x))
	elif t <= 7e-300:
		tmp = math.sqrt(x) * (t / l)
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -4.8e-187)
		tmp = Float64(t / Float64(Float64(-t) - Float64(t / x)));
	elseif (t <= 7e-300)
		tmp = Float64(sqrt(x) * Float64(t / l));
	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 <= -4.8e-187)
		tmp = t / (-t - (t / x));
	elseif (t <= 7e-300)
		tmp = sqrt(x) * (t / l);
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -4.8e-187], N[(t / N[((-t) - N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-300], N[(N[Sqrt[x], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-187}:\\
\;\;\;\;\frac{t}{\left(-t\right) - \frac{t}{x}}\\

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

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


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

    1. Initial program 46.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. Simplified46.8%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    5. Step-by-step derivation
      1. +-commutative1.7%

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

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    6. Simplified1.7%

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-1} \cdot t - \frac{t}{x}} \]
      7. mul-1-neg85.2%

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

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

    if -4.80000000000000027e-187 < t < 7.0000000000000003e-300

    1. Initial program 1.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. Simplified1.8%

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

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

      \[\leadsto \frac{t}{\frac{\ell}{\sqrt{2}} \cdot \sqrt{\color{blue}{\frac{2}{x}}}} \]
    5. Taylor expanded in t around 0 34.6%

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

    if 7.0000000000000003e-300 < t

    1. Initial program 37.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. Simplified37.6%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    5. Step-by-step derivation
      1. +-commutative79.4%

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

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    6. Simplified79.4%

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}} \]
    7. Taylor expanded in x around inf 79.0%

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

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

Alternative 10: 76.3% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.15 \cdot 10^{-189}:\\ \;\;\;\;\frac{t}{\left(-t\right) - \frac{t}{x}}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-300}:\\ \;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -3.15e-189)
   (/ t (- (- t) (/ t x)))
   (if (<= t 7e-300) (/ t (/ l (sqrt x))) (+ 1.0 (/ -1.0 x)))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -3.15e-189) {
		tmp = t / (-t - (t / x));
	} else if (t <= 7e-300) {
		tmp = t / (l / sqrt(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 <= (-3.15d-189)) then
        tmp = t / (-t - (t / x))
    else if (t <= 7d-300) then
        tmp = t / (l / sqrt(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 <= -3.15e-189) {
		tmp = t / (-t - (t / x));
	} else if (t <= 7e-300) {
		tmp = t / (l / Math.sqrt(x));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -3.15e-189:
		tmp = t / (-t - (t / x))
	elif t <= 7e-300:
		tmp = t / (l / math.sqrt(x))
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -3.15e-189)
		tmp = Float64(t / Float64(Float64(-t) - Float64(t / x)));
	elseif (t <= 7e-300)
		tmp = Float64(t / Float64(l / sqrt(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 <= -3.15e-189)
		tmp = t / (-t - (t / x));
	elseif (t <= 7e-300)
		tmp = t / (l / sqrt(x));
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -3.15e-189], N[(t / N[((-t) - N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-300], N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.15 \cdot 10^{-189}:\\
\;\;\;\;\frac{t}{\left(-t\right) - \frac{t}{x}}\\

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

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


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

    1. Initial program 46.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. Simplified46.8%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    5. Step-by-step derivation
      1. +-commutative1.7%

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

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    6. Simplified1.7%

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-1} \cdot t - \frac{t}{x}} \]
      7. mul-1-neg85.2%

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

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

    if -3.15e-189 < t < 7.0000000000000003e-300

    1. Initial program 1.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. Simplified1.8%

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

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

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

        \[\leadsto \frac{t}{\color{blue}{\frac{\ell \cdot \sqrt{\frac{2}{x}}}{\sqrt{2}}}} \]
      2. div-inv34.4%

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

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

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

        \[\leadsto \frac{t}{\color{blue}{e^{\mathsf{log1p}\left(\frac{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}{\sqrt{2}}\right)} - 1}} \]
      6. associate-/l*7.3%

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{\frac{\ell}{\sqrt{\frac{2}{\frac{2}{x}}}}}} \]
      3. associate-/r/34.5%

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

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

        \[\leadsto \frac{t}{\frac{\ell}{\sqrt{\color{blue}{x}}}} \]
    8. Simplified34.5%

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

    if 7.0000000000000003e-300 < t

    1. Initial program 37.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. Simplified37.6%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    5. Step-by-step derivation
      1. +-commutative79.4%

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

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    6. Simplified79.4%

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}} \]
    7. Taylor expanded in x around inf 79.0%

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

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

Alternative 11: 76.1% accurate, 22.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{t}{\left(-t\right) - \frac{t}{x}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -5e-310) (/ t (- (- t) (/ t x))) (+ 1.0 (/ -1.0 x))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = t / (-t - (t / 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 <= (-5d-310)) then
        tmp = t / (-t - (t / 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 <= -5e-310) {
		tmp = t / (-t - (t / x));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = t / (-t - (t / x))
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-310)
		tmp = Float64(t / Float64(Float64(-t) - Float64(t / 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 <= -5e-310)
		tmp = t / (-t - (t / x));
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(t / N[((-t) - N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{t}{\left(-t\right) - \frac{t}{x}}\\

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


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

    1. Initial program 42.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. Simplified42.0%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    5. Step-by-step derivation
      1. +-commutative1.8%

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

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    6. Simplified1.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-1} \cdot t - \frac{t}{x}} \]
      7. mul-1-neg77.3%

        \[\leadsto \frac{t}{\color{blue}{\left(-t\right)} - \frac{t}{x}} \]
    9. Simplified77.3%

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

    if -4.999999999999985e-310 < t

    1. Initial program 37.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. Simplified37.1%

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}} \]
    7. Taylor expanded in x around inf 77.9%

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

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

Alternative 12: 75.3% accurate, 31.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{-279}:\\ \;\;\;\;\frac{t}{-t}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.2e-279) (/ t (- t)) (+ 1.0 (/ -1.0 x))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.2e-279) {
		tmp = t / -t;
	} 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 <= (-1.2d-279)) then
        tmp = t / -t
    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 <= -1.2e-279) {
		tmp = t / -t;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -1.2e-279:
		tmp = t / -t
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -1.2e-279)
		tmp = Float64(t / Float64(-t));
	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 <= -1.2e-279)
		tmp = t / -t;
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -1.2e-279], N[(t / (-t)), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-279}:\\
\;\;\;\;\frac{t}{-t}\\

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


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

    1. Initial program 42.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. Simplified42.3%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    5. Step-by-step derivation
      1. +-commutative1.7%

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

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    6. Simplified1.7%

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot {\left(\sqrt{-1}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. *-commutative0.0%

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

        \[\leadsto \frac{t}{\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot t} \]
      3. rem-square-sqrt76.7%

        \[\leadsto \frac{t}{\color{blue}{-1} \cdot t} \]
      4. mul-1-neg76.7%

        \[\leadsto \frac{t}{\color{blue}{-t}} \]
    9. Simplified76.7%

      \[\leadsto \frac{t}{\color{blue}{-t}} \]

    if -1.19999999999999995e-279 < 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. Simplified36.8%

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

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

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{\color{blue}{x + 1}}{x - 1}}} \]
      2. sub-neg77.6%

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    6. Simplified77.6%

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}} \]
    7. Taylor expanded in x around inf 77.3%

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

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

Alternative 13: 75.0% accurate, 37.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-279}:\\
\;\;\;\;\frac{t}{-t}\\

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


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

    1. Initial program 42.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. Simplified42.3%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    5. Step-by-step derivation
      1. +-commutative1.7%

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

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    6. Simplified1.7%

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot {\left(\sqrt{-1}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. *-commutative0.0%

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

        \[\leadsto \frac{t}{\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot t} \]
      3. rem-square-sqrt76.7%

        \[\leadsto \frac{t}{\color{blue}{-1} \cdot t} \]
      4. mul-1-neg76.7%

        \[\leadsto \frac{t}{\color{blue}{-t}} \]
    9. Simplified76.7%

      \[\leadsto \frac{t}{\color{blue}{-t}} \]

    if -1.19999999999999995e-279 < 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. Simplified36.8%

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

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

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{\color{blue}{x + 1}}{x - 1}}} \]
      2. sub-neg77.6%

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

        \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    6. Simplified77.6%

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}} \]
    7. Taylor expanded in x around inf 77.0%

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

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

Alternative 14: 38.9% 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 39.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. Simplified39.6%

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

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

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

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

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

      \[\leadsto \frac{t}{t \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
  6. Simplified39.1%

    \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{x + -1}}}} \]
  7. Taylor expanded in x around inf 38.8%

    \[\leadsto \color{blue}{1} \]
  8. Final simplification38.8%

    \[\leadsto 1 \]

Reproduce

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