Toniolo and Linder, Equation (7)

Percentage Accurate: 33.1% → 85.5%
Time: 26.0s
Alternatives: 11
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 11 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.1% accurate, 1.0× speedup?

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

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

Alternative 1: 85.5% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{x + -1}{1 + x}\\ t_3 := \frac{1}{x + -1}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 5.2 \cdot 10^{-195}:\\ \;\;\;\;\sqrt{2} \cdot \left(t_m \cdot \frac{{\left(\frac{1}{x} + t_3\right)}^{-0.5}}{l_m}\right)\\ \mathbf{elif}\;t_m \leq 2.15 \cdot 10^{-162}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t_m}{0.5 \cdot \frac{2 \cdot \left({t_m}^{2} + {t_m}^{2}\right) + 2 \cdot {l_m}^{2}}{t_m \cdot \left(\sqrt{2} \cdot x\right)} + t_m \cdot \sqrt{2}}\\ \mathbf{elif}\;t_m \leq 2.3 \cdot 10^{+25}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t_m}{\sqrt{\mathsf{fma}\left(2, \frac{{t_m}^{2}}{t_2}, {l_m}^{2} \cdot \left(t_3 + \left(\frac{1}{x} + \frac{1}{{x}^{2}}\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t_2}\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (let* ((t_2 (/ (+ x -1.0) (+ 1.0 x))) (t_3 (/ 1.0 (+ x -1.0))))
   (*
    t_s
    (if (<= t_m 5.2e-195)
      (* (sqrt 2.0) (* t_m (/ (pow (+ (/ 1.0 x) t_3) -0.5) l_m)))
      (if (<= t_m 2.15e-162)
        (*
         (sqrt 2.0)
         (/
          t_m
          (+
           (*
            0.5
            (/
             (+ (* 2.0 (+ (pow t_m 2.0) (pow t_m 2.0))) (* 2.0 (pow l_m 2.0)))
             (* t_m (* (sqrt 2.0) x))))
           (* t_m (sqrt 2.0)))))
        (if (<= t_m 2.3e+25)
          (*
           (sqrt 2.0)
           (/
            t_m
            (sqrt
             (fma
              2.0
              (/ (pow t_m 2.0) t_2)
              (* (pow l_m 2.0) (+ t_3 (+ (/ 1.0 x) (/ 1.0 (pow x 2.0)))))))))
          (sqrt t_2)))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double t_2 = (x + -1.0) / (1.0 + x);
	double t_3 = 1.0 / (x + -1.0);
	double tmp;
	if (t_m <= 5.2e-195) {
		tmp = sqrt(2.0) * (t_m * (pow(((1.0 / x) + t_3), -0.5) / l_m));
	} else if (t_m <= 2.15e-162) {
		tmp = sqrt(2.0) * (t_m / ((0.5 * (((2.0 * (pow(t_m, 2.0) + pow(t_m, 2.0))) + (2.0 * pow(l_m, 2.0))) / (t_m * (sqrt(2.0) * x)))) + (t_m * sqrt(2.0))));
	} else if (t_m <= 2.3e+25) {
		tmp = sqrt(2.0) * (t_m / sqrt(fma(2.0, (pow(t_m, 2.0) / t_2), (pow(l_m, 2.0) * (t_3 + ((1.0 / x) + (1.0 / pow(x, 2.0))))))));
	} else {
		tmp = sqrt(t_2);
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	t_2 = Float64(Float64(x + -1.0) / Float64(1.0 + x))
	t_3 = Float64(1.0 / Float64(x + -1.0))
	tmp = 0.0
	if (t_m <= 5.2e-195)
		tmp = Float64(sqrt(2.0) * Float64(t_m * Float64((Float64(Float64(1.0 / x) + t_3) ^ -0.5) / l_m)));
	elseif (t_m <= 2.15e-162)
		tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(Float64(0.5 * Float64(Float64(Float64(2.0 * Float64((t_m ^ 2.0) + (t_m ^ 2.0))) + Float64(2.0 * (l_m ^ 2.0))) / Float64(t_m * Float64(sqrt(2.0) * x)))) + Float64(t_m * sqrt(2.0)))));
	elseif (t_m <= 2.3e+25)
		tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(fma(2.0, Float64((t_m ^ 2.0) / t_2), Float64((l_m ^ 2.0) * Float64(t_3 + Float64(Float64(1.0 / x) + Float64(1.0 / (x ^ 2.0)))))))));
	else
		tmp = sqrt(t_2);
	end
	return Float64(t_s * tmp)
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.2e-195], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m * N[(N[Power[N[(N[(1.0 / x), $MachinePrecision] + t$95$3), $MachinePrecision], -0.5], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.15e-162], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(N[(0.5 * N[(N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] + N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.3e+25], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / t$95$2), $MachinePrecision] + N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(t$95$3 + N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[t$95$2], $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \frac{x + -1}{1 + x}\\
t_3 := \frac{1}{x + -1}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5.2 \cdot 10^{-195}:\\
\;\;\;\;\sqrt{2} \cdot \left(t_m \cdot \frac{{\left(\frac{1}{x} + t_3\right)}^{-0.5}}{l_m}\right)\\

\mathbf{elif}\;t_m \leq 2.15 \cdot 10^{-162}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t_m}{0.5 \cdot \frac{2 \cdot \left({t_m}^{2} + {t_m}^{2}\right) + 2 \cdot {l_m}^{2}}{t_m \cdot \left(\sqrt{2} \cdot x\right)} + t_m \cdot \sqrt{2}}\\

\mathbf{elif}\;t_m \leq 2.3 \cdot 10^{+25}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t_m}{\sqrt{\mathsf{fma}\left(2, \frac{{t_m}^{2}}{t_2}, {l_m}^{2} \cdot \left(t_3 + \left(\frac{1}{x} + \frac{1}{{x}^{2}}\right)\right)\right)}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.2000000000000003e-195 < t < 2.14999999999999998e-162

    1. Initial program 20.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. Simplified20.4%

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
    4. Step-by-step derivation
      1. fma-def20.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      2. associate-/l*20.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      3. +-commutative20.4%

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

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      7. associate--l+40.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      8. sub-neg40.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      9. metadata-eval40.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      10. +-commutative40.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      11. sub-neg40.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      12. metadata-eval40.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      13. +-commutative40.7%

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
    6. Taylor expanded in x around inf 81.9%

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

    if 2.14999999999999998e-162 < t < 2.2999999999999998e25

    1. Initial program 50.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. Simplified50.4%

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
    4. Step-by-step derivation
      1. fma-def67.0%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      2. associate-/l*66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      3. +-commutative66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. sub-neg66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      5. metadata-eval66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      6. +-commutative66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      7. associate--l+79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      8. sub-neg79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      9. metadata-eval79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      10. +-commutative79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      11. sub-neg79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      12. metadata-eval79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      13. +-commutative79.8%

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
    6. Taylor expanded in x around inf 87.7%

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

    if 2.2999999999999998e25 < t

    1. Initial program 30.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. Simplified29.7%

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    4. Step-by-step derivation
      1. +-commutative86.0%

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
      4. +-commutative86.0%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}} \]
    5. Simplified86.0%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{2}{2}}}}{\sqrt{\frac{x + 1}{-1 + x}}} \]
      3. metadata-eval86.0%

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

        \[\leadsto \frac{\color{blue}{1}}{\sqrt{\frac{x + 1}{-1 + x}}} \]
      5. metadata-eval86.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.2 \cdot 10^{-195}:\\ \;\;\;\;\sqrt{2} \cdot \left(t \cdot \frac{{\left(\frac{1}{x} + \frac{1}{x + -1}\right)}^{-0.5}}{\ell}\right)\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-162}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{0.5 \cdot \frac{2 \cdot \left({t}^{2} + {t}^{2}\right) + 2 \cdot {\ell}^{2}}{t \cdot \left(\sqrt{2} \cdot x\right)} + t \cdot \sqrt{2}}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+25}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{\frac{x + -1}{1 + x}}, {\ell}^{2} \cdot \left(\frac{1}{x + -1} + \left(\frac{1}{x} + \frac{1}{{x}^{2}}\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \]

Alternative 2: 85.5% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{1}{x} + \frac{1}{x + -1}\\ t_3 := \frac{x + -1}{1 + x}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 9 \cdot 10^{-195}:\\ \;\;\;\;\sqrt{2} \cdot \left(t_m \cdot \frac{{t_2}^{-0.5}}{l_m}\right)\\ \mathbf{elif}\;t_m \leq 2.15 \cdot 10^{-162}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t_m}{0.5 \cdot \frac{2 \cdot \left({t_m}^{2} + {t_m}^{2}\right) + 2 \cdot {l_m}^{2}}{t_m \cdot \left(\sqrt{2} \cdot x\right)} + t_m \cdot \sqrt{2}}\\ \mathbf{elif}\;t_m \leq 4.3 \cdot 10^{+24}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t_m}{\sqrt{\mathsf{fma}\left(2, \frac{{t_m}^{2}}{t_3}, {l_m}^{2} \cdot t_2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t_3}\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (let* ((t_2 (+ (/ 1.0 x) (/ 1.0 (+ x -1.0)))) (t_3 (/ (+ x -1.0) (+ 1.0 x))))
   (*
    t_s
    (if (<= t_m 9e-195)
      (* (sqrt 2.0) (* t_m (/ (pow t_2 -0.5) l_m)))
      (if (<= t_m 2.15e-162)
        (*
         (sqrt 2.0)
         (/
          t_m
          (+
           (*
            0.5
            (/
             (+ (* 2.0 (+ (pow t_m 2.0) (pow t_m 2.0))) (* 2.0 (pow l_m 2.0)))
             (* t_m (* (sqrt 2.0) x))))
           (* t_m (sqrt 2.0)))))
        (if (<= t_m 4.3e+24)
          (*
           (sqrt 2.0)
           (/
            t_m
            (sqrt (fma 2.0 (/ (pow t_m 2.0) t_3) (* (pow l_m 2.0) t_2)))))
          (sqrt t_3)))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double t_2 = (1.0 / x) + (1.0 / (x + -1.0));
	double t_3 = (x + -1.0) / (1.0 + x);
	double tmp;
	if (t_m <= 9e-195) {
		tmp = sqrt(2.0) * (t_m * (pow(t_2, -0.5) / l_m));
	} else if (t_m <= 2.15e-162) {
		tmp = sqrt(2.0) * (t_m / ((0.5 * (((2.0 * (pow(t_m, 2.0) + pow(t_m, 2.0))) + (2.0 * pow(l_m, 2.0))) / (t_m * (sqrt(2.0) * x)))) + (t_m * sqrt(2.0))));
	} else if (t_m <= 4.3e+24) {
		tmp = sqrt(2.0) * (t_m / sqrt(fma(2.0, (pow(t_m, 2.0) / t_3), (pow(l_m, 2.0) * t_2))));
	} else {
		tmp = sqrt(t_3);
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	t_2 = Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0)))
	t_3 = Float64(Float64(x + -1.0) / Float64(1.0 + x))
	tmp = 0.0
	if (t_m <= 9e-195)
		tmp = Float64(sqrt(2.0) * Float64(t_m * Float64((t_2 ^ -0.5) / l_m)));
	elseif (t_m <= 2.15e-162)
		tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(Float64(0.5 * Float64(Float64(Float64(2.0 * Float64((t_m ^ 2.0) + (t_m ^ 2.0))) + Float64(2.0 * (l_m ^ 2.0))) / Float64(t_m * Float64(sqrt(2.0) * x)))) + Float64(t_m * sqrt(2.0)))));
	elseif (t_m <= 4.3e+24)
		tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(fma(2.0, Float64((t_m ^ 2.0) / t_3), Float64((l_m ^ 2.0) * t_2)))));
	else
		tmp = sqrt(t_3);
	end
	return Float64(t_s * tmp)
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 9e-195], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m * N[(N[Power[t$95$2, -0.5], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.15e-162], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(N[(0.5 * N[(N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] + N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.3e+24], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / t$95$3), $MachinePrecision] + N[(N[Power[l$95$m, 2.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[t$95$3], $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \frac{1}{x} + \frac{1}{x + -1}\\
t_3 := \frac{x + -1}{1 + x}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 9 \cdot 10^{-195}:\\
\;\;\;\;\sqrt{2} \cdot \left(t_m \cdot \frac{{t_2}^{-0.5}}{l_m}\right)\\

\mathbf{elif}\;t_m \leq 2.15 \cdot 10^{-162}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t_m}{0.5 \cdot \frac{2 \cdot \left({t_m}^{2} + {t_m}^{2}\right) + 2 \cdot {l_m}^{2}}{t_m \cdot \left(\sqrt{2} \cdot x\right)} + t_m \cdot \sqrt{2}}\\

\mathbf{elif}\;t_m \leq 4.3 \cdot 10^{+24}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t_m}{\sqrt{\mathsf{fma}\left(2, \frac{{t_m}^{2}}{t_3}, {l_m}^{2} \cdot t_2\right)}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9e-195 < t < 2.14999999999999998e-162

    1. Initial program 20.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. Simplified20.4%

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
    4. Step-by-step derivation
      1. fma-def20.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      2. associate-/l*20.4%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      3. +-commutative20.4%

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

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      7. associate--l+40.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      8. sub-neg40.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      9. metadata-eval40.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      10. +-commutative40.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      11. sub-neg40.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      12. metadata-eval40.7%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      13. +-commutative40.7%

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
    6. Taylor expanded in x around inf 81.9%

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

    if 2.14999999999999998e-162 < t < 4.29999999999999987e24

    1. Initial program 50.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. Simplified50.4%

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
    4. Step-by-step derivation
      1. fma-def67.0%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      2. associate-/l*66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      3. +-commutative66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. sub-neg66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      5. metadata-eval66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      6. +-commutative66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      7. associate--l+79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      8. sub-neg79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      9. metadata-eval79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      10. +-commutative79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      11. sub-neg79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      12. metadata-eval79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      13. +-commutative79.8%

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
    6. Taylor expanded in x around inf 87.7%

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

    if 4.29999999999999987e24 < t

    1. Initial program 30.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. Simplified29.7%

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    4. Step-by-step derivation
      1. +-commutative86.0%

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
      4. +-commutative86.0%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}} \]
    5. Simplified86.0%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{2}{2}}}}{\sqrt{\frac{x + 1}{-1 + x}}} \]
      3. metadata-eval86.0%

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

        \[\leadsto \frac{\color{blue}{1}}{\sqrt{\frac{x + 1}{-1 + x}}} \]
      5. metadata-eval86.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 9 \cdot 10^{-195}:\\ \;\;\;\;\sqrt{2} \cdot \left(t \cdot \frac{{\left(\frac{1}{x} + \frac{1}{x + -1}\right)}^{-0.5}}{\ell}\right)\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-162}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{0.5 \cdot \frac{2 \cdot \left({t}^{2} + {t}^{2}\right) + 2 \cdot {\ell}^{2}}{t \cdot \left(\sqrt{2} \cdot x\right)} + t \cdot \sqrt{2}}\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{+24}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{\frac{x + -1}{1 + x}}, {\ell}^{2} \cdot \left(\frac{1}{x} + \frac{1}{x + -1}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \]

Alternative 3: 84.7% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{1}{x} + \frac{1}{x + -1}\\ t_3 := t_m \cdot \sqrt{2}\\ t_4 := \frac{x + -1}{1 + x}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 6.6 \cdot 10^{-194}:\\ \;\;\;\;\sqrt{2} \cdot \left(t_m \cdot \frac{{t_2}^{-0.5}}{l_m}\right)\\ \mathbf{elif}\;t_m \leq 2.1 \cdot 10^{-162}:\\ \;\;\;\;t_3 \cdot \frac{1}{\mathsf{hypot}\left(\mathsf{hypot}\left(l_m, t_3\right) \cdot \sqrt{\frac{1 + x}{x + -1}}, l_m\right)}\\ \mathbf{elif}\;t_m \leq 3.3 \cdot 10^{+24}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t_m}{\sqrt{\mathsf{fma}\left(2, \frac{{t_m}^{2}}{t_4}, {l_m}^{2} \cdot t_2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t_4}\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (let* ((t_2 (+ (/ 1.0 x) (/ 1.0 (+ x -1.0))))
        (t_3 (* t_m (sqrt 2.0)))
        (t_4 (/ (+ x -1.0) (+ 1.0 x))))
   (*
    t_s
    (if (<= t_m 6.6e-194)
      (* (sqrt 2.0) (* t_m (/ (pow t_2 -0.5) l_m)))
      (if (<= t_m 2.1e-162)
        (*
         t_3
         (/
          1.0
          (hypot (* (hypot l_m t_3) (sqrt (/ (+ 1.0 x) (+ x -1.0)))) l_m)))
        (if (<= t_m 3.3e+24)
          (*
           (sqrt 2.0)
           (/
            t_m
            (sqrt (fma 2.0 (/ (pow t_m 2.0) t_4) (* (pow l_m 2.0) t_2)))))
          (sqrt t_4)))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double t_2 = (1.0 / x) + (1.0 / (x + -1.0));
	double t_3 = t_m * sqrt(2.0);
	double t_4 = (x + -1.0) / (1.0 + x);
	double tmp;
	if (t_m <= 6.6e-194) {
		tmp = sqrt(2.0) * (t_m * (pow(t_2, -0.5) / l_m));
	} else if (t_m <= 2.1e-162) {
		tmp = t_3 * (1.0 / hypot((hypot(l_m, t_3) * sqrt(((1.0 + x) / (x + -1.0)))), l_m));
	} else if (t_m <= 3.3e+24) {
		tmp = sqrt(2.0) * (t_m / sqrt(fma(2.0, (pow(t_m, 2.0) / t_4), (pow(l_m, 2.0) * t_2))));
	} else {
		tmp = sqrt(t_4);
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	t_2 = Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0)))
	t_3 = Float64(t_m * sqrt(2.0))
	t_4 = Float64(Float64(x + -1.0) / Float64(1.0 + x))
	tmp = 0.0
	if (t_m <= 6.6e-194)
		tmp = Float64(sqrt(2.0) * Float64(t_m * Float64((t_2 ^ -0.5) / l_m)));
	elseif (t_m <= 2.1e-162)
		tmp = Float64(t_3 * Float64(1.0 / hypot(Float64(hypot(l_m, t_3) * sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0)))), l_m)));
	elseif (t_m <= 3.3e+24)
		tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(fma(2.0, Float64((t_m ^ 2.0) / t_4), Float64((l_m ^ 2.0) * t_2)))));
	else
		tmp = sqrt(t_4);
	end
	return Float64(t_s * tmp)
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 6.6e-194], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m * N[(N[Power[t$95$2, -0.5], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.1e-162], N[(t$95$3 * N[(1.0 / N[Sqrt[N[(N[Sqrt[l$95$m ^ 2 + t$95$3 ^ 2], $MachinePrecision] * N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + l$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.3e+24], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / t$95$4), $MachinePrecision] + N[(N[Power[l$95$m, 2.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[t$95$4], $MachinePrecision]]]]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \frac{1}{x} + \frac{1}{x + -1}\\
t_3 := t_m \cdot \sqrt{2}\\
t_4 := \frac{x + -1}{1 + x}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 6.6 \cdot 10^{-194}:\\
\;\;\;\;\sqrt{2} \cdot \left(t_m \cdot \frac{{t_2}^{-0.5}}{l_m}\right)\\

\mathbf{elif}\;t_m \leq 2.1 \cdot 10^{-162}:\\
\;\;\;\;t_3 \cdot \frac{1}{\mathsf{hypot}\left(\mathsf{hypot}\left(l_m, t_3\right) \cdot \sqrt{\frac{1 + x}{x + -1}}, l_m\right)}\\

\mathbf{elif}\;t_m \leq 3.3 \cdot 10^{+24}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t_m}{\sqrt{\mathsf{fma}\left(2, \frac{{t_m}^{2}}{t_4}, {l_m}^{2} \cdot t_2\right)}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.5999999999999998e-194 < t < 2.1e-162

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

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

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

    if 2.1e-162 < t < 3.2999999999999999e24

    1. Initial program 50.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. Simplified50.4%

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
    4. Step-by-step derivation
      1. fma-def67.0%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      2. associate-/l*66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      3. +-commutative66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. sub-neg66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      5. metadata-eval66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      6. +-commutative66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      7. associate--l+79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      8. sub-neg79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      9. metadata-eval79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      10. +-commutative79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      11. sub-neg79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      12. metadata-eval79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      13. +-commutative79.8%

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
    6. Taylor expanded in x around inf 87.7%

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

    if 3.2999999999999999e24 < t

    1. Initial program 30.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. Simplified29.7%

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    4. Step-by-step derivation
      1. +-commutative86.0%

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
      4. +-commutative86.0%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}} \]
    5. Simplified86.0%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{2}{2}}}}{\sqrt{\frac{x + 1}{-1 + x}}} \]
      3. metadata-eval86.0%

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

        \[\leadsto \frac{\color{blue}{1}}{\sqrt{\frac{x + 1}{-1 + x}}} \]
      5. metadata-eval86.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 6.6 \cdot 10^{-194}:\\ \;\;\;\;\sqrt{2} \cdot \left(t \cdot \frac{{\left(\frac{1}{x} + \frac{1}{x + -1}\right)}^{-0.5}}{\ell}\right)\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-162}:\\ \;\;\;\;\left(t \cdot \sqrt{2}\right) \cdot \frac{1}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1 + x}{x + -1}}, \ell\right)}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+24}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{\frac{x + -1}{1 + x}}, {\ell}^{2} \cdot \left(\frac{1}{x} + \frac{1}{x + -1}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \]

Alternative 4: 84.6% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := t_m \cdot \sqrt{2}\\ t_3 := \frac{x + -1}{1 + x}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 5.2 \cdot 10^{-196}:\\ \;\;\;\;\sqrt{2} \cdot \left(t_m \cdot \frac{{\left(\frac{1}{x} + \frac{1}{x + -1}\right)}^{-0.5}}{l_m}\right)\\ \mathbf{elif}\;t_m \leq 2 \cdot 10^{-162}:\\ \;\;\;\;t_2 \cdot \frac{1}{\mathsf{hypot}\left(\mathsf{hypot}\left(l_m, t_2\right) \cdot \sqrt{\frac{1 + x}{x + -1}}, l_m\right)}\\ \mathbf{elif}\;t_m \leq 2.05 \cdot 10^{+24}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t_m}{\sqrt{\mathsf{fma}\left(2, \frac{{t_m}^{2}}{t_3}, 2 \cdot \frac{{l_m}^{2}}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t_3}\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (let* ((t_2 (* t_m (sqrt 2.0))) (t_3 (/ (+ x -1.0) (+ 1.0 x))))
   (*
    t_s
    (if (<= t_m 5.2e-196)
      (*
       (sqrt 2.0)
       (* t_m (/ (pow (+ (/ 1.0 x) (/ 1.0 (+ x -1.0))) -0.5) l_m)))
      (if (<= t_m 2e-162)
        (*
         t_2
         (/
          1.0
          (hypot (* (hypot l_m t_2) (sqrt (/ (+ 1.0 x) (+ x -1.0)))) l_m)))
        (if (<= t_m 2.05e+24)
          (*
           (sqrt 2.0)
           (/
            t_m
            (sqrt
             (fma 2.0 (/ (pow t_m 2.0) t_3) (* 2.0 (/ (pow l_m 2.0) x))))))
          (sqrt t_3)))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double t_2 = t_m * sqrt(2.0);
	double t_3 = (x + -1.0) / (1.0 + x);
	double tmp;
	if (t_m <= 5.2e-196) {
		tmp = sqrt(2.0) * (t_m * (pow(((1.0 / x) + (1.0 / (x + -1.0))), -0.5) / l_m));
	} else if (t_m <= 2e-162) {
		tmp = t_2 * (1.0 / hypot((hypot(l_m, t_2) * sqrt(((1.0 + x) / (x + -1.0)))), l_m));
	} else if (t_m <= 2.05e+24) {
		tmp = sqrt(2.0) * (t_m / sqrt(fma(2.0, (pow(t_m, 2.0) / t_3), (2.0 * (pow(l_m, 2.0) / x)))));
	} else {
		tmp = sqrt(t_3);
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	t_2 = Float64(t_m * sqrt(2.0))
	t_3 = Float64(Float64(x + -1.0) / Float64(1.0 + x))
	tmp = 0.0
	if (t_m <= 5.2e-196)
		tmp = Float64(sqrt(2.0) * Float64(t_m * Float64((Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0))) ^ -0.5) / l_m)));
	elseif (t_m <= 2e-162)
		tmp = Float64(t_2 * Float64(1.0 / hypot(Float64(hypot(l_m, t_2) * sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0)))), l_m)));
	elseif (t_m <= 2.05e+24)
		tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(fma(2.0, Float64((t_m ^ 2.0) / t_3), Float64(2.0 * Float64((l_m ^ 2.0) / x))))));
	else
		tmp = sqrt(t_3);
	end
	return Float64(t_s * tmp)
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.2e-196], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m * N[(N[Power[N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2e-162], N[(t$95$2 * N[(1.0 / N[Sqrt[N[(N[Sqrt[l$95$m ^ 2 + t$95$2 ^ 2], $MachinePrecision] * N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + l$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.05e+24], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / t$95$3), $MachinePrecision] + N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[t$95$3], $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := t_m \cdot \sqrt{2}\\
t_3 := \frac{x + -1}{1 + x}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5.2 \cdot 10^{-196}:\\
\;\;\;\;\sqrt{2} \cdot \left(t_m \cdot \frac{{\left(\frac{1}{x} + \frac{1}{x + -1}\right)}^{-0.5}}{l_m}\right)\\

\mathbf{elif}\;t_m \leq 2 \cdot 10^{-162}:\\
\;\;\;\;t_2 \cdot \frac{1}{\mathsf{hypot}\left(\mathsf{hypot}\left(l_m, t_2\right) \cdot \sqrt{\frac{1 + x}{x + -1}}, l_m\right)}\\

\mathbf{elif}\;t_m \leq 2.05 \cdot 10^{+24}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t_m}{\sqrt{\mathsf{fma}\left(2, \frac{{t_m}^{2}}{t_3}, 2 \cdot \frac{{l_m}^{2}}{x}\right)}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.1999999999999996e-196 < t < 1.99999999999999991e-162

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

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

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

    if 1.99999999999999991e-162 < t < 2.05e24

    1. Initial program 50.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. Simplified50.4%

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
    4. Step-by-step derivation
      1. fma-def67.0%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
      2. associate-/l*66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      3. +-commutative66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      4. sub-neg66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      5. metadata-eval66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      6. +-commutative66.9%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      7. associate--l+79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      8. sub-neg79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      9. metadata-eval79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      10. +-commutative79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      11. sub-neg79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      12. metadata-eval79.8%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}} \]
      13. +-commutative79.8%

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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)}}} \]
    6. Taylor expanded in x around inf 87.7%

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

    if 2.05e24 < t

    1. Initial program 30.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. Simplified29.7%

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    4. Step-by-step derivation
      1. +-commutative86.0%

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
      4. +-commutative86.0%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}} \]
    5. Simplified86.0%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{2}{2}}}}{\sqrt{\frac{x + 1}{-1 + x}}} \]
      3. metadata-eval86.0%

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

        \[\leadsto \frac{\color{blue}{1}}{\sqrt{\frac{x + 1}{-1 + x}}} \]
      5. metadata-eval86.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.2 \cdot 10^{-196}:\\ \;\;\;\;\sqrt{2} \cdot \left(t \cdot \frac{{\left(\frac{1}{x} + \frac{1}{x + -1}\right)}^{-0.5}}{\ell}\right)\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-162}:\\ \;\;\;\;\left(t \cdot \sqrt{2}\right) \cdot \frac{1}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{1 + x}{x + -1}}, \ell\right)}\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{+24}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{\frac{x + -1}{1 + x}}, 2 \cdot \frac{{\ell}^{2}}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \]

Alternative 5: 79.8% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;l_m \leq 2.3 \cdot 10^{+173}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \mathbf{else}:\\ \;\;\;\;t_m \cdot \frac{\sqrt{2}}{l_m \cdot \sqrt{\frac{1}{x} + \frac{1}{x + -1}}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= l_m 2.3e+173)
    (sqrt (/ (+ x -1.0) (+ 1.0 x)))
    (* t_m (/ (sqrt 2.0) (* l_m (sqrt (+ (/ 1.0 x) (/ 1.0 (+ x -1.0))))))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 2.3e+173) {
		tmp = sqrt(((x + -1.0) / (1.0 + x)));
	} else {
		tmp = t_m * (sqrt(2.0) / (l_m * sqrt(((1.0 / x) + (1.0 / (x + -1.0))))));
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (l_m <= 2.3d+173) then
        tmp = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
    else
        tmp = t_m * (sqrt(2.0d0) / (l_m * sqrt(((1.0d0 / x) + (1.0d0 / (x + (-1.0d0)))))))
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 2.3e+173) {
		tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
	} else {
		tmp = t_m * (Math.sqrt(2.0) / (l_m * Math.sqrt(((1.0 / x) + (1.0 / (x + -1.0))))));
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if l_m <= 2.3e+173:
		tmp = math.sqrt(((x + -1.0) / (1.0 + x)))
	else:
		tmp = t_m * (math.sqrt(2.0) / (l_m * math.sqrt(((1.0 / x) + (1.0 / (x + -1.0))))))
	return t_s * tmp
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (l_m <= 2.3e+173)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x)));
	else
		tmp = Float64(t_m * Float64(sqrt(2.0) / Float64(l_m * sqrt(Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0)))))));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if (l_m <= 2.3e+173)
		tmp = sqrt(((x + -1.0) / (1.0 + x)));
	else
		tmp = t_m * (sqrt(2.0) / (l_m * sqrt(((1.0 / x) + (1.0 / (x + -1.0))))));
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[l$95$m, 2.3e+173], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l$95$m * N[Sqrt[N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 2.3 \cdot 10^{+173}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\

\mathbf{else}:\\
\;\;\;\;t_m \cdot \frac{\sqrt{2}}{l_m \cdot \sqrt{\frac{1}{x} + \frac{1}{x + -1}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 2.29999999999999995e173

    1. Initial program 32.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. Simplified32.7%

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    4. Step-by-step derivation
      1. +-commutative46.0%

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
      4. +-commutative46.0%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}} \]
    5. Simplified46.0%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{2}{2}}}}{\sqrt{\frac{x + 1}{-1 + x}}} \]
      3. metadata-eval46.0%

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

        \[\leadsto \frac{\color{blue}{1}}{\sqrt{\frac{x + 1}{-1 + x}}} \]
      5. metadata-eval46.0%

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

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

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

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

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

    if 2.29999999999999995e173 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 78.3% accurate, 1.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;l_m \leq 4.2 \cdot 10^{+174}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\sqrt{x \cdot 0.5} \cdot \frac{t_m}{l_m}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= l_m 4.2e+174)
    (sqrt (/ (+ x -1.0) (+ 1.0 x)))
    (* (sqrt 2.0) (* (sqrt (* x 0.5)) (/ t_m l_m))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 4.2e+174) {
		tmp = sqrt(((x + -1.0) / (1.0 + x)));
	} else {
		tmp = sqrt(2.0) * (sqrt((x * 0.5)) * (t_m / l_m));
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (l_m <= 4.2d+174) then
        tmp = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
    else
        tmp = sqrt(2.0d0) * (sqrt((x * 0.5d0)) * (t_m / l_m))
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 4.2e+174) {
		tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
	} else {
		tmp = Math.sqrt(2.0) * (Math.sqrt((x * 0.5)) * (t_m / l_m));
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if l_m <= 4.2e+174:
		tmp = math.sqrt(((x + -1.0) / (1.0 + x)))
	else:
		tmp = math.sqrt(2.0) * (math.sqrt((x * 0.5)) * (t_m / l_m))
	return t_s * tmp
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (l_m <= 4.2e+174)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x)));
	else
		tmp = Float64(sqrt(2.0) * Float64(sqrt(Float64(x * 0.5)) * Float64(t_m / l_m)));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if (l_m <= 4.2e+174)
		tmp = sqrt(((x + -1.0) / (1.0 + x)));
	else
		tmp = sqrt(2.0) * (sqrt((x * 0.5)) * (t_m / l_m));
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[l$95$m, 4.2e+174], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[N[(x * 0.5), $MachinePrecision]], $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 4.2 \cdot 10^{+174}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{x \cdot 0.5} \cdot \frac{t_m}{l_m}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 4.20000000000000033e174

    1. Initial program 32.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. Simplified32.7%

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    4. Step-by-step derivation
      1. +-commutative46.0%

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
      4. +-commutative46.0%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}} \]
    5. Simplified46.0%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{2}{2}}}}{\sqrt{\frac{x + 1}{-1 + x}}} \]
      3. metadata-eval46.0%

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

        \[\leadsto \frac{\color{blue}{1}}{\sqrt{\frac{x + 1}{-1 + x}}} \]
      5. metadata-eval46.0%

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

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

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

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

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

    if 4.20000000000000033e174 < l

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \left(\sqrt{\color{blue}{0.5 \cdot x}} \cdot \frac{t}{\ell}\right) \]
    7. Step-by-step derivation
      1. *-commutative75.6%

        \[\leadsto \sqrt{2} \cdot \left(\sqrt{\color{blue}{x \cdot 0.5}} \cdot \frac{t}{\ell}\right) \]
    8. Simplified75.6%

      \[\leadsto \sqrt{2} \cdot \left(\sqrt{\color{blue}{x \cdot 0.5}} \cdot \frac{t}{\ell}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification49.4%

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

Alternative 7: 75.2% accurate, 1.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;l_m \leq 3.7 \cdot 10^{+193}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t_m \cdot \sqrt{x}}{l_m}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= l_m 3.7e+193)
    (sqrt (/ (+ x -1.0) (+ 1.0 x)))
    (* (sqrt 2.0) (/ (* t_m (sqrt x)) l_m)))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 3.7e+193) {
		tmp = sqrt(((x + -1.0) / (1.0 + x)));
	} else {
		tmp = sqrt(2.0) * ((t_m * sqrt(x)) / l_m);
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (l_m <= 3.7d+193) then
        tmp = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
    else
        tmp = sqrt(2.0d0) * ((t_m * sqrt(x)) / l_m)
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 3.7e+193) {
		tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
	} else {
		tmp = Math.sqrt(2.0) * ((t_m * Math.sqrt(x)) / l_m);
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if l_m <= 3.7e+193:
		tmp = math.sqrt(((x + -1.0) / (1.0 + x)))
	else:
		tmp = math.sqrt(2.0) * ((t_m * math.sqrt(x)) / l_m)
	return t_s * tmp
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (l_m <= 3.7e+193)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x)));
	else
		tmp = Float64(sqrt(2.0) * Float64(Float64(t_m * sqrt(x)) / l_m));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if (l_m <= 3.7e+193)
		tmp = sqrt(((x + -1.0) / (1.0 + x)));
	else
		tmp = sqrt(2.0) * ((t_m * sqrt(x)) / l_m);
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[l$95$m, 3.7e+193], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(t$95$m * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 3.7 \cdot 10^{+193}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t_m \cdot \sqrt{x}}{l_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 3.7000000000000003e193

    1. Initial program 31.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.7000000000000003e193 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{\color{blue}{\sqrt{x}} \cdot t}{\ell} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.9%

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

Alternative 8: 75.1% accurate, 2.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;l_m \leq 7.2 \cdot 10^{+193}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_m}{l_m} \cdot \sqrt{2 \cdot x}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= l_m 7.2e+193)
    (sqrt (/ (+ x -1.0) (+ 1.0 x)))
    (* (/ t_m l_m) (sqrt (* 2.0 x))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 7.2e+193) {
		tmp = sqrt(((x + -1.0) / (1.0 + x)));
	} else {
		tmp = (t_m / l_m) * sqrt((2.0 * x));
	}
	return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (l_m <= 7.2d+193) then
        tmp = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
    else
        tmp = (t_m / l_m) * sqrt((2.0d0 * x))
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (l_m <= 7.2e+193) {
		tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
	} else {
		tmp = (t_m / l_m) * Math.sqrt((2.0 * x));
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if l_m <= 7.2e+193:
		tmp = math.sqrt(((x + -1.0) / (1.0 + x)))
	else:
		tmp = (t_m / l_m) * math.sqrt((2.0 * x))
	return t_s * tmp
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (l_m <= 7.2e+193)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x)));
	else
		tmp = Float64(Float64(t_m / l_m) * sqrt(Float64(2.0 * x)));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if (l_m <= 7.2e+193)
		tmp = sqrt(((x + -1.0) / (1.0 + x)));
	else
		tmp = (t_m / l_m) * sqrt((2.0 * x));
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[l$95$m, 7.2e+193], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(t$95$m / l$95$m), $MachinePrecision] * N[Sqrt[N[(2.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 7.2 \cdot 10^{+193}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\

\mathbf{else}:\\
\;\;\;\;\frac{t_m}{l_m} \cdot \sqrt{2 \cdot x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 7.2e193

    1. Initial program 31.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2e193 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{2} \cdot \sqrt{x}\right) \cdot \frac{t}{\ell}}\right)} - 1 \]
      4. pow1/233.3%

        \[\leadsto e^{\mathsf{log1p}\left(\left(\color{blue}{{2}^{0.5}} \cdot \sqrt{x}\right) \cdot \frac{t}{\ell}\right)} - 1 \]
      5. pow1/233.3%

        \[\leadsto e^{\mathsf{log1p}\left(\left({2}^{0.5} \cdot \color{blue}{{x}^{0.5}}\right) \cdot \frac{t}{\ell}\right)} - 1 \]
      6. pow-prod-down33.3%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left({\left(2 \cdot x\right)}^{0.5} \cdot \frac{t}{\ell}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def41.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(2 \cdot x\right)}^{0.5} \cdot \frac{t}{\ell}\right)\right)} \]
      2. expm1-log1p41.7%

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

        \[\leadsto \color{blue}{\frac{t}{\ell} \cdot {\left(2 \cdot x\right)}^{0.5}} \]
      4. unpow1/241.7%

        \[\leadsto \frac{t}{\ell} \cdot \color{blue}{\sqrt{2 \cdot x}} \]
    11. Simplified41.7%

      \[\leadsto \color{blue}{\frac{t}{\ell} \cdot \sqrt{2 \cdot x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.9%

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

Alternative 9: 76.7% accurate, 2.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \sqrt{\frac{x + -1}{1 + x}} \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (* t_s (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	return t_s * sqrt(((x + -1.0) / (1.0 + x)));
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    code = t_s * sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	return t_s * Math.sqrt(((x + -1.0) / (1.0 + x)));
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	return t_s * math.sqrt(((x + -1.0) / (1.0 + x)))
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	return Float64(t_s * sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))))
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, l_m, t_m)
	tmp = t_s * sqrt(((x + -1.0) / (1.0 + x)));
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \sqrt{\frac{x + -1}{1 + x}}
\end{array}
Derivation
  1. Initial program 29.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. Simplified29.0%

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

    \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
  4. Step-by-step derivation
    1. +-commutative42.0%

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

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

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    4. +-commutative42.0%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}} \]
  5. Simplified42.0%

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

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

      \[\leadsto \frac{\color{blue}{\sqrt{\frac{2}{2}}}}{\sqrt{\frac{x + 1}{-1 + x}}} \]
    3. metadata-eval42.0%

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

      \[\leadsto \frac{\color{blue}{1}}{\sqrt{\frac{x + 1}{-1 + x}}} \]
    5. metadata-eval42.0%

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

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

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

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

    \[\leadsto \color{blue}{\sqrt{\frac{x + -1}{x + 1}}} \]
  8. Final simplification42.0%

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

Alternative 10: 76.1% accurate, 45.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \left(1 + \frac{-1}{x}\right) \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m) :precision binary64 (* t_s (+ 1.0 (/ -1.0 x))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	return t_s * (1.0 + (-1.0 / x));
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    code = t_s * (1.0d0 + ((-1.0d0) / x))
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	return t_s * (1.0 + (-1.0 / x));
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	return t_s * (1.0 + (-1.0 / x))
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	return Float64(t_s * Float64(1.0 + Float64(-1.0 / x)))
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, l_m, t_m)
	tmp = t_s * (1.0 + (-1.0 / x));
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \left(1 + \frac{-1}{x}\right)
\end{array}
Derivation
  1. Initial program 29.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. Simplified29.0%

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

    \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
  4. Step-by-step derivation
    1. +-commutative42.0%

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

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

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    4. +-commutative42.0%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}} \]
  5. Simplified42.0%

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

    \[\leadsto \color{blue}{1 - \frac{1}{x}} \]
  7. Final simplification41.6%

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

Alternative 11: 75.4% accurate, 225.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot 1 \end{array} \]
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m) :precision binary64 (* t_s 1.0))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	return t_s * 1.0;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    code = t_s * 1.0d0
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	return t_s * 1.0;
}
l_m = math.fabs(l)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	return t_s * 1.0
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	return Float64(t_s * 1.0)
end
l_m = abs(l);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, l_m, t_m)
	tmp = t_s * 1.0;
end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * 1.0), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot 1
\end{array}
Derivation
  1. Initial program 29.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. Simplified29.0%

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

    \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
  4. Step-by-step derivation
    1. +-commutative42.0%

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

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

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{x + \color{blue}{-1}}}} \]
    4. +-commutative42.0%

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{\color{blue}{-1 + x}}}} \]
  5. Simplified42.0%

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

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

    \[\leadsto 1 \]

Reproduce

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