Toniolo and Linder, Equation (7)

Percentage Accurate: 33.8% → 84.9%
Time: 19.9s
Alternatives: 9
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 9 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.8% 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: 84.9% accurate, 0.3× 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 := 2 \cdot {t\_m}^{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2 \cdot 10^{-234}:\\ \;\;\;\;\left(t\_m \cdot \sqrt{2 \cdot \mathsf{fma}\left(x, 0.5, -0.5\right)}\right) \cdot \frac{1}{l\_m}\\ \mathbf{elif}\;t\_m \leq 10^{-203}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\mathsf{fma}\left(0.5, \frac{2 \cdot \mathsf{fma}\left(2, {t\_m}^{2}, {l\_m}^{2}\right)}{t\_m \cdot \left(x \cdot \sqrt{2}\right)}, t\_m \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t\_m \leq 4.1 \cdot 10^{-154}:\\ \;\;\;\;t\_m \cdot \frac{\sqrt{2 \cdot \mathsf{fma}\left(0.5, x, -0.5\right)}}{l\_m}\\ \mathbf{elif}\;t\_m \leq 0.0205:\\ \;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\left(2 \cdot \frac{{t\_m}^{2}}{x} + \left(t\_2 + \frac{{l\_m}^{2}}{x}\right)\right) + \frac{{l\_m}^{2} + t\_2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{0.5 \cdot \frac{x + -1}{x + 1}}\right)}\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 (* 2.0 (pow t_m 2.0))))
   (*
    t_s
    (if (<= t_m 2e-234)
      (* (* t_m (sqrt (* 2.0 (fma x 0.5 -0.5)))) (/ 1.0 l_m))
      (if (<= t_m 1e-203)
        (*
         (sqrt 2.0)
         (/
          t_m
          (fma
           0.5
           (/
            (* 2.0 (fma 2.0 (pow t_m 2.0) (pow l_m 2.0)))
            (* t_m (* x (sqrt 2.0))))
           (* t_m (sqrt 2.0)))))
        (if (<= t_m 4.1e-154)
          (* t_m (/ (sqrt (* 2.0 (fma 0.5 x -0.5))) l_m))
          (if (<= t_m 0.0205)
            (*
             (sqrt 2.0)
             (/
              t_m
              (sqrt
               (+
                (+ (* 2.0 (/ (pow t_m 2.0) x)) (+ t_2 (/ (pow l_m 2.0) x)))
                (/ (+ (pow l_m 2.0) t_2) x)))))
            (log
             (pow
              (exp (sqrt 2.0))
              (sqrt (* 0.5 (/ (+ x -1.0) (+ x 1.0)))))))))))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double t_2 = 2.0 * pow(t_m, 2.0);
	double tmp;
	if (t_m <= 2e-234) {
		tmp = (t_m * sqrt((2.0 * fma(x, 0.5, -0.5)))) * (1.0 / l_m);
	} else if (t_m <= 1e-203) {
		tmp = sqrt(2.0) * (t_m / fma(0.5, ((2.0 * fma(2.0, pow(t_m, 2.0), pow(l_m, 2.0))) / (t_m * (x * sqrt(2.0)))), (t_m * sqrt(2.0))));
	} else if (t_m <= 4.1e-154) {
		tmp = t_m * (sqrt((2.0 * fma(0.5, x, -0.5))) / l_m);
	} else if (t_m <= 0.0205) {
		tmp = sqrt(2.0) * (t_m / sqrt((((2.0 * (pow(t_m, 2.0) / x)) + (t_2 + (pow(l_m, 2.0) / x))) + ((pow(l_m, 2.0) + t_2) / x))));
	} else {
		tmp = log(pow(exp(sqrt(2.0)), sqrt((0.5 * ((x + -1.0) / (x + 1.0))))));
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	t_2 = Float64(2.0 * (t_m ^ 2.0))
	tmp = 0.0
	if (t_m <= 2e-234)
		tmp = Float64(Float64(t_m * sqrt(Float64(2.0 * fma(x, 0.5, -0.5)))) * Float64(1.0 / l_m));
	elseif (t_m <= 1e-203)
		tmp = Float64(sqrt(2.0) * Float64(t_m / fma(0.5, Float64(Float64(2.0 * fma(2.0, (t_m ^ 2.0), (l_m ^ 2.0))) / Float64(t_m * Float64(x * sqrt(2.0)))), Float64(t_m * sqrt(2.0)))));
	elseif (t_m <= 4.1e-154)
		tmp = Float64(t_m * Float64(sqrt(Float64(2.0 * fma(0.5, x, -0.5))) / l_m));
	elseif (t_m <= 0.0205)
		tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(Float64(Float64(Float64(2.0 * Float64((t_m ^ 2.0) / x)) + Float64(t_2 + Float64((l_m ^ 2.0) / x))) + Float64(Float64((l_m ^ 2.0) + t_2) / x)))));
	else
		tmp = log((exp(sqrt(2.0)) ^ sqrt(Float64(0.5 * Float64(Float64(x + -1.0) / Float64(x + 1.0))))));
	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[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2e-234], N[(N[(t$95$m * N[Sqrt[N[(2.0 * N[(x * 0.5 + -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 / l$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1e-203], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(0.5 * N[(N[(2.0 * N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision] + N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(x * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.1e-154], N[(t$95$m * N[(N[Sqrt[N[(2.0 * N[(0.5 * x + -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 0.0205], 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[(t$95$2 + N[(N[Power[l$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] + t$95$2), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[Power[N[Exp[N[Sqrt[2.0], $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := 2 \cdot {t\_m}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2 \cdot 10^{-234}:\\
\;\;\;\;\left(t\_m \cdot \sqrt{2 \cdot \mathsf{fma}\left(x, 0.5, -0.5\right)}\right) \cdot \frac{1}{l\_m}\\

\mathbf{elif}\;t\_m \leq 10^{-203}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\mathsf{fma}\left(0.5, \frac{2 \cdot \mathsf{fma}\left(2, {t\_m}^{2}, {l\_m}^{2}\right)}{t\_m \cdot \left(x \cdot \sqrt{2}\right)}, t\_m \cdot \sqrt{2}\right)}\\

\mathbf{elif}\;t\_m \leq 4.1 \cdot 10^{-154}:\\
\;\;\;\;t\_m \cdot \frac{\sqrt{2 \cdot \mathsf{fma}\left(0.5, x, -0.5\right)}}{l\_m}\\

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

\mathbf{else}:\\
\;\;\;\;\log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{0.5 \cdot \frac{x + -1}{x + 1}}\right)}\right)\\


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

    1. Initial program 34.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Simplified34.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 inf 2.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt[3]{{\left(\sqrt{2 \cdot \mathsf{fma}\left(x, 0.5, -0.5\right)} \cdot \frac{t}{\ell}\right)}^{3}}} \]
    10. Step-by-step derivation
      1. rem-cbrt-cube18.1%

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

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

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

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

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

    if 1.9999999999999999e-234 < t < 1e-203

    1. Initial program 2.6%

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

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

      \[\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}}}} \]
    5. Taylor expanded in x around inf 84.5%

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

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

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

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

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

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

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

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

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

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

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

    if 1e-203 < t < 4.1e-154

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2 \cdot \color{blue}{\mathsf{fma}\left(0.5, x, -0.5\right)}}}{\ell} \cdot t \]
    11. Simplified32.7%

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

    if 4.1e-154 < t < 0.0205000000000000009

    1. Initial program 55.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. Simplified55.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 x around inf 88.8%

      \[\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 0.0205000000000000009 < t

    1. Initial program 37.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. Simplified37.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 t around inf 95.7%

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)} \]
    7. Step-by-step derivation
      1. add-log-exp95.7%

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

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

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

      \[\leadsto \color{blue}{\log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification53.8%

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

Alternative 2: 80.9% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;l\_m \leq 2 \cdot 10^{+242}:\\ \;\;\;\;\log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{0.5 \cdot \frac{x + -1}{x + 1}}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_m \cdot \frac{\sqrt{2 \cdot \mathsf{fma}\left(0.5, x, -0.5\right)}}{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 2e+242)
    (log (pow (exp (sqrt 2.0)) (sqrt (* 0.5 (/ (+ x -1.0) (+ x 1.0))))))
    (* t_m (/ (sqrt (* 2.0 (fma 0.5 x -0.5))) 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 <= 2e+242) {
		tmp = log(pow(exp(sqrt(2.0)), sqrt((0.5 * ((x + -1.0) / (x + 1.0))))));
	} else {
		tmp = t_m * (sqrt((2.0 * fma(0.5, x, -0.5))) / 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 <= 2e+242)
		tmp = log((exp(sqrt(2.0)) ^ sqrt(Float64(0.5 * Float64(Float64(x + -1.0) / Float64(x + 1.0))))));
	else
		tmp = Float64(t_m * Float64(sqrt(Float64(2.0 * fma(0.5, x, -0.5))) / l_m));
	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_] := N[(t$95$s * If[LessEqual[l$95$m, 2e+242], N[Log[N[Power[N[Exp[N[Sqrt[2.0], $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(t$95$m * N[(N[Sqrt[N[(2.0 * N[(0.5 * x + -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;l\_m \leq 2 \cdot 10^{+242}:\\
\;\;\;\;\log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{0.5 \cdot \frac{x + -1}{x + 1}}\right)}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{\sqrt{2 \cdot \mathsf{fma}\left(0.5, x, -0.5\right)}}{l\_m}\\


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

    1. Initial program 37.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. Simplified37.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 t around inf 45.2%

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)} \]
    7. Step-by-step derivation
      1. add-log-exp45.2%

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

        \[\leadsto \log \color{blue}{\left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)}\right)} \]
      3. sqrt-unprod45.9%

        \[\leadsto \log \left({\left(e^{\sqrt{2}}\right)}^{\color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}}\right) \]
    8. Applied egg-rr45.9%

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

    if 2.0000000000000001e242 < 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 1.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 80.9% accurate, 1.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;l\_m \leq 2.05 \cdot 10^{+242}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;t\_m \cdot \frac{\sqrt{2 \cdot \mathsf{fma}\left(0.5, x, -0.5\right)}}{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.05e+242)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (* t_m (/ (sqrt (* 2.0 (fma 0.5 x -0.5))) 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.05e+242) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = t_m * (sqrt((2.0 * fma(0.5, x, -0.5))) / 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.05e+242)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	else
		tmp = Float64(t_m * Float64(sqrt(Float64(2.0 * fma(0.5, x, -0.5))) / l_m));
	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_] := N[(t$95$s * If[LessEqual[l$95$m, 2.05e+242], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$m * N[(N[Sqrt[N[(2.0 * N[(0.5 * x + -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;l\_m \leq 2.05 \cdot 10^{+242}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{\sqrt{2 \cdot \mathsf{fma}\left(0.5, x, -0.5\right)}}{l\_m}\\


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

    1. Initial program 37.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. Simplified37.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 t around inf 45.2%

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)} \]
    7. Step-by-step derivation
      1. add-log-exp45.2%

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

        \[\leadsto \log \color{blue}{\left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)}\right)} \]
      3. sqrt-unprod45.9%

        \[\leadsto \log \left({\left(e^{\sqrt{2}}\right)}^{\color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}}\right) \]
    8. Applied egg-rr45.9%

      \[\leadsto \color{blue}{\log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}\right)} \]
    9. Step-by-step derivation
      1. *-un-lft-identity45.9%

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

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

        \[\leadsto \color{blue}{0} + \log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}\right) \]
      4. pow-exp45.2%

        \[\leadsto 0 + \log \color{blue}{\left(e^{\sqrt{2} \cdot \sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}}\right)} \]
      5. add-log-exp45.2%

        \[\leadsto 0 + \color{blue}{\sqrt{2} \cdot \sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}} \]
      6. sqrt-unprod45.9%

        \[\leadsto 0 + \color{blue}{\sqrt{2 \cdot \left(\frac{-1 + x}{x + 1} \cdot 0.5\right)}} \]
    10. Applied egg-rr45.9%

      \[\leadsto \color{blue}{0 + \sqrt{2 \cdot \left(\frac{-1 + x}{x + 1} \cdot 0.5\right)}} \]
    11. Step-by-step derivation
      1. +-lft-identity45.9%

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

        \[\leadsto \sqrt{\color{blue}{\left(\frac{-1 + x}{x + 1} \cdot 0.5\right) \cdot 2}} \]
      3. associate-*l*45.9%

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{-1 + x}{x + 1} \cdot 1}} \]
    13. Step-by-step derivation
      1. *-un-lft-identity45.9%

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

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

        \[\leadsto \color{blue}{1} \cdot \sqrt{\frac{-1 + x}{x + 1} \cdot 1} \]
      4. *-rgt-identity45.9%

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

      \[\leadsto \color{blue}{1 \cdot \sqrt{\frac{-1 + x}{x + 1}}} \]
    15. Step-by-step derivation
      1. *-lft-identity45.9%

        \[\leadsto \color{blue}{\sqrt{\frac{-1 + x}{x + 1}}} \]
    16. Simplified45.9%

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

    if 2.0499999999999999e242 < 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 1.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 80.8% 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}\;l\_m \leq 5.6 \cdot 10^{+242}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\frac{l\_m}{\sqrt{x}}}{t\_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 5.6e+242)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (/ 1.0 (/ (/ l_m (sqrt x)) t_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 <= 5.6e+242) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = 1.0 / ((l_m / sqrt(x)) / t_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 <= 5.6d+242) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else
        tmp = 1.0d0 / ((l_m / sqrt(x)) / t_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 <= 5.6e+242) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = 1.0 / ((l_m / Math.sqrt(x)) / t_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 <= 5.6e+242:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	else:
		tmp = 1.0 / ((l_m / math.sqrt(x)) / t_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 <= 5.6e+242)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	else
		tmp = Float64(1.0 / Float64(Float64(l_m / sqrt(x)) / t_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 <= 5.6e+242)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	else
		tmp = 1.0 / ((l_m / sqrt(x)) / t_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, 5.6e+242], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(1.0 / N[(N[(l$95$m / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / t$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 5.6 \cdot 10^{+242}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

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


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

    1. Initial program 37.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. Simplified37.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 t around inf 45.2%

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)} \]
    7. Step-by-step derivation
      1. add-log-exp45.2%

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

        \[\leadsto \log \color{blue}{\left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)}\right)} \]
      3. sqrt-unprod45.9%

        \[\leadsto \log \left({\left(e^{\sqrt{2}}\right)}^{\color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}}\right) \]
    8. Applied egg-rr45.9%

      \[\leadsto \color{blue}{\log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}\right)} \]
    9. Step-by-step derivation
      1. *-un-lft-identity45.9%

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

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

        \[\leadsto \color{blue}{0} + \log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}\right) \]
      4. pow-exp45.2%

        \[\leadsto 0 + \log \color{blue}{\left(e^{\sqrt{2} \cdot \sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}}\right)} \]
      5. add-log-exp45.2%

        \[\leadsto 0 + \color{blue}{\sqrt{2} \cdot \sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}} \]
      6. sqrt-unprod45.9%

        \[\leadsto 0 + \color{blue}{\sqrt{2 \cdot \left(\frac{-1 + x}{x + 1} \cdot 0.5\right)}} \]
    10. Applied egg-rr45.9%

      \[\leadsto \color{blue}{0 + \sqrt{2 \cdot \left(\frac{-1 + x}{x + 1} \cdot 0.5\right)}} \]
    11. Step-by-step derivation
      1. +-lft-identity45.9%

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

        \[\leadsto \sqrt{\color{blue}{\left(\frac{-1 + x}{x + 1} \cdot 0.5\right) \cdot 2}} \]
      3. associate-*l*45.9%

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{-1 + x}{x + 1} \cdot 1}} \]
    13. Step-by-step derivation
      1. *-un-lft-identity45.9%

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

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

        \[\leadsto \color{blue}{1} \cdot \sqrt{\frac{-1 + x}{x + 1} \cdot 1} \]
      4. *-rgt-identity45.9%

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

      \[\leadsto \color{blue}{1 \cdot \sqrt{\frac{-1 + x}{x + 1}}} \]
    15. Step-by-step derivation
      1. *-lft-identity45.9%

        \[\leadsto \color{blue}{\sqrt{\frac{-1 + x}{x + 1}}} \]
    16. Simplified45.9%

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

    if 5.6e242 < l

    1. Initial program 0.0%

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\color{blue}{\frac{{\ell}^{2} - -1 \cdot {\ell}^{2}}{x}}}} \]
    6. Step-by-step derivation
      1. div-sub37.0%

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{{\ell}^{2}}{x} - \color{blue}{-1 \cdot \frac{{\ell}^{2}}{x}}}} \]
      3. cancel-sign-sub-inv37.0%

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

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2}}{x}}}} \]
    7. Simplified37.0%

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

        \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \frac{{\ell}^{2}}{x}}}} \]
      2. clear-num37.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.7% 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.1 \cdot 10^{-232}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t\_m}{l\_m}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \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.1e-232)
    (* (sqrt x) (/ t_m l_m))
    (sqrt (/ (+ x -1.0) (+ x 1.0))))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (t_m <= 1.1e-232) {
		tmp = sqrt(x) * (t_m / l_m);
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l_m
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (t_m <= 1.1d-232) then
        tmp = sqrt(x) * (t_m / l_m)
    else
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
	double tmp;
	if (t_m <= 1.1e-232) {
		tmp = Math.sqrt(x) * (t_m / l_m);
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l_m, t_m):
	tmp = 0
	if t_m <= 1.1e-232:
		tmp = math.sqrt(x) * (t_m / l_m)
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return t_s * tmp
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l_m, t_m)
	tmp = 0.0
	if (t_m <= 1.1e-232)
		tmp = Float64(sqrt(x) * Float64(t_m / l_m));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l_m, t_m)
	tmp = 0.0;
	if (t_m <= 1.1e-232)
		tmp = sqrt(x) * (t_m / l_m);
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 1.1e-232], N[(N[Sqrt[x], $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $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}\;t\_m \leq 1.1 \cdot 10^{-232}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t\_m}{l\_m}\\

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


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

    1. Initial program 34.5%

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

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

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

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{{\ell}^{2}}{x} - \color{blue}{-1 \cdot \frac{{\ell}^{2}}{x}}}} \]
      3. cancel-sign-sub-inv17.6%

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{{\ell}^{2}}{x} + \color{blue}{1} \cdot \frac{{\ell}^{2}}{x}}} \]
      5. *-lft-identity17.6%

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

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

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

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

    if 1.10000000000000001e-232 < t

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

      \[\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 t around inf 84.6%

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)} \]
    7. Step-by-step derivation
      1. add-log-exp84.6%

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

        \[\leadsto \log \color{blue}{\left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)}\right)} \]
      3. sqrt-unprod85.9%

        \[\leadsto \log \left({\left(e^{\sqrt{2}}\right)}^{\color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}}\right) \]
    8. Applied egg-rr85.9%

      \[\leadsto \color{blue}{\log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}\right)} \]
    9. Step-by-step derivation
      1. *-un-lft-identity85.9%

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

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

        \[\leadsto \color{blue}{0} + \log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}\right) \]
      4. pow-exp84.6%

        \[\leadsto 0 + \log \color{blue}{\left(e^{\sqrt{2} \cdot \sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}}\right)} \]
      5. add-log-exp84.6%

        \[\leadsto 0 + \color{blue}{\sqrt{2} \cdot \sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}} \]
      6. sqrt-unprod85.9%

        \[\leadsto 0 + \color{blue}{\sqrt{2 \cdot \left(\frac{-1 + x}{x + 1} \cdot 0.5\right)}} \]
    10. Applied egg-rr85.9%

      \[\leadsto \color{blue}{0 + \sqrt{2 \cdot \left(\frac{-1 + x}{x + 1} \cdot 0.5\right)}} \]
    11. Step-by-step derivation
      1. +-lft-identity85.9%

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

        \[\leadsto \sqrt{\color{blue}{\left(\frac{-1 + x}{x + 1} \cdot 0.5\right) \cdot 2}} \]
      3. associate-*l*85.9%

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

        \[\leadsto \sqrt{\frac{-1 + x}{x + 1} \cdot \color{blue}{1}} \]
    12. Simplified85.9%

      \[\leadsto \color{blue}{\sqrt{\frac{-1 + x}{x + 1} \cdot 1}} \]
    13. Step-by-step derivation
      1. *-un-lft-identity85.9%

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

        \[\leadsto \color{blue}{\sqrt{1} \cdot \sqrt{\frac{-1 + x}{x + 1} \cdot 1}} \]
      3. metadata-eval85.9%

        \[\leadsto \color{blue}{1} \cdot \sqrt{\frac{-1 + x}{x + 1} \cdot 1} \]
      4. *-rgt-identity85.9%

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

      \[\leadsto \color{blue}{1 \cdot \sqrt{\frac{-1 + x}{x + 1}}} \]
    15. Step-by-step derivation
      1. *-lft-identity85.9%

        \[\leadsto \color{blue}{\sqrt{\frac{-1 + x}{x + 1}}} \]
    16. Simplified85.9%

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

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

Alternative 6: 79.3% 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 4.6 \cdot 10^{-231}:\\ \;\;\;\;\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 4.6e-231)
    (* (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 <= 4.6e-231) {
		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 <= 4.6d-231) 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 <= 4.6e-231) {
		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 <= 4.6e-231:
		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 <= 4.6e-231)
		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 <= 4.6e-231)
		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, 4.6e-231], 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 4.6 \cdot 10^{-231}:\\
\;\;\;\;\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 < 4.6e-231

    1. Initial program 34.5%

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

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

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

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{{\ell}^{2}}{x} - \color{blue}{-1 \cdot \frac{{\ell}^{2}}{x}}}} \]
      3. cancel-sign-sub-inv17.6%

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{{\ell}^{2}}{x} + \color{blue}{1} \cdot \frac{{\ell}^{2}}{x}}} \]
      5. *-lft-identity17.6%

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

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

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

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

    if 4.6e-231 < t

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

      \[\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 t around inf 84.6%

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)} \]
    7. Step-by-step derivation
      1. add-log-exp84.6%

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

        \[\leadsto \log \color{blue}{\left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)}\right)} \]
      3. sqrt-unprod85.9%

        \[\leadsto \log \left({\left(e^{\sqrt{2}}\right)}^{\color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}}\right) \]
    8. Applied egg-rr85.9%

      \[\leadsto \color{blue}{\log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}\right)} \]
    9. Step-by-step derivation
      1. *-un-lft-identity85.9%

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

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

        \[\leadsto \color{blue}{0} + \log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}\right) \]
      4. pow-exp84.6%

        \[\leadsto 0 + \log \color{blue}{\left(e^{\sqrt{2} \cdot \sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}}\right)} \]
      5. add-log-exp84.6%

        \[\leadsto 0 + \color{blue}{\sqrt{2} \cdot \sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}} \]
      6. sqrt-unprod85.9%

        \[\leadsto 0 + \color{blue}{\sqrt{2 \cdot \left(\frac{-1 + x}{x + 1} \cdot 0.5\right)}} \]
    10. Applied egg-rr85.9%

      \[\leadsto \color{blue}{0 + \sqrt{2 \cdot \left(\frac{-1 + x}{x + 1} \cdot 0.5\right)}} \]
    11. Step-by-step derivation
      1. +-lft-identity85.9%

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

        \[\leadsto \sqrt{\color{blue}{\left(\frac{-1 + x}{x + 1} \cdot 0.5\right) \cdot 2}} \]
      3. associate-*l*85.9%

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

        \[\leadsto \sqrt{\frac{-1 + x}{x + 1} \cdot \color{blue}{1}} \]
    12. Simplified85.9%

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

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

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

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

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

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

        \[\leadsto 1 + \left(\frac{0.5 \cdot \left(2 + \color{blue}{\frac{1}{-1}}\right)}{x \cdot x} - \frac{1}{x}\right) \]
      6. rem-square-sqrt0.0%

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

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

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

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

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

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

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

Alternative 7: 77.2% 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 35.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. Simplified35.6%

    \[\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 t around inf 43.7%

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

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

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

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

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

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

    \[\leadsto \sqrt{2} \cdot \color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)} \]
  7. Step-by-step derivation
    1. add-log-exp43.7%

      \[\leadsto \color{blue}{\log \left(e^{\sqrt{2} \cdot \left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)}\right)} \]
    2. exp-prod44.4%

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

      \[\leadsto \log \left({\left(e^{\sqrt{2}}\right)}^{\color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}}\right) \]
  8. Applied egg-rr44.4%

    \[\leadsto \color{blue}{\log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}\right)} \]
  9. Step-by-step derivation
    1. *-un-lft-identity44.4%

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

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

      \[\leadsto \color{blue}{0} + \log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}\right) \]
    4. pow-exp43.7%

      \[\leadsto 0 + \log \color{blue}{\left(e^{\sqrt{2} \cdot \sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}}\right)} \]
    5. add-log-exp43.8%

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

      \[\leadsto 0 + \color{blue}{\sqrt{2 \cdot \left(\frac{-1 + x}{x + 1} \cdot 0.5\right)}} \]
  10. Applied egg-rr44.4%

    \[\leadsto \color{blue}{0 + \sqrt{2 \cdot \left(\frac{-1 + x}{x + 1} \cdot 0.5\right)}} \]
  11. Step-by-step derivation
    1. +-lft-identity44.4%

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

      \[\leadsto \sqrt{\color{blue}{\left(\frac{-1 + x}{x + 1} \cdot 0.5\right) \cdot 2}} \]
    3. associate-*l*44.4%

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

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

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

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

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

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

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

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

      \[\leadsto 1 + \left(\frac{0.5 \cdot \left(2 + \color{blue}{\frac{1}{-1}}\right)}{x \cdot x} - \frac{1}{x}\right) \]
    6. rem-square-sqrt0.0%

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

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

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

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

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

    \[\leadsto \color{blue}{1 + \frac{-1 + \frac{0.5}{x}}{x}} \]
  16. Add Preprocessing

Alternative 8: 77.0% 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 35.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. Simplified35.6%

    \[\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 t around inf 43.7%

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

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

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

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

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

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

    \[\leadsto \sqrt{2} \cdot \color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)} \]
  7. Step-by-step derivation
    1. add-log-exp43.7%

      \[\leadsto \color{blue}{\log \left(e^{\sqrt{2} \cdot \left(\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{0.5}\right)}\right)} \]
    2. exp-prod44.4%

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

      \[\leadsto \log \left({\left(e^{\sqrt{2}}\right)}^{\color{blue}{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}}\right) \]
  8. Applied egg-rr44.4%

    \[\leadsto \color{blue}{\log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}\right)} \]
  9. Step-by-step derivation
    1. *-un-lft-identity44.4%

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

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

      \[\leadsto \color{blue}{0} + \log \left({\left(e^{\sqrt{2}}\right)}^{\left(\sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}\right)}\right) \]
    4. pow-exp43.7%

      \[\leadsto 0 + \log \color{blue}{\left(e^{\sqrt{2} \cdot \sqrt{\frac{-1 + x}{x + 1} \cdot 0.5}}\right)} \]
    5. add-log-exp43.8%

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

      \[\leadsto 0 + \color{blue}{\sqrt{2 \cdot \left(\frac{-1 + x}{x + 1} \cdot 0.5\right)}} \]
  10. Applied egg-rr44.4%

    \[\leadsto \color{blue}{0 + \sqrt{2 \cdot \left(\frac{-1 + x}{x + 1} \cdot 0.5\right)}} \]
  11. Step-by-step derivation
    1. +-lft-identity44.4%

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

      \[\leadsto \sqrt{\color{blue}{\left(\frac{-1 + x}{x + 1} \cdot 0.5\right) \cdot 2}} \]
    3. associate-*l*44.4%

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

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

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

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

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

Alternative 9: 76.3% 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 35.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. Simplified35.6%

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

    \[\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}}}} \]
  5. Taylor expanded in x around inf 43.4%

    \[\leadsto \sqrt{2} \cdot \frac{t}{\color{blue}{t \cdot \sqrt{2}}} \]
  6. Step-by-step derivation
    1. *-commutative43.4%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\color{blue}{\sqrt{2} \cdot t}} \]
  7. Simplified43.4%

    \[\leadsto \sqrt{2} \cdot \frac{t}{\color{blue}{\sqrt{2} \cdot t}} \]
  8. Taylor expanded in t around 0 43.5%

    \[\leadsto \color{blue}{1} \]
  9. Add Preprocessing

Reproduce

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