Toniolo and Linder, Equation (7)

Percentage Accurate: 33.8% → 84.5%
Time: 25.3s
Alternatives: 12
Speedup: 225.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 33.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.5% accurate, 0.1× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := 2 \cdot {t\_m}^{2}\\ t_3 := {\ell}^{2} + t\_2\\ t_4 := t\_3 + t\_3\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.45 \cdot 10^{-167}:\\ \;\;\;\;\frac{t\_m \cdot \sqrt{2}}{\mathsf{fma}\left(t\_m, \sqrt{2}, \frac{{\ell}^{2}}{t\_m \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\ \mathbf{elif}\;t\_m \leq 1.95 \cdot 10^{+111}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{t\_2 + \frac{t\_4 + \frac{\left(t\_4 + \left(2 \cdot \frac{{t\_m}^{2}}{x} + \frac{{\ell}^{2}}{x}\right)\right) + \frac{t\_3}{x}}{x}}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
 :precision binary64
 (let* ((t_2 (* 2.0 (pow t_m 2.0)))
        (t_3 (+ (pow l 2.0) t_2))
        (t_4 (+ t_3 t_3)))
   (*
    t_s
    (if (<= t_m 2.45e-167)
      (/
       (* t_m (sqrt 2.0))
       (fma t_m (sqrt 2.0) (/ (pow l 2.0) (* t_m (* (sqrt 2.0) x)))))
      (if (<= t_m 1.95e+111)
        (*
         (sqrt 2.0)
         (/
          t_m
          (sqrt
           (+
            t_2
            (/
             (+
              t_4
              (/
               (+
                (+ t_4 (+ (* 2.0 (/ (pow t_m 2.0) x)) (/ (pow l 2.0) x)))
                (/ t_3 x))
               x))
             x)))))
        (sqrt (/ (+ x -1.0) (+ x 1.0))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
	double t_2 = 2.0 * pow(t_m, 2.0);
	double t_3 = pow(l, 2.0) + t_2;
	double t_4 = t_3 + t_3;
	double tmp;
	if (t_m <= 2.45e-167) {
		tmp = (t_m * sqrt(2.0)) / fma(t_m, sqrt(2.0), (pow(l, 2.0) / (t_m * (sqrt(2.0) * x))));
	} else if (t_m <= 1.95e+111) {
		tmp = sqrt(2.0) * (t_m / sqrt((t_2 + ((t_4 + (((t_4 + ((2.0 * (pow(t_m, 2.0) / x)) + (pow(l, 2.0) / x))) + (t_3 / x)) / x)) / x))));
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l, t_m)
	t_2 = Float64(2.0 * (t_m ^ 2.0))
	t_3 = Float64((l ^ 2.0) + t_2)
	t_4 = Float64(t_3 + t_3)
	tmp = 0.0
	if (t_m <= 2.45e-167)
		tmp = Float64(Float64(t_m * sqrt(2.0)) / fma(t_m, sqrt(2.0), Float64((l ^ 2.0) / Float64(t_m * Float64(sqrt(2.0) * x)))));
	elseif (t_m <= 1.95e+111)
		tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(Float64(t_2 + Float64(Float64(t_4 + Float64(Float64(Float64(t_4 + Float64(Float64(2.0 * Float64((t_m ^ 2.0) / x)) + Float64((l ^ 2.0) / x))) + Float64(t_3 / x)) / x)) / x)))));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return Float64(t_s * tmp)
end
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_, t$95$m_] := Block[{t$95$2 = N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[l, 2.0], $MachinePrecision] + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + t$95$3), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.45e-167], N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.95e+111], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(t$95$2 + N[(N[(t$95$4 + N[(N[(N[(t$95$4 + N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]), $MachinePrecision]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := 2 \cdot {t\_m}^{2}\\
t_3 := {\ell}^{2} + t\_2\\
t_4 := t\_3 + t\_3\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.45 \cdot 10^{-167}:\\
\;\;\;\;\frac{t\_m \cdot \sqrt{2}}{\mathsf{fma}\left(t\_m, \sqrt{2}, \frac{{\ell}^{2}}{t\_m \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\

\mathbf{elif}\;t\_m \leq 1.95 \cdot 10^{+111}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{t\_2 + \frac{t\_4 + \frac{\left(t\_4 + \left(2 \cdot \frac{{t\_m}^{2}}{x} + \frac{{\ell}^{2}}{x}\right)\right) + \frac{t\_3}{x}}{x}}{x}}}\\

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


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

    1. Initial program 26.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. Simplified26.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 x around inf 20.1%

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

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

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

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

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

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

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

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

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

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

    if 2.45000000000000002e-167 < t < 1.9499999999999999e111

    1. Initial program 45.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. Simplified45.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 82.8%

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

    if 1.9499999999999999e111 < t

    1. Initial program 14.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. Simplified14.3%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 84.3% accurate, 0.2× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := 2 \cdot {t\_m}^{2}\\ t_3 := {\ell}^{2} + t\_2\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 5.5 \cdot 10^{-169}:\\ \;\;\;\;\frac{t\_m \cdot \sqrt{2}}{\mathsf{fma}\left(t\_m, \sqrt{2}, \frac{{\ell}^{2}}{t\_m \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\ \mathbf{elif}\;t\_m \leq 2.2 \cdot 10^{+111}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{t\_2 + \frac{\left(2 \cdot \frac{{t\_m}^{2}}{x} + \frac{{\ell}^{2}}{x}\right) + \left(\left(t\_3 + t\_3\right) + \frac{t\_3}{x}\right)}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
 :precision binary64
 (let* ((t_2 (* 2.0 (pow t_m 2.0))) (t_3 (+ (pow l 2.0) t_2)))
   (*
    t_s
    (if (<= t_m 5.5e-169)
      (/
       (* t_m (sqrt 2.0))
       (fma t_m (sqrt 2.0) (/ (pow l 2.0) (* t_m (* (sqrt 2.0) x)))))
      (if (<= t_m 2.2e+111)
        (*
         (sqrt 2.0)
         (/
          t_m
          (sqrt
           (+
            t_2
            (/
             (+
              (+ (* 2.0 (/ (pow t_m 2.0) x)) (/ (pow l 2.0) x))
              (+ (+ t_3 t_3) (/ t_3 x)))
             x)))))
        (sqrt (/ (+ x -1.0) (+ x 1.0))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
	double t_2 = 2.0 * pow(t_m, 2.0);
	double t_3 = pow(l, 2.0) + t_2;
	double tmp;
	if (t_m <= 5.5e-169) {
		tmp = (t_m * sqrt(2.0)) / fma(t_m, sqrt(2.0), (pow(l, 2.0) / (t_m * (sqrt(2.0) * x))));
	} else if (t_m <= 2.2e+111) {
		tmp = sqrt(2.0) * (t_m / sqrt((t_2 + ((((2.0 * (pow(t_m, 2.0) / x)) + (pow(l, 2.0) / x)) + ((t_3 + t_3) + (t_3 / x))) / x))));
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l, t_m)
	t_2 = Float64(2.0 * (t_m ^ 2.0))
	t_3 = Float64((l ^ 2.0) + t_2)
	tmp = 0.0
	if (t_m <= 5.5e-169)
		tmp = Float64(Float64(t_m * sqrt(2.0)) / fma(t_m, sqrt(2.0), Float64((l ^ 2.0) / Float64(t_m * Float64(sqrt(2.0) * x)))));
	elseif (t_m <= 2.2e+111)
		tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(Float64(t_2 + Float64(Float64(Float64(Float64(2.0 * Float64((t_m ^ 2.0) / x)) + Float64((l ^ 2.0) / x)) + Float64(Float64(t_3 + t_3) + Float64(t_3 / x))) / x)))));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return Float64(t_s * tmp)
end
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_, t$95$m_] := Block[{t$95$2 = N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[l, 2.0], $MachinePrecision] + t$95$2), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.5e-169], N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.2e+111], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(t$95$2 + N[(N[(N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 + t$95$3), $MachinePrecision] + N[(t$95$3 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := 2 \cdot {t\_m}^{2}\\
t_3 := {\ell}^{2} + t\_2\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.5 \cdot 10^{-169}:\\
\;\;\;\;\frac{t\_m \cdot \sqrt{2}}{\mathsf{fma}\left(t\_m, \sqrt{2}, \frac{{\ell}^{2}}{t\_m \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\

\mathbf{elif}\;t\_m \leq 2.2 \cdot 10^{+111}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{t\_2 + \frac{\left(2 \cdot \frac{{t\_m}^{2}}{x} + \frac{{\ell}^{2}}{x}\right) + \left(\left(t\_3 + t\_3\right) + \frac{t\_3}{x}\right)}{x}}}\\

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


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

    1. Initial program 26.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. Simplified26.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 x around inf 20.1%

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

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

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

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

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

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

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

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

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

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

    if 5.4999999999999994e-169 < t < 2.19999999999999999e111

    1. Initial program 45.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. Simplified45.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 82.7%

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

    if 2.19999999999999999e111 < t

    1. Initial program 14.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. Simplified14.3%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 84.6% accurate, 0.3× speedup?

\[\begin{array}{l} 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.55 \cdot 10^{-168}:\\ \;\;\;\;\frac{t\_m \cdot \sqrt{2}}{\mathsf{fma}\left(t\_m, \sqrt{2}, \frac{{\ell}^{2}}{t\_m \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\ \mathbf{elif}\;t\_m \leq 7800:\\ \;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\frac{{\ell}^{2} + t\_2}{x} + \left(2 \cdot \frac{{t\_m}^{2}}{x} + \left(t\_2 + \frac{{\ell}^{2}}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
 :precision binary64
 (let* ((t_2 (* 2.0 (pow t_m 2.0))))
   (*
    t_s
    (if (<= t_m 2.55e-168)
      (/
       (* t_m (sqrt 2.0))
       (fma t_m (sqrt 2.0) (/ (pow l 2.0) (* t_m (* (sqrt 2.0) x)))))
      (if (<= t_m 7800.0)
        (*
         (sqrt 2.0)
         (/
          t_m
          (sqrt
           (+
            (/ (+ (pow l 2.0) t_2) x)
            (+ (* 2.0 (/ (pow t_m 2.0) x)) (+ t_2 (/ (pow l 2.0) x)))))))
        (sqrt (/ (+ x -1.0) (+ x 1.0))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
	double t_2 = 2.0 * pow(t_m, 2.0);
	double tmp;
	if (t_m <= 2.55e-168) {
		tmp = (t_m * sqrt(2.0)) / fma(t_m, sqrt(2.0), (pow(l, 2.0) / (t_m * (sqrt(2.0) * x))));
	} else if (t_m <= 7800.0) {
		tmp = sqrt(2.0) * (t_m / sqrt((((pow(l, 2.0) + t_2) / x) + ((2.0 * (pow(t_m, 2.0) / x)) + (t_2 + (pow(l, 2.0) / x))))));
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l, t_m)
	t_2 = Float64(2.0 * (t_m ^ 2.0))
	tmp = 0.0
	if (t_m <= 2.55e-168)
		tmp = Float64(Float64(t_m * sqrt(2.0)) / fma(t_m, sqrt(2.0), Float64((l ^ 2.0) / Float64(t_m * Float64(sqrt(2.0) * x)))));
	elseif (t_m <= 7800.0)
		tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(Float64(Float64(Float64((l ^ 2.0) + t_2) / x) + Float64(Float64(2.0 * Float64((t_m ^ 2.0) / x)) + Float64(t_2 + Float64((l ^ 2.0) / x)))))));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return Float64(t_s * tmp)
end
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_, 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, 2.55e-168], N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7800.0], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(N[(N[(N[Power[l, 2.0], $MachinePrecision] + t$95$2), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 + N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
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.55 \cdot 10^{-168}:\\
\;\;\;\;\frac{t\_m \cdot \sqrt{2}}{\mathsf{fma}\left(t\_m, \sqrt{2}, \frac{{\ell}^{2}}{t\_m \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\

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

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


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

    1. Initial program 26.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. Simplified26.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 x around inf 20.1%

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

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

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

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

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

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

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

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

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

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

    if 2.5499999999999998e-168 < t < 7800

    1. Initial program 35.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. Simplified35.5%

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

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

    1. Initial program 33.0%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Simplified32.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 l around 0 91.7%

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

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

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

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

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

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

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

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

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

Alternative 4: 81.4% accurate, 0.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 4000:\\ \;\;\;\;\frac{t\_m \cdot \sqrt{2}}{\mathsf{fma}\left(\sqrt{2}, t\_m, \frac{0.5 \cdot \left(2 \cdot \mathsf{fma}\left(2, {t\_m}^{2}, {\ell}^{2}\right)\right)}{t\_m \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4000.0)
    (/
     (* t_m (sqrt 2.0))
     (fma
      (sqrt 2.0)
      t_m
      (/
       (* 0.5 (* 2.0 (fma 2.0 (pow t_m 2.0) (pow l 2.0))))
       (* t_m (* (sqrt 2.0) x)))))
    (sqrt (/ (+ x -1.0) (+ x 1.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
	double tmp;
	if (t_m <= 4000.0) {
		tmp = (t_m * sqrt(2.0)) / fma(sqrt(2.0), t_m, ((0.5 * (2.0 * fma(2.0, pow(t_m, 2.0), pow(l, 2.0)))) / (t_m * (sqrt(2.0) * x))));
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l, t_m)
	tmp = 0.0
	if (t_m <= 4000.0)
		tmp = Float64(Float64(t_m * sqrt(2.0)) / fma(sqrt(2.0), t_m, Float64(Float64(0.5 * Float64(2.0 * fma(2.0, (t_m ^ 2.0), (l ^ 2.0)))) / Float64(t_m * Float64(sqrt(2.0) * x)))));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return Float64(t_s * tmp)
end
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_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 4000.0], N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m + N[(N[(0.5 * N[(2.0 * N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision] + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4000:\\
\;\;\;\;\frac{t\_m \cdot \sqrt{2}}{\mathsf{fma}\left(\sqrt{2}, t\_m, \frac{0.5 \cdot \left(2 \cdot \mathsf{fma}\left(2, {t\_m}^{2}, {\ell}^{2}\right)\right)}{t\_m \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\

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


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

    1. Initial program 28.4%

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

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

      \[\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}}} \]
    5. Step-by-step derivation
      1. associate-*r/30.1%

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \sqrt{2} + 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)}}} \]
      3. *-commutative30.1%

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

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

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

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

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

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

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

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

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

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

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

    if 4e3 < t

    1. Initial program 33.0%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Simplified32.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 l around 0 91.7%

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

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

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

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

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

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

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

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

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

Alternative 5: 81.1% accurate, 0.4× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.5 \cdot 10^{-123}:\\ \;\;\;\;\frac{t\_m \cdot \sqrt{2}}{\mathsf{fma}\left(t\_m, \sqrt{2}, \frac{{\ell}^{2}}{t\_m \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 2.5e-123)
    (/
     (* t_m (sqrt 2.0))
     (fma t_m (sqrt 2.0) (/ (pow l 2.0) (* t_m (* (sqrt 2.0) x)))))
    (sqrt (/ (+ x -1.0) (+ x 1.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
	double tmp;
	if (t_m <= 2.5e-123) {
		tmp = (t_m * sqrt(2.0)) / fma(t_m, sqrt(2.0), (pow(l, 2.0) / (t_m * (sqrt(2.0) * x))));
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l, t_m)
	tmp = 0.0
	if (t_m <= 2.5e-123)
		tmp = Float64(Float64(t_m * sqrt(2.0)) / fma(t_m, sqrt(2.0), Float64((l ^ 2.0) / Float64(t_m * Float64(sqrt(2.0) * x)))));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return Float64(t_s * tmp)
end
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_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 2.5e-123], N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.5 \cdot 10^{-123}:\\
\;\;\;\;\frac{t\_m \cdot \sqrt{2}}{\mathsf{fma}\left(t\_m, \sqrt{2}, \frac{{\ell}^{2}}{t\_m \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\

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


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

    1. Initial program 25.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.50000000000000015e-123 < t

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 81.1% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.5 \cdot 10^{-123}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t\_m}{t\_m \cdot \sqrt{2} + 0.5 \cdot \left(2 \cdot \frac{{\ell}^{2}}{t\_m \cdot \left(\sqrt{2} \cdot x\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 2.5e-123)
    (*
     (sqrt 2.0)
     (/
      t_m
      (+
       (* t_m (sqrt 2.0))
       (* 0.5 (* 2.0 (/ (pow l 2.0) (* t_m (* (sqrt 2.0) x))))))))
    (sqrt (/ (+ x -1.0) (+ x 1.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
	double tmp;
	if (t_m <= 2.5e-123) {
		tmp = sqrt(2.0) * (t_m / ((t_m * sqrt(2.0)) + (0.5 * (2.0 * (pow(l, 2.0) / (t_m * (sqrt(2.0) * x)))))));
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (t_m <= 2.5d-123) then
        tmp = sqrt(2.0d0) * (t_m / ((t_m * sqrt(2.0d0)) + (0.5d0 * (2.0d0 * ((l ** 2.0d0) / (t_m * (sqrt(2.0d0) * x)))))))
    else
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
	double tmp;
	if (t_m <= 2.5e-123) {
		tmp = Math.sqrt(2.0) * (t_m / ((t_m * Math.sqrt(2.0)) + (0.5 * (2.0 * (Math.pow(l, 2.0) / (t_m * (Math.sqrt(2.0) * x)))))));
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l, t_m):
	tmp = 0
	if t_m <= 2.5e-123:
		tmp = math.sqrt(2.0) * (t_m / ((t_m * math.sqrt(2.0)) + (0.5 * (2.0 * (math.pow(l, 2.0) / (t_m * (math.sqrt(2.0) * x)))))))
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l, t_m)
	tmp = 0.0
	if (t_m <= 2.5e-123)
		tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(Float64(t_m * sqrt(2.0)) + Float64(0.5 * Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * Float64(sqrt(2.0) * x))))))));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l, t_m)
	tmp = 0.0;
	if (t_m <= 2.5e-123)
		tmp = sqrt(2.0) * (t_m / ((t_m * sqrt(2.0)) + (0.5 * (2.0 * ((l ^ 2.0) / (t_m * (sqrt(2.0) * x)))))));
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = t_s * tmp;
end
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_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 2.5e-123], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


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

    1. Initial program 25.9%

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

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

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

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

    if 2.50000000000000015e-123 < t

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 76.6% accurate, 0.7× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{t\_m \cdot \sqrt{2}}{\sqrt{\frac{x + 1}{x + -1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t\_m \cdot t\_m\right)\right) - \ell \cdot \ell}} \leq \infty:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;t\_m \cdot \left(\sqrt{x} \cdot \frac{1}{\ell}\right)\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
 :precision binary64
 (*
  t_s
  (if (<=
       (/
        (* t_m (sqrt 2.0))
        (sqrt
         (-
          (* (/ (+ x 1.0) (+ x -1.0)) (+ (* l l) (* 2.0 (* t_m t_m))))
          (* l l))))
       INFINITY)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (* t_m (* (sqrt x) (/ 1.0 l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
	double tmp;
	if (((t_m * sqrt(2.0)) / sqrt(((((x + 1.0) / (x + -1.0)) * ((l * l) + (2.0 * (t_m * t_m)))) - (l * l)))) <= ((double) INFINITY)) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = t_m * (sqrt(x) * (1.0 / l));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
	double tmp;
	if (((t_m * Math.sqrt(2.0)) / Math.sqrt(((((x + 1.0) / (x + -1.0)) * ((l * l) + (2.0 * (t_m * t_m)))) - (l * l)))) <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = t_m * (Math.sqrt(x) * (1.0 / l));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l, t_m):
	tmp = 0
	if ((t_m * math.sqrt(2.0)) / math.sqrt(((((x + 1.0) / (x + -1.0)) * ((l * l) + (2.0 * (t_m * t_m)))) - (l * l)))) <= math.inf:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	else:
		tmp = t_m * (math.sqrt(x) * (1.0 / l))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l, t_m)
	tmp = 0.0
	if (Float64(Float64(t_m * sqrt(2.0)) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x + -1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t_m * t_m)))) - Float64(l * l)))) <= Inf)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	else
		tmp = Float64(t_m * Float64(sqrt(x) * Float64(1.0 / l)));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l, t_m)
	tmp = 0.0;
	if (((t_m * sqrt(2.0)) / sqrt(((((x + 1.0) / (x + -1.0)) * ((l * l) + (2.0 * (t_m * t_m)))) - (l * l)))) <= Inf)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	else
		tmp = t_m * (sqrt(x) * (1.0 / l));
	end
	tmp_2 = t_s * tmp;
end
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_, t$95$m_] := N[(t$95$s * If[LessEqual[N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $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$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], Infinity], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$m * N[(N[Sqrt[x], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(t \cdot \left(\frac{\color{blue}{1}}{\ell} \cdot \sqrt{x}\right)\right)}^{1} \]
    12. Applied egg-rr43.6%

      \[\leadsto \color{blue}{{\left(t \cdot \left(\frac{1}{\ell} \cdot \sqrt{x}\right)\right)}^{1}} \]
    13. Step-by-step derivation
      1. unpow143.6%

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

        \[\leadsto t \cdot \color{blue}{\left(\sqrt{x} \cdot \frac{1}{\ell}\right)} \]
    14. Simplified43.6%

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

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

Alternative 8: 77.7% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\ell \leq 7.2 \cdot 10^{+160}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;\ell \leq 1.08 \cdot 10^{+186} \lor \neg \left(\ell \leq 7.5 \cdot 10^{+240}\right):\\ \;\;\;\;\sqrt{x} \cdot \frac{t\_m}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.5 \cdot \left(\frac{\ell}{t\_m} \cdot \frac{\ell}{t\_m}\right)}{x}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
 :precision binary64
 (*
  t_s
  (if (<= l 7.2e+160)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (if (or (<= l 1.08e+186) (not (<= l 7.5e+240)))
      (* (sqrt x) (/ t_m l))
      (+ 1.0 (/ (* -0.5 (* (/ l t_m) (/ l t_m))) x))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
	double tmp;
	if (l <= 7.2e+160) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else if ((l <= 1.08e+186) || !(l <= 7.5e+240)) {
		tmp = sqrt(x) * (t_m / l);
	} else {
		tmp = 1.0 + ((-0.5 * ((l / t_m) * (l / t_m))) / x);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (l <= 7.2d+160) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if ((l <= 1.08d+186) .or. (.not. (l <= 7.5d+240))) then
        tmp = sqrt(x) * (t_m / l)
    else
        tmp = 1.0d0 + (((-0.5d0) * ((l / t_m) * (l / t_m))) / x)
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
	double tmp;
	if (l <= 7.2e+160) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if ((l <= 1.08e+186) || !(l <= 7.5e+240)) {
		tmp = Math.sqrt(x) * (t_m / l);
	} else {
		tmp = 1.0 + ((-0.5 * ((l / t_m) * (l / t_m))) / x);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l, t_m):
	tmp = 0
	if l <= 7.2e+160:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	elif (l <= 1.08e+186) or not (l <= 7.5e+240):
		tmp = math.sqrt(x) * (t_m / l)
	else:
		tmp = 1.0 + ((-0.5 * ((l / t_m) * (l / t_m))) / x)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l, t_m)
	tmp = 0.0
	if (l <= 7.2e+160)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	elseif ((l <= 1.08e+186) || !(l <= 7.5e+240))
		tmp = Float64(sqrt(x) * Float64(t_m / l));
	else
		tmp = Float64(1.0 + Float64(Float64(-0.5 * Float64(Float64(l / t_m) * Float64(l / t_m))) / x));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l, t_m)
	tmp = 0.0;
	if (l <= 7.2e+160)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	elseif ((l <= 1.08e+186) || ~((l <= 7.5e+240)))
		tmp = sqrt(x) * (t_m / l);
	else
		tmp = 1.0 + ((-0.5 * ((l / t_m) * (l / t_m))) / x);
	end
	tmp_2 = t_s * tmp;
end
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_, t$95$m_] := N[(t$95$s * If[LessEqual[l, 7.2e+160], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[l, 1.08e+186], N[Not[LessEqual[l, 7.5e+240]], $MachinePrecision]], N[(N[Sqrt[x], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-0.5 * N[(N[(l / t$95$m), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 7.2 \cdot 10^{+160}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;\ell \leq 1.08 \cdot 10^{+186} \lor \neg \left(\ell \leq 7.5 \cdot 10^{+240}\right):\\
\;\;\;\;\sqrt{x} \cdot \frac{t\_m}{\ell}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 7.20000000000000042e160

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

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

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

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

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

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

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

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

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

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

    if 7.20000000000000042e160 < l < 1.08000000000000003e186 or 7.50000000000000038e240 < 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.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(t \cdot \frac{\color{blue}{1}}{\ell}\right)}^{1} \cdot \sqrt{x} \]
    12. Applied egg-rr67.9%

      \[\leadsto \color{blue}{{\left(t \cdot \frac{1}{\ell}\right)}^{1}} \cdot \sqrt{x} \]
    13. Step-by-step derivation
      1. unpow167.9%

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

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

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

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

    if 1.08000000000000003e186 < l < 7.50000000000000038e240

    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 x around inf 14.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \frac{\frac{-1 \cdot {\ell}^{2}}{\color{blue}{2} \cdot {t}^{2}}}{x} \]
      13. times-frac0.7%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1}{2} \cdot \frac{{\ell}^{2}}{{t}^{2}}}}{x} \]
      14. metadata-eval0.7%

        \[\leadsto 1 + \frac{\color{blue}{-0.5} \cdot \frac{{\ell}^{2}}{{t}^{2}}}{x} \]
    8. Simplified0.7%

      \[\leadsto \color{blue}{1 + \frac{-0.5 \cdot \frac{{\ell}^{2}}{{t}^{2}}}{x}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt0.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \frac{-0.5 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{\color{blue}{t}}\right)}{x} \]
    10. Applied egg-rr30.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 7.2 \cdot 10^{+160}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;\ell \leq 1.08 \cdot 10^{+186} \lor \neg \left(\ell \leq 7.5 \cdot 10^{+240}\right):\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.5 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{t}\right)}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 77.4% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\ell \leq 5.1 \cdot 10^{+160}:\\ \;\;\;\;1 + \frac{-1 + \frac{0.5}{x}}{x}\\ \mathbf{elif}\;\ell \leq 1.7 \cdot 10^{+186} \lor \neg \left(\ell \leq 1.9 \cdot 10^{+237}\right):\\ \;\;\;\;\sqrt{x} \cdot \frac{t\_m}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.5 \cdot \left(\frac{\ell}{t\_m} \cdot \frac{\ell}{t\_m}\right)}{x}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
 :precision binary64
 (*
  t_s
  (if (<= l 5.1e+160)
    (+ 1.0 (/ (+ -1.0 (/ 0.5 x)) x))
    (if (or (<= l 1.7e+186) (not (<= l 1.9e+237)))
      (* (sqrt x) (/ t_m l))
      (+ 1.0 (/ (* -0.5 (* (/ l t_m) (/ l t_m))) x))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
	double tmp;
	if (l <= 5.1e+160) {
		tmp = 1.0 + ((-1.0 + (0.5 / x)) / x);
	} else if ((l <= 1.7e+186) || !(l <= 1.9e+237)) {
		tmp = sqrt(x) * (t_m / l);
	} else {
		tmp = 1.0 + ((-0.5 * ((l / t_m) * (l / t_m))) / x);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (l <= 5.1d+160) then
        tmp = 1.0d0 + (((-1.0d0) + (0.5d0 / x)) / x)
    else if ((l <= 1.7d+186) .or. (.not. (l <= 1.9d+237))) then
        tmp = sqrt(x) * (t_m / l)
    else
        tmp = 1.0d0 + (((-0.5d0) * ((l / t_m) * (l / t_m))) / x)
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
	double tmp;
	if (l <= 5.1e+160) {
		tmp = 1.0 + ((-1.0 + (0.5 / x)) / x);
	} else if ((l <= 1.7e+186) || !(l <= 1.9e+237)) {
		tmp = Math.sqrt(x) * (t_m / l);
	} else {
		tmp = 1.0 + ((-0.5 * ((l / t_m) * (l / t_m))) / x);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l, t_m):
	tmp = 0
	if l <= 5.1e+160:
		tmp = 1.0 + ((-1.0 + (0.5 / x)) / x)
	elif (l <= 1.7e+186) or not (l <= 1.9e+237):
		tmp = math.sqrt(x) * (t_m / l)
	else:
		tmp = 1.0 + ((-0.5 * ((l / t_m) * (l / t_m))) / x)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l, t_m)
	tmp = 0.0
	if (l <= 5.1e+160)
		tmp = Float64(1.0 + Float64(Float64(-1.0 + Float64(0.5 / x)) / x));
	elseif ((l <= 1.7e+186) || !(l <= 1.9e+237))
		tmp = Float64(sqrt(x) * Float64(t_m / l));
	else
		tmp = Float64(1.0 + Float64(Float64(-0.5 * Float64(Float64(l / t_m) * Float64(l / t_m))) / x));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, l, t_m)
	tmp = 0.0;
	if (l <= 5.1e+160)
		tmp = 1.0 + ((-1.0 + (0.5 / x)) / x);
	elseif ((l <= 1.7e+186) || ~((l <= 1.9e+237)))
		tmp = sqrt(x) * (t_m / l);
	else
		tmp = 1.0 + ((-0.5 * ((l / t_m) * (l / t_m))) / x);
	end
	tmp_2 = t_s * tmp;
end
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_, t$95$m_] := N[(t$95$s * If[LessEqual[l, 5.1e+160], N[(1.0 + N[(N[(-1.0 + N[(0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[l, 1.7e+186], N[Not[LessEqual[l, 1.9e+237]], $MachinePrecision]], N[(N[Sqrt[x], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-0.5 * N[(N[(l / t$95$m), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 5.1 \cdot 10^{+160}:\\
\;\;\;\;1 + \frac{-1 + \frac{0.5}{x}}{x}\\

\mathbf{elif}\;\ell \leq 1.7 \cdot 10^{+186} \lor \neg \left(\ell \leq 1.9 \cdot 10^{+237}\right):\\
\;\;\;\;\sqrt{x} \cdot \frac{t\_m}{\ell}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 5.1000000000000001e160

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \left(\frac{\color{blue}{\frac{2 + \frac{1}{{\left(\sqrt{-1}\right)}^{2}}}{x} \cdot 0.5}}{x} - \frac{1}{x}\right) \]
      10. *-commutative0.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) \]
      11. div-sub0.0%

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

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

    if 5.1000000000000001e160 < l < 1.70000000000000003e186 or 1.9e237 < 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.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(t \cdot \frac{\color{blue}{1}}{\ell}\right)}^{1} \cdot \sqrt{x} \]
    12. Applied egg-rr67.9%

      \[\leadsto \color{blue}{{\left(t \cdot \frac{1}{\ell}\right)}^{1}} \cdot \sqrt{x} \]
    13. Step-by-step derivation
      1. unpow167.9%

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

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

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

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

    if 1.70000000000000003e186 < l < 1.9e237

    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 x around inf 14.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \frac{\frac{-1 \cdot {\ell}^{2}}{\color{blue}{2} \cdot {t}^{2}}}{x} \]
      13. times-frac0.7%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1}{2} \cdot \frac{{\ell}^{2}}{{t}^{2}}}}{x} \]
      14. metadata-eval0.7%

        \[\leadsto 1 + \frac{\color{blue}{-0.5} \cdot \frac{{\ell}^{2}}{{t}^{2}}}{x} \]
    8. Simplified0.7%

      \[\leadsto \color{blue}{1 + \frac{-0.5 \cdot \frac{{\ell}^{2}}{{t}^{2}}}{x}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt0.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \frac{-0.5 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{\color{blue}{t}}\right)}{x} \]
    10. Applied egg-rr30.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 5.1 \cdot 10^{+160}:\\ \;\;\;\;1 + \frac{-1 + \frac{0.5}{x}}{x}\\ \mathbf{elif}\;\ell \leq 1.7 \cdot 10^{+186} \lor \neg \left(\ell \leq 1.9 \cdot 10^{+237}\right):\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.5 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{t}\right)}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 76.7% accurate, 25.0× speedup?

\[\begin{array}{l} 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} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
 :precision binary64
 (* t_s (+ 1.0 (/ (+ -1.0 (/ 0.5 x)) x))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
	return t_s * (1.0 + ((-1.0 + (0.5 / x)) / x));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t_m
    code = t_s * (1.0d0 + (((-1.0d0) + (0.5d0 / x)) / x))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
	return t_s * (1.0 + ((-1.0 + (0.5 / x)) / x));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l, t_m):
	return t_s * (1.0 + ((-1.0 + (0.5 / x)) / x))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l, t_m)
	return Float64(t_s * Float64(1.0 + Float64(Float64(-1.0 + Float64(0.5 / x)) / x)))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, l, t_m)
	tmp = t_s * (1.0 + ((-1.0 + (0.5 / x)) / x));
end
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_, 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}
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 29.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. Simplified29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 + \left(\frac{\color{blue}{\frac{2 + \frac{1}{{\left(\sqrt{-1}\right)}^{2}}}{x} \cdot 0.5}}{x} - \frac{1}{x}\right) \]
    10. *-commutative0.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) \]
    11. div-sub0.0%

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

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

Alternative 11: 76.5% accurate, 45.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(1 + \frac{-1}{x}\right) \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m) :precision binary64 (* t_s (+ 1.0 (/ -1.0 x))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
	return t_s * (1.0 + (-1.0 / x));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t_m
    code = t_s * (1.0d0 + ((-1.0d0) / x))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
	return t_s * (1.0 + (-1.0 / x));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l, t_m):
	return t_s * (1.0 + (-1.0 / x))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l, t_m)
	return Float64(t_s * Float64(1.0 + Float64(-1.0 / x)))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, l, t_m)
	tmp = t_s * (1.0 + (-1.0 / x));
end
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_, t$95$m_] := N[(t$95$s * N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 75.8% accurate, 225.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot 1 \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m) :precision binary64 (* t_s 1.0))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
	return t_s * 1.0;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t_m
    code = t_s * 1.0d0
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
	return t_s * 1.0;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l, t_m):
	return t_s * 1.0
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, l, t_m)
	return Float64(t_s * 1.0)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, l, t_m)
	tmp = t_s * 1.0;
end
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_, t$95$m_] := N[(t$95$s * 1.0), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

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

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

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

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

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

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

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

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

Reproduce

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