Toniolo and Linder, Equation (7)

Percentage Accurate: 33.6% → 98.0%
Time: 22.0s
Alternatives: 14
Speedup: 225.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 33.6% 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: 98.0% 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 := \sqrt{2} \cdot t\_m\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq -2000000000:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_2}{\mathsf{hypot}\left(\frac{\sqrt{2} \cdot \mathsf{hypot}\left(\ell, t\_2\right)}{\sqrt{x}}, t\_2\right)}\\ \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 (* (sqrt 2.0) t_m)))
   (*
    t_s
    (if (<= x -2000000000.0)
      (+ 1.0 (/ -1.0 x))
      (/ t_2 (hypot (/ (* (sqrt 2.0) (hypot l t_2)) (sqrt x)) t_2))))))
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 = sqrt(2.0) * t_m;
	double tmp;
	if (x <= -2000000000.0) {
		tmp = 1.0 + (-1.0 / x);
	} else {
		tmp = t_2 / hypot(((sqrt(2.0) * hypot(l, t_2)) / sqrt(x)), t_2);
	}
	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 t_2 = Math.sqrt(2.0) * t_m;
	double tmp;
	if (x <= -2000000000.0) {
		tmp = 1.0 + (-1.0 / x);
	} else {
		tmp = t_2 / Math.hypot(((Math.sqrt(2.0) * Math.hypot(l, t_2)) / Math.sqrt(x)), t_2);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l, t_m):
	t_2 = math.sqrt(2.0) * t_m
	tmp = 0
	if x <= -2000000000.0:
		tmp = 1.0 + (-1.0 / x)
	else:
		tmp = t_2 / math.hypot(((math.sqrt(2.0) * math.hypot(l, t_2)) / math.sqrt(x)), t_2)
	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(sqrt(2.0) * t_m)
	tmp = 0.0
	if (x <= -2000000000.0)
		tmp = Float64(1.0 + Float64(-1.0 / x));
	else
		tmp = Float64(t_2 / hypot(Float64(Float64(sqrt(2.0) * hypot(l, t_2)) / sqrt(x)), t_2));
	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)
	t_2 = sqrt(2.0) * t_m;
	tmp = 0.0;
	if (x <= -2000000000.0)
		tmp = 1.0 + (-1.0 / x);
	else
		tmp = t_2 / hypot(((sqrt(2.0) * hypot(l, t_2)) / sqrt(x)), t_2);
	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_] := Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[x, -2000000000.0], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], N[(t$95$2 / N[Sqrt[N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[l ^ 2 + t$95$2 ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] ^ 2 + t$95$2 ^ 2], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \sqrt{2} \cdot t\_m\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -2000000000:\\
\;\;\;\;1 + \frac{-1}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{\mathsf{hypot}\left(\frac{\sqrt{2} \cdot \mathsf{hypot}\left(\ell, t\_2\right)}{\sqrt{x}}, t\_2\right)}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2e9

    1. Initial program 39.7%

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

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

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

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

    if -2e9 < x

    1. Initial program 32.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. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+18.6%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt58.3%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\sqrt{2 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}} \cdot \sqrt{2 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}} + 2 \cdot {t}^{2}}} \]
      2. add-sqr-sqrt58.3%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\sqrt{2 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}} \cdot \sqrt{2 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}} + \color{blue}{\sqrt{2 \cdot {t}^{2}} \cdot \sqrt{2 \cdot {t}^{2}}}}} \]
      3. hypot-define58.3%

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\mathsf{hypot}\left(\color{blue}{\frac{\sqrt{2} \cdot \mathsf{hypot}\left(\ell, \sqrt{2} \cdot t\right)}{\sqrt{x}}}, \sqrt{2} \cdot t\right)} \]
      2. *-commutative98.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\mathsf{hypot}\left(\frac{\sqrt{2} \cdot \mathsf{hypot}\left(\ell, \color{blue}{t \cdot \sqrt{2}}\right)}{\sqrt{x}}, \sqrt{2} \cdot t\right)} \]
      3. *-commutative98.4%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\mathsf{hypot}\left(\frac{\sqrt{2} \cdot \mathsf{hypot}\left(\ell, t \cdot \sqrt{2}\right)}{\sqrt{x}}, \color{blue}{t \cdot \sqrt{2}}\right)} \]
    9. Simplified98.4%

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

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

Alternative 2: 98.0% 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 := \sqrt{2} \cdot t\_m\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq -2000000000:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_2}{\mathsf{hypot}\left(\sqrt{2} \cdot \frac{\mathsf{hypot}\left(\ell, t\_2\right)}{\sqrt{x}}, t\_2\right)}\\ \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 (* (sqrt 2.0) t_m)))
   (*
    t_s
    (if (<= x -2000000000.0)
      (+ 1.0 (/ -1.0 x))
      (/ t_2 (hypot (* (sqrt 2.0) (/ (hypot l t_2) (sqrt x))) t_2))))))
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 = sqrt(2.0) * t_m;
	double tmp;
	if (x <= -2000000000.0) {
		tmp = 1.0 + (-1.0 / x);
	} else {
		tmp = t_2 / hypot((sqrt(2.0) * (hypot(l, t_2) / sqrt(x))), t_2);
	}
	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 t_2 = Math.sqrt(2.0) * t_m;
	double tmp;
	if (x <= -2000000000.0) {
		tmp = 1.0 + (-1.0 / x);
	} else {
		tmp = t_2 / Math.hypot((Math.sqrt(2.0) * (Math.hypot(l, t_2) / Math.sqrt(x))), t_2);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, l, t_m):
	t_2 = math.sqrt(2.0) * t_m
	tmp = 0
	if x <= -2000000000.0:
		tmp = 1.0 + (-1.0 / x)
	else:
		tmp = t_2 / math.hypot((math.sqrt(2.0) * (math.hypot(l, t_2) / math.sqrt(x))), t_2)
	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(sqrt(2.0) * t_m)
	tmp = 0.0
	if (x <= -2000000000.0)
		tmp = Float64(1.0 + Float64(-1.0 / x));
	else
		tmp = Float64(t_2 / hypot(Float64(sqrt(2.0) * Float64(hypot(l, t_2) / sqrt(x))), t_2));
	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)
	t_2 = sqrt(2.0) * t_m;
	tmp = 0.0;
	if (x <= -2000000000.0)
		tmp = 1.0 + (-1.0 / x);
	else
		tmp = t_2 / hypot((sqrt(2.0) * (hypot(l, t_2) / sqrt(x))), t_2);
	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_] := Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[x, -2000000000.0], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], N[(t$95$2 / N[Sqrt[N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[l ^ 2 + t$95$2 ^ 2], $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2 + t$95$2 ^ 2], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \sqrt{2} \cdot t\_m\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -2000000000:\\
\;\;\;\;1 + \frac{-1}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{\mathsf{hypot}\left(\sqrt{2} \cdot \frac{\mathsf{hypot}\left(\ell, t\_2\right)}{\sqrt{x}}, t\_2\right)}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2e9

    1. Initial program 39.7%

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

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

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

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

    if -2e9 < x

    1. Initial program 32.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. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+18.6%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt58.3%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\sqrt{2 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}} \cdot \sqrt{2 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}} + 2 \cdot {t}^{2}}} \]
      2. add-sqr-sqrt58.3%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\sqrt{2 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}} \cdot \sqrt{2 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}} + \color{blue}{\sqrt{2 \cdot {t}^{2}} \cdot \sqrt{2 \cdot {t}^{2}}}}} \]
      3. hypot-define58.3%

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

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

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

Alternative 3: 82.7% accurate, 0.4× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sqrt{2} \cdot t\_m\\ t_3 := x \cdot \sqrt{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.4 \cdot 10^{-228}:\\ \;\;\;\;\frac{t\_m \cdot \sqrt{x}}{\ell}\\ \mathbf{elif}\;t\_m \leq 7.5 \cdot 10^{-150}:\\ \;\;\;\;\frac{t\_2}{2 \cdot \frac{t\_m}{t\_3} + \left(t\_2 + \frac{{\ell}^{2}}{t\_m \cdot t\_3}\right)}\\ \mathbf{elif}\;t\_m \leq 5.2 \cdot 10^{+43}:\\ \;\;\;\;t\_2 \cdot {\left(2 \cdot \left({t\_m}^{2} + \frac{\mathsf{fma}\left(2, {t\_m}^{2}, {\ell}^{2}\right)}{x}\right)\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\frac{0.5}{x} + -1}{x}\\ \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 (* (sqrt 2.0) t_m)) (t_3 (* x (sqrt 2.0))))
   (*
    t_s
    (if (<= t_m 1.4e-228)
      (/ (* t_m (sqrt x)) l)
      (if (<= t_m 7.5e-150)
        (/ t_2 (+ (* 2.0 (/ t_m t_3)) (+ t_2 (/ (pow l 2.0) (* t_m t_3)))))
        (if (<= t_m 5.2e+43)
          (*
           t_2
           (pow
            (* 2.0 (+ (pow t_m 2.0) (/ (fma 2.0 (pow t_m 2.0) (pow l 2.0)) x)))
            -0.5))
          (+ 1.0 (/ (+ (/ 0.5 x) -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) {
	double t_2 = sqrt(2.0) * t_m;
	double t_3 = x * sqrt(2.0);
	double tmp;
	if (t_m <= 1.4e-228) {
		tmp = (t_m * sqrt(x)) / l;
	} else if (t_m <= 7.5e-150) {
		tmp = t_2 / ((2.0 * (t_m / t_3)) + (t_2 + (pow(l, 2.0) / (t_m * t_3))));
	} else if (t_m <= 5.2e+43) {
		tmp = t_2 * pow((2.0 * (pow(t_m, 2.0) + (fma(2.0, pow(t_m, 2.0), pow(l, 2.0)) / x))), -0.5);
	} else {
		tmp = 1.0 + (((0.5 / x) + -1.0) / x);
	}
	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(sqrt(2.0) * t_m)
	t_3 = Float64(x * sqrt(2.0))
	tmp = 0.0
	if (t_m <= 1.4e-228)
		tmp = Float64(Float64(t_m * sqrt(x)) / l);
	elseif (t_m <= 7.5e-150)
		tmp = Float64(t_2 / Float64(Float64(2.0 * Float64(t_m / t_3)) + Float64(t_2 + Float64((l ^ 2.0) / Float64(t_m * t_3)))));
	elseif (t_m <= 5.2e+43)
		tmp = Float64(t_2 * (Float64(2.0 * Float64((t_m ^ 2.0) + Float64(fma(2.0, (t_m ^ 2.0), (l ^ 2.0)) / x))) ^ -0.5));
	else
		tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) + -1.0) / x));
	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[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.4e-228], N[(N[(t$95$m * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], If[LessEqual[t$95$m, 7.5e-150], N[(t$95$2 / N[(N[(2.0 * N[(t$95$m / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 + N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.2e+43], N[(t$95$2 * N[Power[N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] + N[(N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision] + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] + -1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \sqrt{2} \cdot t\_m\\
t_3 := x \cdot \sqrt{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.4 \cdot 10^{-228}:\\
\;\;\;\;\frac{t\_m \cdot \sqrt{x}}{\ell}\\

\mathbf{elif}\;t\_m \leq 7.5 \cdot 10^{-150}:\\
\;\;\;\;\frac{t\_2}{2 \cdot \frac{t\_m}{t\_3} + \left(t\_2 + \frac{{\ell}^{2}}{t\_m \cdot t\_3}\right)}\\

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

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


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

    1. Initial program 31.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. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+16.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.4000000000000001e-228 < t < 7.5000000000000004e-150

    1. Initial program 2.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. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+1.9%

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

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

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

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

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

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

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

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

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

    if 7.5000000000000004e-150 < t < 5.20000000000000042e43

    1. Initial program 51.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. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+27.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.20000000000000042e43 < t

    1. Initial program 40.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. Simplified40.2%

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

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

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

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

      \[\leadsto \color{blue}{1 + \left(-\frac{\frac{0.5}{-x} + 1}{x}\right)} \]
    8. Taylor expanded in x around -inf 97.1%

      \[\leadsto \color{blue}{1 + -1 \cdot \frac{1 - 0.5 \cdot \frac{1}{x}}{x}} \]
    9. Step-by-step derivation
      1. associate-*r/97.1%

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

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

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

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

        \[\leadsto 1 + \frac{-1 \cdot \left(1 + \color{blue}{\frac{0.5}{-x}}\right)}{x} \]
      6. neg-mul-197.1%

        \[\leadsto 1 + \frac{\color{blue}{-\left(1 + \frac{0.5}{-x}\right)}}{x} \]
      7. distribute-frac-neg97.1%

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

        \[\leadsto \color{blue}{1 - \frac{1 + \frac{0.5}{-x}}{x}} \]
      9. distribute-frac-neg297.1%

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

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

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

        \[\leadsto 1 - \frac{\color{blue}{1 - 0.5 \cdot \frac{1}{x}}}{x} \]
      13. associate-*r/97.1%

        \[\leadsto 1 - \frac{1 - \color{blue}{\frac{0.5 \cdot 1}{x}}}{x} \]
      14. metadata-eval97.1%

        \[\leadsto 1 - \frac{1 - \frac{\color{blue}{0.5}}{x}}{x} \]
    10. Simplified97.1%

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

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

Alternative 4: 81.2% accurate, 0.4× 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.9 \cdot 10^{-214}:\\ \;\;\;\;\frac{t\_m \cdot \sqrt{x}}{\ell}\\ \mathbf{elif}\;t\_m \leq 7.5 \cdot 10^{-150} \lor \neg \left(t\_m \leq 2.8 \cdot 10^{+43}\right):\\ \;\;\;\;1 + \frac{\frac{0.5}{x} + -1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t\_m}{\sqrt{t\_2 + 2 \cdot \frac{{\ell}^{2} + t\_2}{x}}}\\ \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.9e-214)
      (/ (* t_m (sqrt x)) l)
      (if (or (<= t_m 7.5e-150) (not (<= t_m 2.8e+43)))
        (+ 1.0 (/ (+ (/ 0.5 x) -1.0) x))
        (/
         (* (sqrt 2.0) t_m)
         (sqrt (+ t_2 (* 2.0 (/ (+ (pow l 2.0) t_2) x))))))))))
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.9e-214) {
		tmp = (t_m * sqrt(x)) / l;
	} else if ((t_m <= 7.5e-150) || !(t_m <= 2.8e+43)) {
		tmp = 1.0 + (((0.5 / x) + -1.0) / x);
	} else {
		tmp = (sqrt(2.0) * t_m) / sqrt((t_2 + (2.0 * ((pow(l, 2.0) + t_2) / 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) :: t_2
    real(8) :: tmp
    t_2 = 2.0d0 * (t_m ** 2.0d0)
    if (t_m <= 2.9d-214) then
        tmp = (t_m * sqrt(x)) / l
    else if ((t_m <= 7.5d-150) .or. (.not. (t_m <= 2.8d+43))) then
        tmp = 1.0d0 + (((0.5d0 / x) + (-1.0d0)) / x)
    else
        tmp = (sqrt(2.0d0) * t_m) / sqrt((t_2 + (2.0d0 * (((l ** 2.0d0) + t_2) / 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 t_2 = 2.0 * Math.pow(t_m, 2.0);
	double tmp;
	if (t_m <= 2.9e-214) {
		tmp = (t_m * Math.sqrt(x)) / l;
	} else if ((t_m <= 7.5e-150) || !(t_m <= 2.8e+43)) {
		tmp = 1.0 + (((0.5 / x) + -1.0) / x);
	} else {
		tmp = (Math.sqrt(2.0) * t_m) / Math.sqrt((t_2 + (2.0 * ((Math.pow(l, 2.0) + t_2) / 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):
	t_2 = 2.0 * math.pow(t_m, 2.0)
	tmp = 0
	if t_m <= 2.9e-214:
		tmp = (t_m * math.sqrt(x)) / l
	elif (t_m <= 7.5e-150) or not (t_m <= 2.8e+43):
		tmp = 1.0 + (((0.5 / x) + -1.0) / x)
	else:
		tmp = (math.sqrt(2.0) * t_m) / math.sqrt((t_2 + (2.0 * ((math.pow(l, 2.0) + t_2) / x))))
	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.9e-214)
		tmp = Float64(Float64(t_m * sqrt(x)) / l);
	elseif ((t_m <= 7.5e-150) || !(t_m <= 2.8e+43))
		tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) + -1.0) / x));
	else
		tmp = Float64(Float64(sqrt(2.0) * t_m) / sqrt(Float64(t_2 + Float64(2.0 * Float64(Float64((l ^ 2.0) + t_2) / 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)
	t_2 = 2.0 * (t_m ^ 2.0);
	tmp = 0.0;
	if (t_m <= 2.9e-214)
		tmp = (t_m * sqrt(x)) / l;
	elseif ((t_m <= 7.5e-150) || ~((t_m <= 2.8e+43)))
		tmp = 1.0 + (((0.5 / x) + -1.0) / x);
	else
		tmp = (sqrt(2.0) * t_m) / sqrt((t_2 + (2.0 * (((l ^ 2.0) + t_2) / 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_] := 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.9e-214], N[(N[(t$95$m * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], If[Or[LessEqual[t$95$m, 7.5e-150], N[Not[LessEqual[t$95$m, 2.8e+43]], $MachinePrecision]], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] + -1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[Sqrt[N[(t$95$2 + N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] + t$95$2), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $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.9 \cdot 10^{-214}:\\
\;\;\;\;\frac{t\_m \cdot \sqrt{x}}{\ell}\\

\mathbf{elif}\;t\_m \leq 7.5 \cdot 10^{-150} \lor \neg \left(t\_m \leq 2.8 \cdot 10^{+43}\right):\\
\;\;\;\;1 + \frac{\frac{0.5}{x} + -1}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t\_m}{\sqrt{t\_2 + 2 \cdot \frac{{\ell}^{2} + t\_2}{x}}}\\


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

    1. Initial program 31.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+15.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.89999999999999985e-214 < t < 7.5000000000000004e-150 or 2.80000000000000019e43 < 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.2%

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

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

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

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

      \[\leadsto \color{blue}{1 + \left(-\frac{\frac{0.5}{-x} + 1}{x}\right)} \]
    8. Taylor expanded in x around -inf 95.1%

      \[\leadsto \color{blue}{1 + -1 \cdot \frac{1 - 0.5 \cdot \frac{1}{x}}{x}} \]
    9. Step-by-step derivation
      1. associate-*r/95.1%

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

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

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

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

        \[\leadsto 1 + \frac{-1 \cdot \left(1 + \color{blue}{\frac{0.5}{-x}}\right)}{x} \]
      6. neg-mul-195.1%

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

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

        \[\leadsto \color{blue}{1 - \frac{1 + \frac{0.5}{-x}}{x}} \]
      9. distribute-frac-neg295.1%

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

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

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

        \[\leadsto 1 - \frac{\color{blue}{1 - 0.5 \cdot \frac{1}{x}}}{x} \]
      13. associate-*r/95.1%

        \[\leadsto 1 - \frac{1 - \color{blue}{\frac{0.5 \cdot 1}{x}}}{x} \]
      14. metadata-eval95.1%

        \[\leadsto 1 - \frac{1 - \frac{\color{blue}{0.5}}{x}}{x} \]
    10. Simplified95.1%

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

    if 7.5000000000000004e-150 < t < 2.80000000000000019e43

    1. Initial program 51.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. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+27.5%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.9 \cdot 10^{-214}:\\ \;\;\;\;\frac{t \cdot \sqrt{x}}{\ell}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-150} \lor \neg \left(t \leq 2.8 \cdot 10^{+43}\right):\\ \;\;\;\;1 + \frac{\frac{0.5}{x} + -1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot {t}^{2} + 2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 82.5% accurate, 0.4× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sqrt{2} \cdot t\_m\\ t_3 := 2 \cdot {t\_m}^{2}\\ t_4 := x \cdot \sqrt{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 8.8 \cdot 10^{-225}:\\ \;\;\;\;\frac{t\_m \cdot \sqrt{x}}{\ell}\\ \mathbf{elif}\;t\_m \leq 1.5 \cdot 10^{-148}:\\ \;\;\;\;\frac{t\_2}{2 \cdot \frac{t\_m}{t\_4} + \left(t\_2 + \frac{{\ell}^{2}}{t\_m \cdot t\_4}\right)}\\ \mathbf{elif}\;t\_m \leq 7 \cdot 10^{+43}:\\ \;\;\;\;\frac{t\_2}{\sqrt{t\_3 + 2 \cdot \frac{{\ell}^{2} + t\_3}{x}}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\frac{0.5}{x} + -1}{x}\\ \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 (* (sqrt 2.0) t_m))
        (t_3 (* 2.0 (pow t_m 2.0)))
        (t_4 (* x (sqrt 2.0))))
   (*
    t_s
    (if (<= t_m 8.8e-225)
      (/ (* t_m (sqrt x)) l)
      (if (<= t_m 1.5e-148)
        (/ t_2 (+ (* 2.0 (/ t_m t_4)) (+ t_2 (/ (pow l 2.0) (* t_m t_4)))))
        (if (<= t_m 7e+43)
          (/ t_2 (sqrt (+ t_3 (* 2.0 (/ (+ (pow l 2.0) t_3) x)))))
          (+ 1.0 (/ (+ (/ 0.5 x) -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) {
	double t_2 = sqrt(2.0) * t_m;
	double t_3 = 2.0 * pow(t_m, 2.0);
	double t_4 = x * sqrt(2.0);
	double tmp;
	if (t_m <= 8.8e-225) {
		tmp = (t_m * sqrt(x)) / l;
	} else if (t_m <= 1.5e-148) {
		tmp = t_2 / ((2.0 * (t_m / t_4)) + (t_2 + (pow(l, 2.0) / (t_m * t_4))));
	} else if (t_m <= 7e+43) {
		tmp = t_2 / sqrt((t_3 + (2.0 * ((pow(l, 2.0) + t_3) / x))));
	} else {
		tmp = 1.0 + (((0.5 / x) + -1.0) / 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) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_2 = sqrt(2.0d0) * t_m
    t_3 = 2.0d0 * (t_m ** 2.0d0)
    t_4 = x * sqrt(2.0d0)
    if (t_m <= 8.8d-225) then
        tmp = (t_m * sqrt(x)) / l
    else if (t_m <= 1.5d-148) then
        tmp = t_2 / ((2.0d0 * (t_m / t_4)) + (t_2 + ((l ** 2.0d0) / (t_m * t_4))))
    else if (t_m <= 7d+43) then
        tmp = t_2 / sqrt((t_3 + (2.0d0 * (((l ** 2.0d0) + t_3) / x))))
    else
        tmp = 1.0d0 + (((0.5d0 / x) + (-1.0d0)) / 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 t_2 = Math.sqrt(2.0) * t_m;
	double t_3 = 2.0 * Math.pow(t_m, 2.0);
	double t_4 = x * Math.sqrt(2.0);
	double tmp;
	if (t_m <= 8.8e-225) {
		tmp = (t_m * Math.sqrt(x)) / l;
	} else if (t_m <= 1.5e-148) {
		tmp = t_2 / ((2.0 * (t_m / t_4)) + (t_2 + (Math.pow(l, 2.0) / (t_m * t_4))));
	} else if (t_m <= 7e+43) {
		tmp = t_2 / Math.sqrt((t_3 + (2.0 * ((Math.pow(l, 2.0) + t_3) / x))));
	} else {
		tmp = 1.0 + (((0.5 / x) + -1.0) / 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):
	t_2 = math.sqrt(2.0) * t_m
	t_3 = 2.0 * math.pow(t_m, 2.0)
	t_4 = x * math.sqrt(2.0)
	tmp = 0
	if t_m <= 8.8e-225:
		tmp = (t_m * math.sqrt(x)) / l
	elif t_m <= 1.5e-148:
		tmp = t_2 / ((2.0 * (t_m / t_4)) + (t_2 + (math.pow(l, 2.0) / (t_m * t_4))))
	elif t_m <= 7e+43:
		tmp = t_2 / math.sqrt((t_3 + (2.0 * ((math.pow(l, 2.0) + t_3) / x))))
	else:
		tmp = 1.0 + (((0.5 / x) + -1.0) / x)
	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(sqrt(2.0) * t_m)
	t_3 = Float64(2.0 * (t_m ^ 2.0))
	t_4 = Float64(x * sqrt(2.0))
	tmp = 0.0
	if (t_m <= 8.8e-225)
		tmp = Float64(Float64(t_m * sqrt(x)) / l);
	elseif (t_m <= 1.5e-148)
		tmp = Float64(t_2 / Float64(Float64(2.0 * Float64(t_m / t_4)) + Float64(t_2 + Float64((l ^ 2.0) / Float64(t_m * t_4)))));
	elseif (t_m <= 7e+43)
		tmp = Float64(t_2 / sqrt(Float64(t_3 + Float64(2.0 * Float64(Float64((l ^ 2.0) + t_3) / x)))));
	else
		tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) + -1.0) / 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)
	t_2 = sqrt(2.0) * t_m;
	t_3 = 2.0 * (t_m ^ 2.0);
	t_4 = x * sqrt(2.0);
	tmp = 0.0;
	if (t_m <= 8.8e-225)
		tmp = (t_m * sqrt(x)) / l;
	elseif (t_m <= 1.5e-148)
		tmp = t_2 / ((2.0 * (t_m / t_4)) + (t_2 + ((l ^ 2.0) / (t_m * t_4))));
	elseif (t_m <= 7e+43)
		tmp = t_2 / sqrt((t_3 + (2.0 * (((l ^ 2.0) + t_3) / x))));
	else
		tmp = 1.0 + (((0.5 / x) + -1.0) / 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_] := Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 8.8e-225], N[(N[(t$95$m * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], If[LessEqual[t$95$m, 1.5e-148], N[(t$95$2 / N[(N[(2.0 * N[(t$95$m / t$95$4), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 + N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7e+43], N[(t$95$2 / N[Sqrt[N[(t$95$3 + N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] + t$95$3), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] + -1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \sqrt{2} \cdot t\_m\\
t_3 := 2 \cdot {t\_m}^{2}\\
t_4 := x \cdot \sqrt{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8.8 \cdot 10^{-225}:\\
\;\;\;\;\frac{t\_m \cdot \sqrt{x}}{\ell}\\

\mathbf{elif}\;t\_m \leq 1.5 \cdot 10^{-148}:\\
\;\;\;\;\frac{t\_2}{2 \cdot \frac{t\_m}{t\_4} + \left(t\_2 + \frac{{\ell}^{2}}{t\_m \cdot t\_4}\right)}\\

\mathbf{elif}\;t\_m \leq 7 \cdot 10^{+43}:\\
\;\;\;\;\frac{t\_2}{\sqrt{t\_3 + 2 \cdot \frac{{\ell}^{2} + t\_3}{x}}}\\

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


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

    1. Initial program 31.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. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+16.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.8e-225 < t < 1.49999999999999999e-148

    1. Initial program 2.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. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+1.9%

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

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

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

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

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

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

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

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

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

    if 1.49999999999999999e-148 < t < 7.0000000000000002e43

    1. Initial program 51.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. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+27.5%

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

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

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

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

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

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

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

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

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

    if 7.0000000000000002e43 < t

    1. Initial program 40.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. Simplified40.2%

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

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

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

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

      \[\leadsto \color{blue}{1 + \left(-\frac{\frac{0.5}{-x} + 1}{x}\right)} \]
    8. Taylor expanded in x around -inf 97.1%

      \[\leadsto \color{blue}{1 + -1 \cdot \frac{1 - 0.5 \cdot \frac{1}{x}}{x}} \]
    9. Step-by-step derivation
      1. associate-*r/97.1%

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

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

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

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

        \[\leadsto 1 + \frac{-1 \cdot \left(1 + \color{blue}{\frac{0.5}{-x}}\right)}{x} \]
      6. neg-mul-197.1%

        \[\leadsto 1 + \frac{\color{blue}{-\left(1 + \frac{0.5}{-x}\right)}}{x} \]
      7. distribute-frac-neg97.1%

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

        \[\leadsto \color{blue}{1 - \frac{1 + \frac{0.5}{-x}}{x}} \]
      9. distribute-frac-neg297.1%

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

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

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

        \[\leadsto 1 - \frac{\color{blue}{1 - 0.5 \cdot \frac{1}{x}}}{x} \]
      13. associate-*r/97.1%

        \[\leadsto 1 - \frac{1 - \color{blue}{\frac{0.5 \cdot 1}{x}}}{x} \]
      14. metadata-eval97.1%

        \[\leadsto 1 - \frac{1 - \frac{\color{blue}{0.5}}{x}}{x} \]
    10. Simplified97.1%

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

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

Alternative 6: 80.9% 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.6 \cdot 10^{-219}:\\ \;\;\;\;\frac{t\_m \cdot \sqrt{x}}{\ell}\\ \mathbf{elif}\;t\_m \leq 7.5 \cdot 10^{-150} \lor \neg \left(t\_m \leq 2.1 \cdot 10^{+43}\right):\\ \;\;\;\;1 + \frac{\frac{0.5}{x} + -1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t\_m}{\sqrt{2 \cdot {t\_m}^{2} + 2 \cdot \frac{{\ell}^{2}}{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 (<= t_m 2.6e-219)
    (/ (* t_m (sqrt x)) l)
    (if (or (<= t_m 7.5e-150) (not (<= t_m 2.1e+43)))
      (+ 1.0 (/ (+ (/ 0.5 x) -1.0) x))
      (/
       (* (sqrt 2.0) t_m)
       (sqrt (+ (* 2.0 (pow t_m 2.0)) (* 2.0 (/ (pow l 2.0) 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 (t_m <= 2.6e-219) {
		tmp = (t_m * sqrt(x)) / l;
	} else if ((t_m <= 7.5e-150) || !(t_m <= 2.1e+43)) {
		tmp = 1.0 + (((0.5 / x) + -1.0) / x);
	} else {
		tmp = (sqrt(2.0) * t_m) / sqrt(((2.0 * pow(t_m, 2.0)) + (2.0 * (pow(l, 2.0) / 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 (t_m <= 2.6d-219) then
        tmp = (t_m * sqrt(x)) / l
    else if ((t_m <= 7.5d-150) .or. (.not. (t_m <= 2.1d+43))) then
        tmp = 1.0d0 + (((0.5d0 / x) + (-1.0d0)) / x)
    else
        tmp = (sqrt(2.0d0) * t_m) / sqrt(((2.0d0 * (t_m ** 2.0d0)) + (2.0d0 * ((l ** 2.0d0) / 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 (t_m <= 2.6e-219) {
		tmp = (t_m * Math.sqrt(x)) / l;
	} else if ((t_m <= 7.5e-150) || !(t_m <= 2.1e+43)) {
		tmp = 1.0 + (((0.5 / x) + -1.0) / x);
	} else {
		tmp = (Math.sqrt(2.0) * t_m) / Math.sqrt(((2.0 * Math.pow(t_m, 2.0)) + (2.0 * (Math.pow(l, 2.0) / 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 t_m <= 2.6e-219:
		tmp = (t_m * math.sqrt(x)) / l
	elif (t_m <= 7.5e-150) or not (t_m <= 2.1e+43):
		tmp = 1.0 + (((0.5 / x) + -1.0) / x)
	else:
		tmp = (math.sqrt(2.0) * t_m) / math.sqrt(((2.0 * math.pow(t_m, 2.0)) + (2.0 * (math.pow(l, 2.0) / 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 (t_m <= 2.6e-219)
		tmp = Float64(Float64(t_m * sqrt(x)) / l);
	elseif ((t_m <= 7.5e-150) || !(t_m <= 2.1e+43))
		tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) + -1.0) / x));
	else
		tmp = Float64(Float64(sqrt(2.0) * t_m) / sqrt(Float64(Float64(2.0 * (t_m ^ 2.0)) + Float64(2.0 * Float64((l ^ 2.0) / 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 (t_m <= 2.6e-219)
		tmp = (t_m * sqrt(x)) / l;
	elseif ((t_m <= 7.5e-150) || ~((t_m <= 2.1e+43)))
		tmp = 1.0 + (((0.5 / x) + -1.0) / x);
	else
		tmp = (sqrt(2.0) * t_m) / sqrt(((2.0 * (t_m ^ 2.0)) + (2.0 * ((l ^ 2.0) / 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[t$95$m, 2.6e-219], N[(N[(t$95$m * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], If[Or[LessEqual[t$95$m, 7.5e-150], N[Not[LessEqual[t$95$m, 2.1e+43]], $MachinePrecision]], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] + -1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[Sqrt[N[(N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $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.6 \cdot 10^{-219}:\\
\;\;\;\;\frac{t\_m \cdot \sqrt{x}}{\ell}\\

\mathbf{elif}\;t\_m \leq 7.5 \cdot 10^{-150} \lor \neg \left(t\_m \leq 2.1 \cdot 10^{+43}\right):\\
\;\;\;\;1 + \frac{\frac{0.5}{x} + -1}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t\_m}{\sqrt{2 \cdot {t\_m}^{2} + 2 \cdot \frac{{\ell}^{2}}{x}}}\\


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

    1. Initial program 31.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+15.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.60000000000000002e-219 < t < 7.5000000000000004e-150 or 2.10000000000000002e43 < 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.2%

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

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

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

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

      \[\leadsto \color{blue}{1 + \left(-\frac{\frac{0.5}{-x} + 1}{x}\right)} \]
    8. Taylor expanded in x around -inf 95.1%

      \[\leadsto \color{blue}{1 + -1 \cdot \frac{1 - 0.5 \cdot \frac{1}{x}}{x}} \]
    9. Step-by-step derivation
      1. associate-*r/95.1%

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

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

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

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

        \[\leadsto 1 + \frac{-1 \cdot \left(1 + \color{blue}{\frac{0.5}{-x}}\right)}{x} \]
      6. neg-mul-195.1%

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

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

        \[\leadsto \color{blue}{1 - \frac{1 + \frac{0.5}{-x}}{x}} \]
      9. distribute-frac-neg295.1%

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

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

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

        \[\leadsto 1 - \frac{\color{blue}{1 - 0.5 \cdot \frac{1}{x}}}{x} \]
      13. associate-*r/95.1%

        \[\leadsto 1 - \frac{1 - \color{blue}{\frac{0.5 \cdot 1}{x}}}{x} \]
      14. metadata-eval95.1%

        \[\leadsto 1 - \frac{1 - \frac{\color{blue}{0.5}}{x}}{x} \]
    10. Simplified95.1%

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

    if 7.5000000000000004e-150 < t < 2.10000000000000002e43

    1. Initial program 51.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. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+27.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.6 \cdot 10^{-219}:\\ \;\;\;\;\frac{t \cdot \sqrt{x}}{\ell}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-150} \lor \neg \left(t \leq 2.1 \cdot 10^{+43}\right):\\ \;\;\;\;1 + \frac{\frac{0.5}{x} + -1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot {t}^{2} + 2 \cdot \frac{{\ell}^{2}}{x}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 78.6% accurate, 1.1× 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.8 \cdot 10^{+193}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\ell \cdot \sqrt{\frac{2}{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.8e+193)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (* (sqrt 2.0) (/ t_m (* l (sqrt (/ 2.0 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.8e+193) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = sqrt(2.0) * (t_m / (l * sqrt((2.0 / 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.8d+193) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else
        tmp = sqrt(2.0d0) * (t_m / (l * sqrt((2.0d0 / 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.8e+193) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = Math.sqrt(2.0) * (t_m / (l * Math.sqrt((2.0 / 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.8e+193:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	else:
		tmp = math.sqrt(2.0) * (t_m / (l * math.sqrt((2.0 / 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.8e+193)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	else
		tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(l * sqrt(Float64(2.0 / 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.8e+193)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	else
		tmp = sqrt(2.0) * (t_m / (l * sqrt((2.0 / 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.8e+193], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $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}\;\ell \leq 5.8 \cdot 10^{+193}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

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


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

    1. Initial program 37.7%

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

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

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

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

    if 5.80000000000000026e193 < l

    1. Initial program 0.0%

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

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

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

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

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

Alternative 8: 78.6% accurate, 2.0× 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 \cdot 10^{+194}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{t\_m}{{x}^{-0.5}}}{\ell}\\ \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 5e+194)
    (sqrt (/ (+ x -1.0) (+ x 1.0)))
    (/ (/ t_m (pow x -0.5)) 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 (l <= 5e+194) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = (t_m / pow(x, -0.5)) / l;
	}
	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 <= 5d+194) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else
        tmp = (t_m / (x ** (-0.5d0))) / l
    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 <= 5e+194) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = (t_m / Math.pow(x, -0.5)) / 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 l <= 5e+194:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	else:
		tmp = (t_m / math.pow(x, -0.5)) / 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 (l <= 5e+194)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	else
		tmp = Float64(Float64(t_m / (x ^ -0.5)) / 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 (l <= 5e+194)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	else
		tmp = (t_m / (x ^ -0.5)) / 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[l, 5e+194], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(t$95$m / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] / l), $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 \cdot 10^{+194}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{t\_m}{{x}^{-0.5}}}{\ell}\\


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

    1. Initial program 37.7%

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

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

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

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

    if 4.99999999999999989e194 < 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. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2} \cdot \ell} \cdot \frac{t}{{x}^{-0.5}}} \]
      2. associate-*l/80.7%

        \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot \frac{t}{{x}^{-0.5}}}{\sqrt{2} \cdot \ell}} \]
      3. times-frac80.9%

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

        \[\leadsto \color{blue}{1} \cdot \frac{\frac{t}{{x}^{-0.5}}}{\ell} \]
    12. Simplified80.9%

      \[\leadsto \color{blue}{1 \cdot \frac{\frac{t}{{x}^{-0.5}}}{\ell}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification45.6%

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

Alternative 9: 78.6% accurate, 2.0× 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 2.3 \cdot 10^{+195}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_m \cdot \sqrt{x}}{\ell}\\ \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 2.3e+195) (sqrt (/ (+ x -1.0) (+ x 1.0))) (/ (* t_m (sqrt x)) 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 (l <= 2.3e+195) {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = (t_m * sqrt(x)) / l;
	}
	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 <= 2.3d+195) then
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else
        tmp = (t_m * sqrt(x)) / l
    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 <= 2.3e+195) {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else {
		tmp = (t_m * Math.sqrt(x)) / 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 l <= 2.3e+195:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	else:
		tmp = (t_m * math.sqrt(x)) / 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 (l <= 2.3e+195)
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	else
		tmp = Float64(Float64(t_m * sqrt(x)) / 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 (l <= 2.3e+195)
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	else
		tmp = (t_m * sqrt(x)) / 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[l, 2.3e+195], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(t$95$m * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / l), $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 2.3 \cdot 10^{+195}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\

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


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

    1. Initial program 37.7%

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

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

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

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

    if 2.3000000000000001e195 < 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. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 78.2% accurate, 2.0× 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 \cdot 10^{+194}:\\ \;\;\;\;1 + \frac{\frac{0.5}{x} + -1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_m \cdot \sqrt{x}}{\ell}\\ \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 5e+194) (+ 1.0 (/ (+ (/ 0.5 x) -1.0) x)) (/ (* t_m (sqrt x)) 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 (l <= 5e+194) {
		tmp = 1.0 + (((0.5 / x) + -1.0) / x);
	} else {
		tmp = (t_m * sqrt(x)) / l;
	}
	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 <= 5d+194) then
        tmp = 1.0d0 + (((0.5d0 / x) + (-1.0d0)) / x)
    else
        tmp = (t_m * sqrt(x)) / l
    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 <= 5e+194) {
		tmp = 1.0 + (((0.5 / x) + -1.0) / x);
	} else {
		tmp = (t_m * Math.sqrt(x)) / 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 l <= 5e+194:
		tmp = 1.0 + (((0.5 / x) + -1.0) / x)
	else:
		tmp = (t_m * math.sqrt(x)) / 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 (l <= 5e+194)
		tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) + -1.0) / x));
	else
		tmp = Float64(Float64(t_m * sqrt(x)) / 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 (l <= 5e+194)
		tmp = 1.0 + (((0.5 / x) + -1.0) / x);
	else
		tmp = (t_m * sqrt(x)) / 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[l, 5e+194], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] + -1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$m * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / l), $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 \cdot 10^{+194}:\\
\;\;\;\;1 + \frac{\frac{0.5}{x} + -1}{x}\\

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


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

    1. Initial program 37.7%

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

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

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

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

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

      \[\leadsto \color{blue}{1 + \left(-\frac{\frac{0.5}{-x} + 1}{x}\right)} \]
    8. Taylor expanded in x around -inf 43.4%

      \[\leadsto \color{blue}{1 + -1 \cdot \frac{1 - 0.5 \cdot \frac{1}{x}}{x}} \]
    9. Step-by-step derivation
      1. associate-*r/43.4%

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

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

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

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

        \[\leadsto 1 + \frac{-1 \cdot \left(1 + \color{blue}{\frac{0.5}{-x}}\right)}{x} \]
      6. neg-mul-143.4%

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

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

        \[\leadsto \color{blue}{1 - \frac{1 + \frac{0.5}{-x}}{x}} \]
      9. distribute-frac-neg243.4%

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

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

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

        \[\leadsto 1 - \frac{\color{blue}{1 - 0.5 \cdot \frac{1}{x}}}{x} \]
      13. associate-*r/43.4%

        \[\leadsto 1 - \frac{1 - \color{blue}{\frac{0.5 \cdot 1}{x}}}{x} \]
      14. metadata-eval43.4%

        \[\leadsto 1 - \frac{1 - \frac{\color{blue}{0.5}}{x}}{x} \]
    10. Simplified43.4%

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

    if 4.99999999999999989e194 < 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. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 76.6% accurate, 2.0× 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.6 \cdot 10^{-214}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t\_m}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\frac{0.5}{x} + -1}{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 (<= t_m 2.6e-214)
    (* (sqrt x) (/ t_m l))
    (+ 1.0 (/ (+ (/ 0.5 x) -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) {
	double tmp;
	if (t_m <= 2.6e-214) {
		tmp = sqrt(x) * (t_m / l);
	} else {
		tmp = 1.0 + (((0.5 / x) + -1.0) / 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 (t_m <= 2.6d-214) then
        tmp = sqrt(x) * (t_m / l)
    else
        tmp = 1.0d0 + (((0.5d0 / x) + (-1.0d0)) / 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 (t_m <= 2.6e-214) {
		tmp = Math.sqrt(x) * (t_m / l);
	} else {
		tmp = 1.0 + (((0.5 / x) + -1.0) / 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 t_m <= 2.6e-214:
		tmp = math.sqrt(x) * (t_m / l)
	else:
		tmp = 1.0 + (((0.5 / x) + -1.0) / 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 (t_m <= 2.6e-214)
		tmp = Float64(sqrt(x) * Float64(t_m / l));
	else
		tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) + -1.0) / 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 (t_m <= 2.6e-214)
		tmp = sqrt(x) * (t_m / l);
	else
		tmp = 1.0 + (((0.5 / x) + -1.0) / 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[t$95$m, 2.6e-214], N[(N[Sqrt[x], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] + -1.0), $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}\;t\_m \leq 2.6 \cdot 10^{-214}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t\_m}{\ell}\\

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


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

    1. Initial program 31.5%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. flip-+15.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.6e-214 < t

    1. Initial program 40.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. Simplified38.9%

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

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

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

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

      \[\leadsto \color{blue}{1 + \left(-\frac{\frac{0.5}{-x} + 1}{x}\right)} \]
    8. Taylor expanded in x around -inf 86.0%

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

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

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

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

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

        \[\leadsto 1 + \frac{-1 \cdot \left(1 + \color{blue}{\frac{0.5}{-x}}\right)}{x} \]
      6. neg-mul-186.0%

        \[\leadsto 1 + \frac{\color{blue}{-\left(1 + \frac{0.5}{-x}\right)}}{x} \]
      7. distribute-frac-neg86.0%

        \[\leadsto 1 + \color{blue}{\left(-\frac{1 + \frac{0.5}{-x}}{x}\right)} \]
      8. sub-neg86.0%

        \[\leadsto \color{blue}{1 - \frac{1 + \frac{0.5}{-x}}{x}} \]
      9. distribute-frac-neg286.0%

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

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

        \[\leadsto 1 - \frac{1 + \left(-\color{blue}{0.5 \cdot \frac{1}{x}}\right)}{x} \]
      12. sub-neg86.0%

        \[\leadsto 1 - \frac{\color{blue}{1 - 0.5 \cdot \frac{1}{x}}}{x} \]
      13. associate-*r/86.0%

        \[\leadsto 1 - \frac{1 - \color{blue}{\frac{0.5 \cdot 1}{x}}}{x} \]
      14. metadata-eval86.0%

        \[\leadsto 1 - \frac{1 - \frac{\color{blue}{0.5}}{x}}{x} \]
    10. Simplified86.0%

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

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

Alternative 12: 76.1% 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{\frac{0.5}{x} + -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 (/ (+ (/ 0.5 x) -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 + (((0.5 / x) + -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 + (((0.5d0 / x) + (-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 + (((0.5 / x) + -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 + (((0.5 / x) + -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(Float64(Float64(0.5 / x) + -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 + (((0.5 / x) + -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[(N[(N[(0.5 / x), $MachinePrecision] + -1.0), $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{\frac{0.5}{x} + -1}{x}\right)
\end{array}
Derivation
  1. Initial program 35.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. Simplified33.5%

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

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

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

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

    \[\leadsto \color{blue}{1 + \left(-\frac{\frac{0.5}{-x} + 1}{x}\right)} \]
  8. Taylor expanded in x around -inf 41.6%

    \[\leadsto \color{blue}{1 + -1 \cdot \frac{1 - 0.5 \cdot \frac{1}{x}}{x}} \]
  9. Step-by-step derivation
    1. associate-*r/41.6%

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

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

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

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

      \[\leadsto 1 + \frac{-1 \cdot \left(1 + \color{blue}{\frac{0.5}{-x}}\right)}{x} \]
    6. neg-mul-141.6%

      \[\leadsto 1 + \frac{\color{blue}{-\left(1 + \frac{0.5}{-x}\right)}}{x} \]
    7. distribute-frac-neg41.6%

      \[\leadsto 1 + \color{blue}{\left(-\frac{1 + \frac{0.5}{-x}}{x}\right)} \]
    8. sub-neg41.6%

      \[\leadsto \color{blue}{1 - \frac{1 + \frac{0.5}{-x}}{x}} \]
    9. distribute-frac-neg241.6%

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

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

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

      \[\leadsto 1 - \frac{\color{blue}{1 - 0.5 \cdot \frac{1}{x}}}{x} \]
    13. associate-*r/41.6%

      \[\leadsto 1 - \frac{1 - \color{blue}{\frac{0.5 \cdot 1}{x}}}{x} \]
    14. metadata-eval41.6%

      \[\leadsto 1 - \frac{1 - \frac{\color{blue}{0.5}}{x}}{x} \]
  10. Simplified41.6%

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

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

Alternative 13: 75.8% 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 35.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. Simplified33.5%

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

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

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

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

Alternative 14: 75.1% 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 35.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. Simplified33.5%

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

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

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

Reproduce

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