Toniolo and Linder, Equation (7)

Percentage Accurate: 33.2% → 81.9%
Time: 22.9s
Alternatives: 12
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 12 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.2% 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: 81.9% accurate, 0.2× 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}{x + -1}\\ t_3 := \frac{\sqrt{2} \cdot t\_m}{\sqrt{\left(l\_m \cdot l\_m + 2 \cdot \left(t\_m \cdot t\_m\right)\right) \cdot t\_2 - l\_m \cdot l\_m}}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;1 + \frac{-1 - \frac{-0.5}{x}}{x}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\mathsf{fma}\left(2, {t\_m}^{2} \cdot t\_2, \frac{\frac{2 \cdot {l\_m}^{2} - \frac{-2 \cdot \left({l\_m}^{2} + \frac{{l\_m}^{2}}{x}\right)}{x}}{x} - {l\_m}^{2} \cdot -2}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{l\_m} \cdot \left(t\_m \cdot \sqrt{x}\right)\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (let* ((t_2 (/ (+ x 1.0) (+ x -1.0)))
        (t_3
         (/
          (* (sqrt 2.0) t_m)
          (sqrt (- (* (+ (* l_m l_m) (* 2.0 (* t_m t_m))) t_2) (* l_m l_m))))))
   (*
    t_s
    (if (<= t_3 0.0)
      (+ 1.0 (/ (- -1.0 (/ -0.5 x)) x))
      (if (<= t_3 INFINITY)
        (*
         (sqrt 2.0)
         (/
          t_m
          (sqrt
           (fma
            2.0
            (* (pow t_m 2.0) t_2)
            (/
             (-
              (/
               (-
                (* 2.0 (pow l_m 2.0))
                (/ (* -2.0 (+ (pow l_m 2.0) (/ (pow l_m 2.0) x))) x))
               x)
              (* (pow l_m 2.0) -2.0))
             x)))))
        (* (/ 1.0 l_m) (* t_m (sqrt 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 t_2 = (x + 1.0) / (x + -1.0);
	double t_3 = (sqrt(2.0) * t_m) / sqrt(((((l_m * l_m) + (2.0 * (t_m * t_m))) * t_2) - (l_m * l_m)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = 1.0 + ((-1.0 - (-0.5 / x)) / x);
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt(2.0) * (t_m / sqrt(fma(2.0, (pow(t_m, 2.0) * t_2), (((((2.0 * pow(l_m, 2.0)) - ((-2.0 * (pow(l_m, 2.0) + (pow(l_m, 2.0) / x))) / x)) / x) - (pow(l_m, 2.0) * -2.0)) / x))));
	} else {
		tmp = (1.0 / l_m) * (t_m * sqrt(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)
	t_2 = Float64(Float64(x + 1.0) / Float64(x + -1.0))
	t_3 = Float64(Float64(sqrt(2.0) * t_m) / sqrt(Float64(Float64(Float64(Float64(l_m * l_m) + Float64(2.0 * Float64(t_m * t_m))) * t_2) - Float64(l_m * l_m))))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(1.0 + Float64(Float64(-1.0 - Float64(-0.5 / x)) / x));
	elseif (t_3 <= Inf)
		tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(fma(2.0, Float64((t_m ^ 2.0) * t_2), Float64(Float64(Float64(Float64(Float64(2.0 * (l_m ^ 2.0)) - Float64(Float64(-2.0 * Float64((l_m ^ 2.0) + Float64((l_m ^ 2.0) / x))) / x)) / x) - Float64((l_m ^ 2.0) * -2.0)) / x)))));
	else
		tmp = Float64(Float64(1.0 / l_m) * Float64(t_m * sqrt(x)));
	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[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] - N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$3, 0.0], N[(1.0 + N[(N[(-1.0 - N[(-0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], 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[(N[(N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] - N[(N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] + N[(N[Power[l$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - N[(N[Power[l$95$m, 2.0], $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / l$95$m), $MachinePrecision] * N[(t$95$m * N[Sqrt[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)

\\
\begin{array}{l}
t_2 := \frac{x + 1}{x + -1}\\
t_3 := \frac{\sqrt{2} \cdot t\_m}{\sqrt{\left(l\_m \cdot l\_m + 2 \cdot \left(t\_m \cdot t\_m\right)\right) \cdot t\_2 - l\_m \cdot l\_m}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;1 + \frac{-1 - \frac{-0.5}{x}}{x}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\mathsf{fma}\left(2, {t\_m}^{2} \cdot t\_2, \frac{\frac{2 \cdot {l\_m}^{2} - \frac{-2 \cdot \left({l\_m}^{2} + \frac{{l\_m}^{2}}{x}\right)}{x}}{x} - {l\_m}^{2} \cdot -2}{x}\right)}}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{l\_m} \cdot \left(t\_m \cdot \sqrt{x}\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l l)))) < 0.0

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

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

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

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

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

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

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

    if 0.0 < (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l l)))) < +inf.0

    1. Initial program 53.5%

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

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

      \[\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)}}} \]
    5. Step-by-step derivation
      1. fma-define52.3%

        \[\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*67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l 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{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 3.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(t \cdot \left(\sqrt{0.5} \cdot \sqrt{2}\right)\right) \cdot \sqrt{x}}{\ell}} \]
      2. clear-num49.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{\ell}{t \cdot \sqrt{x}}}} \]
    10. Step-by-step derivation
      1. associate-/r/50.0%

        \[\leadsto \color{blue}{\frac{1}{\ell} \cdot \left(t \cdot \sqrt{x}\right)} \]
    11. Simplified50.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x + -1} - \ell \cdot \ell}} \leq 0:\\ \;\;\;\;1 + \frac{-1 - \frac{-0.5}{x}}{x}\\ \mathbf{elif}\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x + -1} - \ell \cdot \ell}} \leq \infty:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(2, {t}^{2} \cdot \frac{x + 1}{x + -1}, \frac{\frac{2 \cdot {\ell}^{2} - \frac{-2 \cdot \left({\ell}^{2} + \frac{{\ell}^{2}}{x}\right)}{x}}{x} - {\ell}^{2} \cdot -2}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\ell} \cdot \left(t \cdot \sqrt{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 81.9% accurate, 0.2× 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}{x + -1}\\ t_3 := \frac{\sqrt{2} \cdot t\_m}{\sqrt{\left(l\_m \cdot l\_m + 2 \cdot \left(t\_m \cdot t\_m\right)\right) \cdot t\_2 - l\_m \cdot l\_m}}\\ t_4 := 2 \cdot {t\_m}^{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_3 \leq 2:\\ \;\;\;\;{t\_2}^{-0.5}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\left(2 \cdot \frac{{t\_m}^{2}}{x} + \left(\frac{{l\_m}^{2}}{x} + t\_4\right)\right) + \frac{{l\_m}^{2} + t\_4}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{l\_m} \cdot \left(t\_m \cdot \sqrt{x}\right)\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (let* ((t_2 (/ (+ x 1.0) (+ x -1.0)))
        (t_3
         (/
          (* (sqrt 2.0) t_m)
          (sqrt (- (* (+ (* l_m l_m) (* 2.0 (* t_m t_m))) t_2) (* l_m l_m)))))
        (t_4 (* 2.0 (pow t_m 2.0))))
   (*
    t_s
    (if (<= t_3 2.0)
      (pow t_2 -0.5)
      (if (<= t_3 INFINITY)
        (*
         (sqrt 2.0)
         (/
          t_m
          (sqrt
           (+
            (+ (* 2.0 (/ (pow t_m 2.0) x)) (+ (/ (pow l_m 2.0) x) t_4))
            (/ (+ (pow l_m 2.0) t_4) x)))))
        (* (/ 1.0 l_m) (* t_m (sqrt 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 t_2 = (x + 1.0) / (x + -1.0);
	double t_3 = (sqrt(2.0) * t_m) / sqrt(((((l_m * l_m) + (2.0 * (t_m * t_m))) * t_2) - (l_m * l_m)));
	double t_4 = 2.0 * pow(t_m, 2.0);
	double tmp;
	if (t_3 <= 2.0) {
		tmp = pow(t_2, -0.5);
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt(2.0) * (t_m / sqrt((((2.0 * (pow(t_m, 2.0) / x)) + ((pow(l_m, 2.0) / x) + t_4)) + ((pow(l_m, 2.0) + t_4) / x))));
	} else {
		tmp = (1.0 / l_m) * (t_m * sqrt(x));
	}
	return t_s * tmp;
}
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 t_2 = (x + 1.0) / (x + -1.0);
	double t_3 = (Math.sqrt(2.0) * t_m) / Math.sqrt(((((l_m * l_m) + (2.0 * (t_m * t_m))) * t_2) - (l_m * l_m)));
	double t_4 = 2.0 * Math.pow(t_m, 2.0);
	double tmp;
	if (t_3 <= 2.0) {
		tmp = Math.pow(t_2, -0.5);
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt(2.0) * (t_m / Math.sqrt((((2.0 * (Math.pow(t_m, 2.0) / x)) + ((Math.pow(l_m, 2.0) / x) + t_4)) + ((Math.pow(l_m, 2.0) + t_4) / x))));
	} else {
		tmp = (1.0 / l_m) * (t_m * Math.sqrt(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):
	t_2 = (x + 1.0) / (x + -1.0)
	t_3 = (math.sqrt(2.0) * t_m) / math.sqrt(((((l_m * l_m) + (2.0 * (t_m * t_m))) * t_2) - (l_m * l_m)))
	t_4 = 2.0 * math.pow(t_m, 2.0)
	tmp = 0
	if t_3 <= 2.0:
		tmp = math.pow(t_2, -0.5)
	elif t_3 <= math.inf:
		tmp = math.sqrt(2.0) * (t_m / math.sqrt((((2.0 * (math.pow(t_m, 2.0) / x)) + ((math.pow(l_m, 2.0) / x) + t_4)) + ((math.pow(l_m, 2.0) + t_4) / x))))
	else:
		tmp = (1.0 / l_m) * (t_m * math.sqrt(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)
	t_2 = Float64(Float64(x + 1.0) / Float64(x + -1.0))
	t_3 = Float64(Float64(sqrt(2.0) * t_m) / sqrt(Float64(Float64(Float64(Float64(l_m * l_m) + Float64(2.0 * Float64(t_m * t_m))) * t_2) - Float64(l_m * l_m))))
	t_4 = Float64(2.0 * (t_m ^ 2.0))
	tmp = 0.0
	if (t_3 <= 2.0)
		tmp = t_2 ^ -0.5;
	elseif (t_3 <= Inf)
		tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(Float64(Float64(Float64(2.0 * Float64((t_m ^ 2.0) / x)) + Float64(Float64((l_m ^ 2.0) / x) + t_4)) + Float64(Float64((l_m ^ 2.0) + t_4) / x)))));
	else
		tmp = Float64(Float64(1.0 / l_m) * Float64(t_m * sqrt(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)
	t_2 = (x + 1.0) / (x + -1.0);
	t_3 = (sqrt(2.0) * t_m) / sqrt(((((l_m * l_m) + (2.0 * (t_m * t_m))) * t_2) - (l_m * l_m)));
	t_4 = 2.0 * (t_m ^ 2.0);
	tmp = 0.0;
	if (t_3 <= 2.0)
		tmp = t_2 ^ -0.5;
	elseif (t_3 <= Inf)
		tmp = sqrt(2.0) * (t_m / sqrt((((2.0 * ((t_m ^ 2.0) / x)) + (((l_m ^ 2.0) / x) + t_4)) + (((l_m ^ 2.0) + t_4) / x))));
	else
		tmp = (1.0 / l_m) * (t_m * sqrt(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_] := Block[{t$95$2 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] - N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$3, 2.0], N[Power[t$95$2, -0.5], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] + t$95$4), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / l$95$m), $MachinePrecision] * N[(t$95$m * N[Sqrt[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)

\\
\begin{array}{l}
t_2 := \frac{x + 1}{x + -1}\\
t_3 := \frac{\sqrt{2} \cdot t\_m}{\sqrt{\left(l\_m \cdot l\_m + 2 \cdot \left(t\_m \cdot t\_m\right)\right) \cdot t\_2 - l\_m \cdot l\_m}}\\
t_4 := 2 \cdot {t\_m}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq 2:\\
\;\;\;\;{t\_2}^{-0.5}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\left(2 \cdot \frac{{t\_m}^{2}}{x} + \left(\frac{{l\_m}^{2}}{x} + t\_4\right)\right) + \frac{{l\_m}^{2} + t\_4}{x}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{l\_m} \cdot \left(t\_m \cdot \sqrt{x}\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l l)))) < 2

    1. Initial program 43.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \frac{1}{-\sqrt{\frac{\color{blue}{1 + x}}{x + -1}}} \]
    9. Applied egg-rr49.6%

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

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

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

        \[\leadsto -\left(-\color{blue}{{\left(\sqrt{\frac{1 + x}{x + -1}}\right)}^{-1}}\right) \]
      4. remove-double-neg49.6%

        \[\leadsto \color{blue}{{\left(\sqrt{\frac{1 + x}{x + -1}}\right)}^{-1}} \]
      5. rem-exp-log24.4%

        \[\leadsto {\left(\sqrt{\frac{\color{blue}{e^{\log \left(1 + x\right)}}}{x + -1}}\right)}^{-1} \]
      6. log1p-undefine24.4%

        \[\leadsto {\left(\sqrt{\frac{e^{\color{blue}{\mathsf{log1p}\left(x\right)}}}{x + -1}}\right)}^{-1} \]
      7. rem-exp-log26.1%

        \[\leadsto {\left(\sqrt{\frac{e^{\mathsf{log1p}\left(x\right)}}{\color{blue}{e^{\log \left(x + -1\right)}}}}\right)}^{-1} \]
      8. exp-diff26.1%

        \[\leadsto {\left(\sqrt{\color{blue}{e^{\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)}}}\right)}^{-1} \]
      9. unpow1/226.1%

        \[\leadsto {\color{blue}{\left({\left(e^{\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)}\right)}^{0.5}\right)}}^{-1} \]
      10. exp-prod26.1%

        \[\leadsto {\color{blue}{\left(e^{\left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right) \cdot 0.5}\right)}}^{-1} \]
      11. *-commutative26.1%

        \[\leadsto {\left(e^{\color{blue}{0.5 \cdot \left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right)}}\right)}^{-1} \]
      12. exp-prod26.1%

        \[\leadsto \color{blue}{e^{\left(0.5 \cdot \left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right)\right) \cdot -1}} \]
      13. *-commutative26.1%

        \[\leadsto e^{\color{blue}{\left(\left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right) \cdot 0.5\right)} \cdot -1} \]
      14. associate-*l*26.1%

        \[\leadsto e^{\color{blue}{\left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right) \cdot \left(0.5 \cdot -1\right)}} \]
      15. metadata-eval26.1%

        \[\leadsto e^{\left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right) \cdot \color{blue}{-0.5}} \]
    11. Simplified49.7%

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

    if 2 < (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l l)))) < +inf.0

    1. Initial program 2.7%

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

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

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

    if +inf.0 < (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l 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{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 3.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(t \cdot \left(\sqrt{0.5} \cdot \sqrt{2}\right)\right) \cdot \sqrt{x}}{\ell}} \]
      2. clear-num49.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{\ell}{t \cdot \sqrt{x}}}} \]
    10. Step-by-step derivation
      1. associate-/r/50.0%

        \[\leadsto \color{blue}{\frac{1}{\ell} \cdot \left(t \cdot \sqrt{x}\right)} \]
    11. Simplified50.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x + -1} - \ell \cdot \ell}} \leq 2:\\ \;\;\;\;{\left(\frac{x + 1}{x + -1}\right)}^{-0.5}\\ \mathbf{elif}\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x + -1} - \ell \cdot \ell}} \leq \infty:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(\frac{{\ell}^{2}}{x} + 2 \cdot {t}^{2}\right)\right) + \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\ell} \cdot \left(t \cdot \sqrt{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 82.0% accurate, 0.2× 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}{x + -1}\\ t_3 := \frac{\sqrt{2} \cdot t\_m}{\sqrt{\left(l\_m \cdot l\_m + 2 \cdot \left(t\_m \cdot t\_m\right)\right) \cdot t\_2 - l\_m \cdot l\_m}}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_3 \leq 2:\\ \;\;\;\;{t\_2}^{-0.5}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\mathsf{fma}\left(2, {t\_m}^{2} \cdot t\_2, \frac{2 \cdot {l\_m}^{2}}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{l\_m} \cdot \left(t\_m \cdot \sqrt{x}\right)\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (let* ((t_2 (/ (+ x 1.0) (+ x -1.0)))
        (t_3
         (/
          (* (sqrt 2.0) t_m)
          (sqrt (- (* (+ (* l_m l_m) (* 2.0 (* t_m t_m))) t_2) (* l_m l_m))))))
   (*
    t_s
    (if (<= t_3 2.0)
      (pow t_2 -0.5)
      (if (<= t_3 INFINITY)
        (*
         (sqrt 2.0)
         (/
          t_m
          (sqrt (fma 2.0 (* (pow t_m 2.0) t_2) (/ (* 2.0 (pow l_m 2.0)) x)))))
        (* (/ 1.0 l_m) (* t_m (sqrt 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 t_2 = (x + 1.0) / (x + -1.0);
	double t_3 = (sqrt(2.0) * t_m) / sqrt(((((l_m * l_m) + (2.0 * (t_m * t_m))) * t_2) - (l_m * l_m)));
	double tmp;
	if (t_3 <= 2.0) {
		tmp = pow(t_2, -0.5);
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt(2.0) * (t_m / sqrt(fma(2.0, (pow(t_m, 2.0) * t_2), ((2.0 * pow(l_m, 2.0)) / x))));
	} else {
		tmp = (1.0 / l_m) * (t_m * sqrt(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)
	t_2 = Float64(Float64(x + 1.0) / Float64(x + -1.0))
	t_3 = Float64(Float64(sqrt(2.0) * t_m) / sqrt(Float64(Float64(Float64(Float64(l_m * l_m) + Float64(2.0 * Float64(t_m * t_m))) * t_2) - Float64(l_m * l_m))))
	tmp = 0.0
	if (t_3 <= 2.0)
		tmp = t_2 ^ -0.5;
	elseif (t_3 <= Inf)
		tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(fma(2.0, Float64((t_m ^ 2.0) * t_2), Float64(Float64(2.0 * (l_m ^ 2.0)) / x)))));
	else
		tmp = Float64(Float64(1.0 / l_m) * Float64(t_m * sqrt(x)));
	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[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] - N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$3, 2.0], N[Power[t$95$2, -0.5], $MachinePrecision], If[LessEqual[t$95$3, Infinity], 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[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / l$95$m), $MachinePrecision] * N[(t$95$m * N[Sqrt[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)

\\
\begin{array}{l}
t_2 := \frac{x + 1}{x + -1}\\
t_3 := \frac{\sqrt{2} \cdot t\_m}{\sqrt{\left(l\_m \cdot l\_m + 2 \cdot \left(t\_m \cdot t\_m\right)\right) \cdot t\_2 - l\_m \cdot l\_m}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq 2:\\
\;\;\;\;{t\_2}^{-0.5}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\mathsf{fma}\left(2, {t\_m}^{2} \cdot t\_2, \frac{2 \cdot {l\_m}^{2}}{x}\right)}}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{l\_m} \cdot \left(t\_m \cdot \sqrt{x}\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l l)))) < 2

    1. Initial program 43.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \frac{1}{-\sqrt{\frac{\color{blue}{1 + x}}{x + -1}}} \]
    9. Applied egg-rr49.6%

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

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

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

        \[\leadsto -\left(-\color{blue}{{\left(\sqrt{\frac{1 + x}{x + -1}}\right)}^{-1}}\right) \]
      4. remove-double-neg49.6%

        \[\leadsto \color{blue}{{\left(\sqrt{\frac{1 + x}{x + -1}}\right)}^{-1}} \]
      5. rem-exp-log24.4%

        \[\leadsto {\left(\sqrt{\frac{\color{blue}{e^{\log \left(1 + x\right)}}}{x + -1}}\right)}^{-1} \]
      6. log1p-undefine24.4%

        \[\leadsto {\left(\sqrt{\frac{e^{\color{blue}{\mathsf{log1p}\left(x\right)}}}{x + -1}}\right)}^{-1} \]
      7. rem-exp-log26.1%

        \[\leadsto {\left(\sqrt{\frac{e^{\mathsf{log1p}\left(x\right)}}{\color{blue}{e^{\log \left(x + -1\right)}}}}\right)}^{-1} \]
      8. exp-diff26.1%

        \[\leadsto {\left(\sqrt{\color{blue}{e^{\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)}}}\right)}^{-1} \]
      9. unpow1/226.1%

        \[\leadsto {\color{blue}{\left({\left(e^{\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)}\right)}^{0.5}\right)}}^{-1} \]
      10. exp-prod26.1%

        \[\leadsto {\color{blue}{\left(e^{\left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right) \cdot 0.5}\right)}}^{-1} \]
      11. *-commutative26.1%

        \[\leadsto {\left(e^{\color{blue}{0.5 \cdot \left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right)}}\right)}^{-1} \]
      12. exp-prod26.1%

        \[\leadsto \color{blue}{e^{\left(0.5 \cdot \left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right)\right) \cdot -1}} \]
      13. *-commutative26.1%

        \[\leadsto e^{\color{blue}{\left(\left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right) \cdot 0.5\right)} \cdot -1} \]
      14. associate-*l*26.1%

        \[\leadsto e^{\color{blue}{\left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right) \cdot \left(0.5 \cdot -1\right)}} \]
      15. metadata-eval26.1%

        \[\leadsto e^{\left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right) \cdot \color{blue}{-0.5}} \]
    11. Simplified49.7%

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

    if 2 < (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l l)))) < +inf.0

    1. Initial program 2.7%

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

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

      \[\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)}}} \]
    5. Step-by-step derivation
      1. fma-define25.9%

        \[\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*30.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l 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{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 3.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(t \cdot \left(\sqrt{0.5} \cdot \sqrt{2}\right)\right) \cdot \sqrt{x}}{\ell}} \]
      2. clear-num49.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{\ell}{t \cdot \sqrt{x}}}} \]
    10. Step-by-step derivation
      1. associate-/r/50.0%

        \[\leadsto \color{blue}{\frac{1}{\ell} \cdot \left(t \cdot \sqrt{x}\right)} \]
    11. Simplified50.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x + -1} - \ell \cdot \ell}} \leq 2:\\ \;\;\;\;{\left(\frac{x + 1}{x + -1}\right)}^{-0.5}\\ \mathbf{elif}\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x + -1} - \ell \cdot \ell}} \leq \infty:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\mathsf{fma}\left(2, {t}^{2} \cdot \frac{x + 1}{x + -1}, \frac{2 \cdot {\ell}^{2}}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\ell} \cdot \left(t \cdot \sqrt{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 79.9% accurate, 0.7× 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}{x + -1}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{\sqrt{2} \cdot t\_m}{\sqrt{\left(l\_m \cdot l\_m + 2 \cdot \left(t\_m \cdot t\_m\right)\right) \cdot t\_2 - l\_m \cdot l\_m}} \leq \infty:\\ \;\;\;\;{t\_2}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{l\_m} \cdot \left(t\_m \cdot \sqrt{x}\right)\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (let* ((t_2 (/ (+ x 1.0) (+ x -1.0))))
   (*
    t_s
    (if (<=
         (/
          (* (sqrt 2.0) t_m)
          (sqrt (- (* (+ (* l_m l_m) (* 2.0 (* t_m t_m))) t_2) (* l_m l_m))))
         INFINITY)
      (pow t_2 -0.5)
      (* (/ 1.0 l_m) (* t_m (sqrt 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 t_2 = (x + 1.0) / (x + -1.0);
	double tmp;
	if (((sqrt(2.0) * t_m) / sqrt(((((l_m * l_m) + (2.0 * (t_m * t_m))) * t_2) - (l_m * l_m)))) <= ((double) INFINITY)) {
		tmp = pow(t_2, -0.5);
	} else {
		tmp = (1.0 / l_m) * (t_m * sqrt(x));
	}
	return t_s * tmp;
}
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 t_2 = (x + 1.0) / (x + -1.0);
	double tmp;
	if (((Math.sqrt(2.0) * t_m) / Math.sqrt(((((l_m * l_m) + (2.0 * (t_m * t_m))) * t_2) - (l_m * l_m)))) <= Double.POSITIVE_INFINITY) {
		tmp = Math.pow(t_2, -0.5);
	} else {
		tmp = (1.0 / l_m) * (t_m * Math.sqrt(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):
	t_2 = (x + 1.0) / (x + -1.0)
	tmp = 0
	if ((math.sqrt(2.0) * t_m) / math.sqrt(((((l_m * l_m) + (2.0 * (t_m * t_m))) * t_2) - (l_m * l_m)))) <= math.inf:
		tmp = math.pow(t_2, -0.5)
	else:
		tmp = (1.0 / l_m) * (t_m * math.sqrt(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)
	t_2 = Float64(Float64(x + 1.0) / Float64(x + -1.0))
	tmp = 0.0
	if (Float64(Float64(sqrt(2.0) * t_m) / sqrt(Float64(Float64(Float64(Float64(l_m * l_m) + Float64(2.0 * Float64(t_m * t_m))) * t_2) - Float64(l_m * l_m)))) <= Inf)
		tmp = t_2 ^ -0.5;
	else
		tmp = Float64(Float64(1.0 / l_m) * Float64(t_m * sqrt(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)
	t_2 = (x + 1.0) / (x + -1.0);
	tmp = 0.0;
	if (((sqrt(2.0) * t_m) / sqrt(((((l_m * l_m) + (2.0 * (t_m * t_m))) * t_2) - (l_m * l_m)))) <= Inf)
		tmp = t_2 ^ -0.5;
	else
		tmp = (1.0 / l_m) * (t_m * sqrt(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_] := Block[{t$95$2 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] - N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], Infinity], N[Power[t$95$2, -0.5], $MachinePrecision], N[(N[(1.0 / l$95$m), $MachinePrecision] * N[(t$95$m * N[Sqrt[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)

\\
\begin{array}{l}
t_2 := \frac{x + 1}{x + -1}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sqrt{2} \cdot t\_m}{\sqrt{\left(l\_m \cdot l\_m + 2 \cdot \left(t\_m \cdot t\_m\right)\right) \cdot t\_2 - l\_m \cdot l\_m}} \leq \infty:\\
\;\;\;\;{t\_2}^{-0.5}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{l\_m} \cdot \left(t\_m \cdot \sqrt{x}\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l l)))) < +inf.0

    1. Initial program 35.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-1}}{-\sqrt{\frac{x + 1}{x + -1}}} \]
      3. div-inv50.0%

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

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

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

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

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

        \[\leadsto -\left(-\color{blue}{{\left(\sqrt{\frac{1 + x}{x + -1}}\right)}^{-1}}\right) \]
      4. remove-double-neg50.0%

        \[\leadsto \color{blue}{{\left(\sqrt{\frac{1 + x}{x + -1}}\right)}^{-1}} \]
      5. rem-exp-log25.1%

        \[\leadsto {\left(\sqrt{\frac{\color{blue}{e^{\log \left(1 + x\right)}}}{x + -1}}\right)}^{-1} \]
      6. log1p-undefine25.1%

        \[\leadsto {\left(\sqrt{\frac{e^{\color{blue}{\mathsf{log1p}\left(x\right)}}}{x + -1}}\right)}^{-1} \]
      7. rem-exp-log27.0%

        \[\leadsto {\left(\sqrt{\frac{e^{\mathsf{log1p}\left(x\right)}}{\color{blue}{e^{\log \left(x + -1\right)}}}}\right)}^{-1} \]
      8. exp-diff27.0%

        \[\leadsto {\left(\sqrt{\color{blue}{e^{\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)}}}\right)}^{-1} \]
      9. unpow1/227.0%

        \[\leadsto {\color{blue}{\left({\left(e^{\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)}\right)}^{0.5}\right)}}^{-1} \]
      10. exp-prod27.0%

        \[\leadsto {\color{blue}{\left(e^{\left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right) \cdot 0.5}\right)}}^{-1} \]
      11. *-commutative27.0%

        \[\leadsto {\left(e^{\color{blue}{0.5 \cdot \left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right)}}\right)}^{-1} \]
      12. exp-prod27.0%

        \[\leadsto \color{blue}{e^{\left(0.5 \cdot \left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right)\right) \cdot -1}} \]
      13. *-commutative27.0%

        \[\leadsto e^{\color{blue}{\left(\left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right) \cdot 0.5\right)} \cdot -1} \]
      14. associate-*l*27.0%

        \[\leadsto e^{\color{blue}{\left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right) \cdot \left(0.5 \cdot -1\right)}} \]
      15. metadata-eval27.0%

        \[\leadsto e^{\left(\mathsf{log1p}\left(x\right) - \log \left(x + -1\right)\right) \cdot \color{blue}{-0.5}} \]
    11. Simplified50.0%

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

    if +inf.0 < (/.f64 (*.f64 (sqrt.f64 #s(literal 2 binary64)) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x #s(literal 1 binary64)) (-.f64 x #s(literal 1 binary64))) (+.f64 (*.f64 l l) (*.f64 #s(literal 2 binary64) (*.f64 t t)))) (*.f64 l 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{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 3.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(t \cdot \left(\sqrt{0.5} \cdot \sqrt{2}\right)\right) \cdot \sqrt{x}}{\ell}} \]
      2. clear-num49.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{\ell}{t \cdot \sqrt{x}}}} \]
    10. Step-by-step derivation
      1. associate-/r/50.0%

        \[\leadsto \color{blue}{\frac{1}{\ell} \cdot \left(t \cdot \sqrt{x}\right)} \]
    11. Simplified50.0%

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

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

Alternative 5: 79.1% accurate, 1.8× 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.5 \cdot 10^{+48}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{elif}\;l\_m \leq 2.7 \cdot 10^{+55}:\\ \;\;\;\;\frac{\sqrt{x}}{\frac{l\_m}{t\_m}}\\ \mathbf{elif}\;l\_m \leq 1.9 \cdot 10^{+164}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;t\_m \cdot \frac{\sqrt{x}}{l\_m}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= l_m 2.5e+48)
    (+ 1.0 (/ -1.0 x))
    (if (<= l_m 2.7e+55)
      (/ (sqrt x) (/ l_m t_m))
      (if (<= l_m 1.9e+164)
        (sqrt (/ (+ x -1.0) (+ x 1.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 <= 2.5e+48) {
		tmp = 1.0 + (-1.0 / x);
	} else if (l_m <= 2.7e+55) {
		tmp = sqrt(x) / (l_m / t_m);
	} else if (l_m <= 1.9e+164) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = 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 <= 2.5d+48) then
        tmp = 1.0d0 + ((-1.0d0) / x)
    else if (l_m <= 2.7d+55) then
        tmp = sqrt(x) / (l_m / t_m)
    else if (l_m <= 1.9d+164) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else
        tmp = 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 <= 2.5e+48) {
		tmp = 1.0 + (-1.0 / x);
	} else if (l_m <= 2.7e+55) {
		tmp = Math.sqrt(x) / (l_m / t_m);
	} else if (l_m <= 1.9e+164) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = 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 <= 2.5e+48:
		tmp = 1.0 + (-1.0 / x)
	elif l_m <= 2.7e+55:
		tmp = math.sqrt(x) / (l_m / t_m)
	elif l_m <= 1.9e+164:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	else:
		tmp = 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 <= 2.5e+48)
		tmp = Float64(1.0 + Float64(-1.0 / x));
	elseif (l_m <= 2.7e+55)
		tmp = Float64(sqrt(x) / Float64(l_m / t_m));
	elseif (l_m <= 1.9e+164)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	else
		tmp = Float64(t_m * Float64(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 <= 2.5e+48)
		tmp = 1.0 + (-1.0 / x);
	elseif (l_m <= 2.7e+55)
		tmp = sqrt(x) / (l_m / t_m);
	elseif (l_m <= 1.9e+164)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	else
		tmp = 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, 2.5e+48], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 2.7e+55], N[(N[Sqrt[x], $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 1.9e+164], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$m * N[(N[Sqrt[x], $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 2.5 \cdot 10^{+48}:\\
\;\;\;\;1 + \frac{-1}{x}\\

\mathbf{elif}\;l\_m \leq 2.7 \cdot 10^{+55}:\\
\;\;\;\;\frac{\sqrt{x}}{\frac{l\_m}{t\_m}}\\

\mathbf{elif}\;l\_m \leq 1.9 \cdot 10^{+164}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{\sqrt{x}}{l\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < 2.49999999999999987e48

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

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

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

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

    if 2.49999999999999987e48 < l < 2.69999999999999977e55

    1. Initial program 1.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{x}}{\frac{\ell}{t \cdot \sqrt{\color{blue}{1}}}} \]
      6. metadata-eval100.0%

        \[\leadsto \frac{\sqrt{x}}{\frac{\ell}{t \cdot \color{blue}{1}}} \]
      7. *-rgt-identity100.0%

        \[\leadsto \frac{\sqrt{x}}{\frac{\ell}{\color{blue}{t}}} \]
    9. Applied egg-rr100.0%

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

    if 2.69999999999999977e55 < l < 1.90000000000000011e164

    1. Initial program 10.2%

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

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

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

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

    if 1.90000000000000011e164 < 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{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 6.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\sqrt{x}}{\ell} \cdot t} \]
    11. Applied egg-rr81.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.5 \cdot 10^{+48}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{elif}\;\ell \leq 2.7 \cdot 10^{+55}:\\ \;\;\;\;\frac{\sqrt{x}}{\frac{\ell}{t}}\\ \mathbf{elif}\;\ell \leq 1.9 \cdot 10^{+164}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 78.9% accurate, 1.8× 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.2 \cdot 10^{+48}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{elif}\;l\_m \leq 2.7 \cdot 10^{+55}:\\ \;\;\;\;\frac{\sqrt{x}}{\frac{l\_m}{t\_m}}\\ \mathbf{elif}\;l\_m \leq 3 \cdot 10^{+159}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{l\_m} \cdot \left(t\_m \cdot \sqrt{x}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= l_m 3.2e+48)
    (+ 1.0 (/ -1.0 x))
    (if (<= l_m 2.7e+55)
      (/ (sqrt x) (/ l_m t_m))
      (if (<= l_m 3e+159)
        (sqrt (/ (+ x -1.0) (+ x 1.0)))
        (* (/ 1.0 l_m) (* t_m (sqrt 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 <= 3.2e+48) {
		tmp = 1.0 + (-1.0 / x);
	} else if (l_m <= 2.7e+55) {
		tmp = sqrt(x) / (l_m / t_m);
	} else if (l_m <= 3e+159) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = (1.0 / l_m) * (t_m * sqrt(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 <= 3.2d+48) then
        tmp = 1.0d0 + ((-1.0d0) / x)
    else if (l_m <= 2.7d+55) then
        tmp = sqrt(x) / (l_m / t_m)
    else if (l_m <= 3d+159) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else
        tmp = (1.0d0 / l_m) * (t_m * sqrt(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 <= 3.2e+48) {
		tmp = 1.0 + (-1.0 / x);
	} else if (l_m <= 2.7e+55) {
		tmp = Math.sqrt(x) / (l_m / t_m);
	} else if (l_m <= 3e+159) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = (1.0 / l_m) * (t_m * Math.sqrt(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 <= 3.2e+48:
		tmp = 1.0 + (-1.0 / x)
	elif l_m <= 2.7e+55:
		tmp = math.sqrt(x) / (l_m / t_m)
	elif l_m <= 3e+159:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	else:
		tmp = (1.0 / l_m) * (t_m * math.sqrt(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 <= 3.2e+48)
		tmp = Float64(1.0 + Float64(-1.0 / x));
	elseif (l_m <= 2.7e+55)
		tmp = Float64(sqrt(x) / Float64(l_m / t_m));
	elseif (l_m <= 3e+159)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	else
		tmp = Float64(Float64(1.0 / l_m) * Float64(t_m * sqrt(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 <= 3.2e+48)
		tmp = 1.0 + (-1.0 / x);
	elseif (l_m <= 2.7e+55)
		tmp = sqrt(x) / (l_m / t_m);
	elseif (l_m <= 3e+159)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	else
		tmp = (1.0 / l_m) * (t_m * sqrt(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, 3.2e+48], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 2.7e+55], N[(N[Sqrt[x], $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 3e+159], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(1.0 / l$95$m), $MachinePrecision] * N[(t$95$m * N[Sqrt[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 3.2 \cdot 10^{+48}:\\
\;\;\;\;1 + \frac{-1}{x}\\

\mathbf{elif}\;l\_m \leq 2.7 \cdot 10^{+55}:\\
\;\;\;\;\frac{\sqrt{x}}{\frac{l\_m}{t\_m}}\\

\mathbf{elif}\;l\_m \leq 3 \cdot 10^{+159}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{l\_m} \cdot \left(t\_m \cdot \sqrt{x}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < 3.2000000000000001e48

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

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

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

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

    if 3.2000000000000001e48 < l < 2.69999999999999977e55

    1. Initial program 1.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{x}}{\frac{\ell}{t \cdot \sqrt{\color{blue}{1}}}} \]
      6. metadata-eval100.0%

        \[\leadsto \frac{\sqrt{x}}{\frac{\ell}{t \cdot \color{blue}{1}}} \]
      7. *-rgt-identity100.0%

        \[\leadsto \frac{\sqrt{x}}{\frac{\ell}{\color{blue}{t}}} \]
    9. Applied egg-rr100.0%

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

    if 2.69999999999999977e55 < l < 3.0000000000000002e159

    1. Initial program 10.2%

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

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

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

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

    if 3.0000000000000002e159 < 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{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 6.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(t \cdot \left(\sqrt{0.5} \cdot \sqrt{2}\right)\right) \cdot \sqrt{x}}{\ell}} \]
      2. clear-num80.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{\ell}{t \cdot \sqrt{x}}}} \]
    10. Step-by-step derivation
      1. associate-/r/81.3%

        \[\leadsto \color{blue}{\frac{1}{\ell} \cdot \left(t \cdot \sqrt{x}\right)} \]
    11. Simplified81.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.2 \cdot 10^{+48}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{elif}\;\ell \leq 2.7 \cdot 10^{+55}:\\ \;\;\;\;\frac{\sqrt{x}}{\frac{\ell}{t}}\\ \mathbf{elif}\;\ell \leq 3 \cdot 10^{+159}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\ell} \cdot \left(t \cdot \sqrt{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 79.0% accurate, 1.9× 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.2 \cdot 10^{+48}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{elif}\;l\_m \leq 2.7 \cdot 10^{+55}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t\_m}{l\_m}\\ \mathbf{elif}\;l\_m \leq 1.05 \cdot 10^{+160}:\\ \;\;\;\;1 + \frac{-1 - \frac{-0.5}{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;t\_m \cdot \frac{\sqrt{x}}{l\_m}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= l_m 3.2e+48)
    (+ 1.0 (/ -1.0 x))
    (if (<= l_m 2.7e+55)
      (* (sqrt x) (/ t_m l_m))
      (if (<= l_m 1.05e+160)
        (+ 1.0 (/ (- -1.0 (/ -0.5 x)) x))
        (* 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.2e+48) {
		tmp = 1.0 + (-1.0 / x);
	} else if (l_m <= 2.7e+55) {
		tmp = sqrt(x) * (t_m / l_m);
	} else if (l_m <= 1.05e+160) {
		tmp = 1.0 + ((-1.0 - (-0.5 / x)) / x);
	} else {
		tmp = 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.2d+48) then
        tmp = 1.0d0 + ((-1.0d0) / x)
    else if (l_m <= 2.7d+55) then
        tmp = sqrt(x) * (t_m / l_m)
    else if (l_m <= 1.05d+160) then
        tmp = 1.0d0 + (((-1.0d0) - ((-0.5d0) / x)) / x)
    else
        tmp = 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.2e+48) {
		tmp = 1.0 + (-1.0 / x);
	} else if (l_m <= 2.7e+55) {
		tmp = Math.sqrt(x) * (t_m / l_m);
	} else if (l_m <= 1.05e+160) {
		tmp = 1.0 + ((-1.0 - (-0.5 / x)) / x);
	} else {
		tmp = 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.2e+48:
		tmp = 1.0 + (-1.0 / x)
	elif l_m <= 2.7e+55:
		tmp = math.sqrt(x) * (t_m / l_m)
	elif l_m <= 1.05e+160:
		tmp = 1.0 + ((-1.0 - (-0.5 / x)) / x)
	else:
		tmp = 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.2e+48)
		tmp = Float64(1.0 + Float64(-1.0 / x));
	elseif (l_m <= 2.7e+55)
		tmp = Float64(sqrt(x) * Float64(t_m / l_m));
	elseif (l_m <= 1.05e+160)
		tmp = Float64(1.0 + Float64(Float64(-1.0 - Float64(-0.5 / x)) / x));
	else
		tmp = Float64(t_m * Float64(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.2e+48)
		tmp = 1.0 + (-1.0 / x);
	elseif (l_m <= 2.7e+55)
		tmp = sqrt(x) * (t_m / l_m);
	elseif (l_m <= 1.05e+160)
		tmp = 1.0 + ((-1.0 - (-0.5 / x)) / x);
	else
		tmp = 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.2e+48], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 2.7e+55], N[(N[Sqrt[x], $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 1.05e+160], N[(1.0 + N[(N[(-1.0 - N[(-0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$m * N[(N[Sqrt[x], $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.2 \cdot 10^{+48}:\\
\;\;\;\;1 + \frac{-1}{x}\\

\mathbf{elif}\;l\_m \leq 2.7 \cdot 10^{+55}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t\_m}{l\_m}\\

\mathbf{elif}\;l\_m \leq 1.05 \cdot 10^{+160}:\\
\;\;\;\;1 + \frac{-1 - \frac{-0.5}{x}}{x}\\

\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{\sqrt{x}}{l\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < 3.2000000000000001e48

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

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

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

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

    if 3.2000000000000001e48 < l < 2.69999999999999977e55

    1. Initial program 1.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(t \cdot \left(\sqrt{0.5} \cdot \sqrt{2}\right)\right) \cdot \sqrt{x}}{\ell}} \]
      2. clear-num100.0%

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

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

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

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

        \[\leadsto \frac{1}{\frac{\ell}{\color{blue}{t} \cdot \sqrt{x}}} \]
    9. Applied egg-rr98.4%

      \[\leadsto \color{blue}{\frac{1}{\frac{\ell}{t \cdot \sqrt{x}}}} \]
    10. Step-by-step derivation
      1. associate-/r/98.4%

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

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

        \[\leadsto \frac{\color{blue}{t \cdot \sqrt{x}}}{\ell} \]
      4. *-commutative98.4%

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

        \[\leadsto \color{blue}{\sqrt{x} \cdot \frac{t}{\ell}} \]
    11. Simplified98.4%

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

    if 2.69999999999999977e55 < l < 1.04999999999999998e160

    1. Initial program 10.2%

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

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

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

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

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

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

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

    if 1.04999999999999998e160 < 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{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 6.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\sqrt{x}}{\ell} \cdot t} \]
    11. Applied egg-rr81.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.2 \cdot 10^{+48}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{elif}\;\ell \leq 2.7 \cdot 10^{+55}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{elif}\;\ell \leq 1.05 \cdot 10^{+160}:\\ \;\;\;\;1 + \frac{-1 - \frac{-0.5}{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 79.0% accurate, 1.9× 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.2 \cdot 10^{+48}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{elif}\;l\_m \leq 8.4 \cdot 10^{+55}:\\ \;\;\;\;\frac{\sqrt{x}}{\frac{l\_m}{t\_m}}\\ \mathbf{elif}\;l\_m \leq 1.25 \cdot 10^{+164}:\\ \;\;\;\;1 + \frac{-1 - \frac{-0.5}{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;t\_m \cdot \frac{\sqrt{x}}{l\_m}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= l_m 3.2e+48)
    (+ 1.0 (/ -1.0 x))
    (if (<= l_m 8.4e+55)
      (/ (sqrt x) (/ l_m t_m))
      (if (<= l_m 1.25e+164)
        (+ 1.0 (/ (- -1.0 (/ -0.5 x)) x))
        (* 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.2e+48) {
		tmp = 1.0 + (-1.0 / x);
	} else if (l_m <= 8.4e+55) {
		tmp = sqrt(x) / (l_m / t_m);
	} else if (l_m <= 1.25e+164) {
		tmp = 1.0 + ((-1.0 - (-0.5 / x)) / x);
	} else {
		tmp = 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.2d+48) then
        tmp = 1.0d0 + ((-1.0d0) / x)
    else if (l_m <= 8.4d+55) then
        tmp = sqrt(x) / (l_m / t_m)
    else if (l_m <= 1.25d+164) then
        tmp = 1.0d0 + (((-1.0d0) - ((-0.5d0) / x)) / x)
    else
        tmp = 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.2e+48) {
		tmp = 1.0 + (-1.0 / x);
	} else if (l_m <= 8.4e+55) {
		tmp = Math.sqrt(x) / (l_m / t_m);
	} else if (l_m <= 1.25e+164) {
		tmp = 1.0 + ((-1.0 - (-0.5 / x)) / x);
	} else {
		tmp = 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.2e+48:
		tmp = 1.0 + (-1.0 / x)
	elif l_m <= 8.4e+55:
		tmp = math.sqrt(x) / (l_m / t_m)
	elif l_m <= 1.25e+164:
		tmp = 1.0 + ((-1.0 - (-0.5 / x)) / x)
	else:
		tmp = 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.2e+48)
		tmp = Float64(1.0 + Float64(-1.0 / x));
	elseif (l_m <= 8.4e+55)
		tmp = Float64(sqrt(x) / Float64(l_m / t_m));
	elseif (l_m <= 1.25e+164)
		tmp = Float64(1.0 + Float64(Float64(-1.0 - Float64(-0.5 / x)) / x));
	else
		tmp = Float64(t_m * Float64(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.2e+48)
		tmp = 1.0 + (-1.0 / x);
	elseif (l_m <= 8.4e+55)
		tmp = sqrt(x) / (l_m / t_m);
	elseif (l_m <= 1.25e+164)
		tmp = 1.0 + ((-1.0 - (-0.5 / x)) / x);
	else
		tmp = 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.2e+48], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 8.4e+55], N[(N[Sqrt[x], $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 1.25e+164], N[(1.0 + N[(N[(-1.0 - N[(-0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$m * N[(N[Sqrt[x], $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.2 \cdot 10^{+48}:\\
\;\;\;\;1 + \frac{-1}{x}\\

\mathbf{elif}\;l\_m \leq 8.4 \cdot 10^{+55}:\\
\;\;\;\;\frac{\sqrt{x}}{\frac{l\_m}{t\_m}}\\

\mathbf{elif}\;l\_m \leq 1.25 \cdot 10^{+164}:\\
\;\;\;\;1 + \frac{-1 - \frac{-0.5}{x}}{x}\\

\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{\sqrt{x}}{l\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < 3.2000000000000001e48

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

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

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

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

    if 3.2000000000000001e48 < l < 8.4000000000000002e55

    1. Initial program 1.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{x}}{\frac{\ell}{t \cdot \sqrt{\color{blue}{1}}}} \]
      6. metadata-eval100.0%

        \[\leadsto \frac{\sqrt{x}}{\frac{\ell}{t \cdot \color{blue}{1}}} \]
      7. *-rgt-identity100.0%

        \[\leadsto \frac{\sqrt{x}}{\frac{\ell}{\color{blue}{t}}} \]
    9. Applied egg-rr100.0%

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

    if 8.4000000000000002e55 < l < 1.24999999999999987e164

    1. Initial program 10.2%

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

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

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

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

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

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

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

    if 1.24999999999999987e164 < 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{\frac{x + 1}{x + -1} \cdot \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 6.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\sqrt{x}}{\ell} \cdot t} \]
    11. Applied egg-rr81.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.2 \cdot 10^{+48}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{elif}\;\ell \leq 8.4 \cdot 10^{+55}:\\ \;\;\;\;\frac{\sqrt{x}}{\frac{\ell}{t}}\\ \mathbf{elif}\;\ell \leq 1.25 \cdot 10^{+164}:\\ \;\;\;\;1 + \frac{-1 - \frac{-0.5}{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 78.9% accurate, 2.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}\;t\_m \leq 1.55 \cdot 10^{-157}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t\_m}{l\_m}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1 - \frac{-0.5}{x}}{x}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.55e-157)
    (* (sqrt x) (/ t_m l_m))
    (+ 1.0 (/ (- -1.0 (/ -0.5 x)) 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 (t_m <= 1.55e-157) {
		tmp = sqrt(x) * (t_m / l_m);
	} else {
		tmp = 1.0 + ((-1.0 - (-0.5 / x)) / 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 (t_m <= 1.55d-157) then
        tmp = sqrt(x) * (t_m / l_m)
    else
        tmp = 1.0d0 + (((-1.0d0) - ((-0.5d0) / x)) / 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 (t_m <= 1.55e-157) {
		tmp = Math.sqrt(x) * (t_m / l_m);
	} else {
		tmp = 1.0 + ((-1.0 - (-0.5 / x)) / 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 t_m <= 1.55e-157:
		tmp = math.sqrt(x) * (t_m / l_m)
	else:
		tmp = 1.0 + ((-1.0 - (-0.5 / x)) / 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 (t_m <= 1.55e-157)
		tmp = Float64(sqrt(x) * Float64(t_m / l_m));
	else
		tmp = Float64(1.0 + Float64(Float64(-1.0 - Float64(-0.5 / x)) / 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 (t_m <= 1.55e-157)
		tmp = sqrt(x) * (t_m / l_m);
	else
		tmp = 1.0 + ((-1.0 - (-0.5 / x)) / 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[t$95$m, 1.55e-157], N[(N[Sqrt[x], $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 - N[(-0.5 / x), $MachinePrecision]), $MachinePrecision] / 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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.55 \cdot 10^{-157}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t\_m}{l\_m}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{\ell}{\color{blue}{t} \cdot \sqrt{x}}} \]
    9. Applied egg-rr22.6%

      \[\leadsto \color{blue}{\frac{1}{\frac{\ell}{t \cdot \sqrt{x}}}} \]
    10. Step-by-step derivation
      1. associate-/r/22.6%

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

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

        \[\leadsto \frac{\color{blue}{t \cdot \sqrt{x}}}{\ell} \]
      4. *-commutative22.6%

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

        \[\leadsto \color{blue}{\sqrt{x} \cdot \frac{t}{\ell}} \]
    11. Simplified22.0%

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

    if 1.5499999999999999e-157 < t

    1. Initial program 37.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.55 \cdot 10^{-157}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1 - \frac{-0.5}{x}}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 77.0% accurate, 25.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 - \frac{-0.5}{x}}{x}\right) \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l_m t_m)
 :precision binary64
 (* t_s (+ 1.0 (/ (- -1.0 (/ -0.5 x)) 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 - (-0.5 / x)) / 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) - ((-0.5d0) / x)) / 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 - (-0.5 / x)) / 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 - (-0.5 / x)) / 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(Float64(-1.0 - Float64(-0.5 / x)) / 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 - (-0.5 / x)) / 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[(N[(-1.0 - N[(-0.5 / x), $MachinePrecision]), $MachinePrecision] / 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 - \frac{-0.5}{x}}{x}\right)
\end{array}
Derivation
  1. Initial program 28.7%

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

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

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

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

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

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

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

    \[\leadsto 1 + \frac{-1 - \frac{-0.5}{x}}{x} \]
  9. Add Preprocessing

Alternative 11: 76.8% 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 #s(literal 1 binary64) 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 28.7%

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

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

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

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

    \[\leadsto 1 + \frac{-1}{x} \]
  7. Add Preprocessing

Alternative 12: 76.1% 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 #s(literal 1 binary64) 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 28.7%

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

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

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

    \[\leadsto \color{blue}{1} \]
  6. Final simplification44.7%

    \[\leadsto 1 \]
  7. Add Preprocessing

Reproduce

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