Toniolo and Linder, Equation (7)

Percentage Accurate: 33.8% → 84.4%
Time: 21.7s
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.8% accurate, 1.0× speedup?

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

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

Alternative 1: 84.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{1}{x} + -1\\ t_2 := \ell \cdot \frac{\ell}{x}\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{+96}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-112}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot t_2}}\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-269}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+120}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{{\left(t_2 + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \frac{\ell}{\frac{x}{-\ell}}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (+ (/ 1.0 x) -1.0)) (t_2 (* l (/ l x))))
   (if (<= t -1.95e+96)
     t_1
     (if (<= t -3.5e-112)
       (* t (/ (sqrt 2.0) (sqrt (+ (* 2.0 (* t (+ t (/ t x)))) (* 2.0 t_2)))))
       (if (<= t -5.2e-269)
         t_1
         (if (<= t 5.5e+120)
           (*
            t
            (/
             (sqrt 2.0)
             (pow
              (+ t_2 (- (* 2.0 (+ (* t t) (/ t (/ x t)))) (/ l (/ x (- l)))))
              0.5)))
           (+ 1.0 (/ -1.0 x))))))))
double code(double x, double l, double t) {
	double t_1 = (1.0 / x) + -1.0;
	double t_2 = l * (l / x);
	double tmp;
	if (t <= -1.95e+96) {
		tmp = t_1;
	} else if (t <= -3.5e-112) {
		tmp = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * t_2))));
	} else if (t <= -5.2e-269) {
		tmp = t_1;
	} else if (t <= 5.5e+120) {
		tmp = t * (sqrt(2.0) / pow((t_2 + ((2.0 * ((t * t) + (t / (x / t)))) - (l / (x / -l)))), 0.5));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (1.0d0 / x) + (-1.0d0)
    t_2 = l * (l / x)
    if (t <= (-1.95d+96)) then
        tmp = t_1
    else if (t <= (-3.5d-112)) then
        tmp = t * (sqrt(2.0d0) / sqrt(((2.0d0 * (t * (t + (t / x)))) + (2.0d0 * t_2))))
    else if (t <= (-5.2d-269)) then
        tmp = t_1
    else if (t <= 5.5d+120) then
        tmp = t * (sqrt(2.0d0) / ((t_2 + ((2.0d0 * ((t * t) + (t / (x / t)))) - (l / (x / -l)))) ** 0.5d0))
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = (1.0 / x) + -1.0;
	double t_2 = l * (l / x);
	double tmp;
	if (t <= -1.95e+96) {
		tmp = t_1;
	} else if (t <= -3.5e-112) {
		tmp = t * (Math.sqrt(2.0) / Math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * t_2))));
	} else if (t <= -5.2e-269) {
		tmp = t_1;
	} else if (t <= 5.5e+120) {
		tmp = t * (Math.sqrt(2.0) / Math.pow((t_2 + ((2.0 * ((t * t) + (t / (x / t)))) - (l / (x / -l)))), 0.5));
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
def code(x, l, t):
	t_1 = (1.0 / x) + -1.0
	t_2 = l * (l / x)
	tmp = 0
	if t <= -1.95e+96:
		tmp = t_1
	elif t <= -3.5e-112:
		tmp = t * (math.sqrt(2.0) / math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * t_2))))
	elif t <= -5.2e-269:
		tmp = t_1
	elif t <= 5.5e+120:
		tmp = t * (math.sqrt(2.0) / math.pow((t_2 + ((2.0 * ((t * t) + (t / (x / t)))) - (l / (x / -l)))), 0.5))
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
function code(x, l, t)
	t_1 = Float64(Float64(1.0 / x) + -1.0)
	t_2 = Float64(l * Float64(l / x))
	tmp = 0.0
	if (t <= -1.95e+96)
		tmp = t_1;
	elseif (t <= -3.5e-112)
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(2.0 * Float64(t * Float64(t + Float64(t / x)))) + Float64(2.0 * t_2)))));
	elseif (t <= -5.2e-269)
		tmp = t_1;
	elseif (t <= 5.5e+120)
		tmp = Float64(t * Float64(sqrt(2.0) / (Float64(t_2 + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(t / Float64(x / t)))) - Float64(l / Float64(x / Float64(-l))))) ^ 0.5)));
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = (1.0 / x) + -1.0;
	t_2 = l * (l / x);
	tmp = 0.0;
	if (t <= -1.95e+96)
		tmp = t_1;
	elseif (t <= -3.5e-112)
		tmp = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * t_2))));
	elseif (t <= -5.2e-269)
		tmp = t_1;
	elseif (t <= 5.5e+120)
		tmp = t * (sqrt(2.0) / ((t_2 + ((2.0 * ((t * t) + (t / (x / t)))) - (l / (x / -l)))) ^ 0.5));
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision]}, Block[{t$95$2 = N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.95e+96], t$95$1, If[LessEqual[t, -3.5e-112], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.2e-269], t$95$1, If[LessEqual[t, 5.5e+120], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[N[(t$95$2 + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(t / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l / N[(x / (-l)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{1}{x} + -1\\
t_2 := \ell \cdot \frac{\ell}{x}\\
\mathbf{if}\;t \leq -1.95 \cdot 10^{+96}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -3.5 \cdot 10^{-112}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot t_2}}\\

\mathbf{elif}\;t \leq -5.2 \cdot 10^{-269}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 5.5 \cdot 10^{+120}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{{\left(t_2 + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \frac{\ell}{\frac{x}{-\ell}}\right)\right)}^{0.5}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.95e96 or -3.49999999999999994e-112 < t < -5.2e-269

    1. Initial program 22.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. Step-by-step derivation
      1. associate-/l*22.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.95e96 < t < -3.49999999999999994e-112

    1. Initial program 69.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. Step-by-step derivation
      1. associate-*l/69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) + \left(-\color{blue}{\frac{\ell}{x} \cdot \left(-\ell\right)}\right)\right) + \frac{{\ell}^{2}}{x}}} \cdot t \]
      7. distribute-rgt-neg-in82.4%

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) + \left(-\left(-\frac{\color{blue}{{\ell}^{2}}}{x}\right)\right)\right) + \frac{{\ell}^{2}}{x}}} \cdot t \]
      10. remove-double-neg82.4%

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

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

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

    if -5.2e-269 < t < 5.50000000000000003e120

    1. Initial program 38.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. Step-by-step derivation
      1. associate-*l/38.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\color{blue}{\ell \cdot \ell}}{x}\right)}} \cdot t \]
      4. distribute-rgt-neg-in78.9%

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

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

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

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

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

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

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

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

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

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

    if 5.50000000000000003e120 < t

    1. Initial program 13.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\sqrt{\frac{1 + x}{x - 1}}}} \]
    6. Step-by-step derivation
      1. sub-neg97.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.95 \cdot 10^{+96}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-112}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-269}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+120}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{{\left(\ell \cdot \frac{\ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \frac{\ell}{\frac{x}{-\ell}}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 2: 84.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{1}{x} + -1\\ t_2 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{if}\;t \leq -5.2 \cdot 10^{+94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-112}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-266}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+121}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (+ (/ 1.0 x) -1.0))
        (t_2
         (*
          t
          (/
           (sqrt 2.0)
           (sqrt (+ (* 2.0 (* t (+ t (/ t x)))) (* 2.0 (* l (/ l x)))))))))
   (if (<= t -5.2e+94)
     t_1
     (if (<= t -3.5e-112)
       t_2
       (if (<= t -1e-266) t_1 (if (<= t 2e+121) t_2 (+ 1.0 (/ -1.0 x))))))))
double code(double x, double l, double t) {
	double t_1 = (1.0 / x) + -1.0;
	double t_2 = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))));
	double tmp;
	if (t <= -5.2e+94) {
		tmp = t_1;
	} else if (t <= -3.5e-112) {
		tmp = t_2;
	} else if (t <= -1e-266) {
		tmp = t_1;
	} else if (t <= 2e+121) {
		tmp = t_2;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (1.0d0 / x) + (-1.0d0)
    t_2 = t * (sqrt(2.0d0) / sqrt(((2.0d0 * (t * (t + (t / x)))) + (2.0d0 * (l * (l / x))))))
    if (t <= (-5.2d+94)) then
        tmp = t_1
    else if (t <= (-3.5d-112)) then
        tmp = t_2
    else if (t <= (-1d-266)) then
        tmp = t_1
    else if (t <= 2d+121) then
        tmp = t_2
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = (1.0 / x) + -1.0;
	double t_2 = t * (Math.sqrt(2.0) / Math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))));
	double tmp;
	if (t <= -5.2e+94) {
		tmp = t_1;
	} else if (t <= -3.5e-112) {
		tmp = t_2;
	} else if (t <= -1e-266) {
		tmp = t_1;
	} else if (t <= 2e+121) {
		tmp = t_2;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
def code(x, l, t):
	t_1 = (1.0 / x) + -1.0
	t_2 = t * (math.sqrt(2.0) / math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))))
	tmp = 0
	if t <= -5.2e+94:
		tmp = t_1
	elif t <= -3.5e-112:
		tmp = t_2
	elif t <= -1e-266:
		tmp = t_1
	elif t <= 2e+121:
		tmp = t_2
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
function code(x, l, t)
	t_1 = Float64(Float64(1.0 / x) + -1.0)
	t_2 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(2.0 * Float64(t * Float64(t + Float64(t / x)))) + Float64(2.0 * Float64(l * Float64(l / x)))))))
	tmp = 0.0
	if (t <= -5.2e+94)
		tmp = t_1;
	elseif (t <= -3.5e-112)
		tmp = t_2;
	elseif (t <= -1e-266)
		tmp = t_1;
	elseif (t <= 2e+121)
		tmp = t_2;
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = (1.0 / x) + -1.0;
	t_2 = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))));
	tmp = 0.0;
	if (t <= -5.2e+94)
		tmp = t_1;
	elseif (t <= -3.5e-112)
		tmp = t_2;
	elseif (t <= -1e-266)
		tmp = t_1;
	elseif (t <= 2e+121)
		tmp = t_2;
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+94], t$95$1, If[LessEqual[t, -3.5e-112], t$95$2, If[LessEqual[t, -1e-266], t$95$1, If[LessEqual[t, 2e+121], t$95$2, N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{1}{x} + -1\\
t_2 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+94}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -3.5 \cdot 10^{-112}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1 \cdot 10^{-266}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2 \cdot 10^{+121}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.1999999999999998e94 or -3.49999999999999994e-112 < t < -9.9999999999999998e-267

    1. Initial program 22.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. Step-by-step derivation
      1. associate-/l*22.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.1999999999999998e94 < t < -3.49999999999999994e-112 or -9.9999999999999998e-267 < t < 2.00000000000000007e121

    1. Initial program 48.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \frac{-\color{blue}{\ell \cdot \ell}}{x}\right)}} \cdot t \]
      4. distribute-rgt-neg-in80.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) + \left(-\color{blue}{\frac{\ell}{x} \cdot \left(-\ell\right)}\right)\right) + \frac{{\ell}^{2}}{x}}} \cdot t \]
      7. distribute-rgt-neg-in80.0%

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) + \left(-\left(-\frac{\color{blue}{{\ell}^{2}}}{x}\right)\right)\right) + \frac{{\ell}^{2}}{x}}} \cdot t \]
      10. remove-double-neg80.0%

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

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

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

    if 2.00000000000000007e121 < t

    1. Initial program 13.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\sqrt{\frac{1 + x}{x - 1}}}} \]
    6. Step-by-step derivation
      1. sub-neg97.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{+94}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-112}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-266}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+121}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 3: 76.1% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -8.5 \cdot 10^{-265}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{-121}:\\ \;\;\;\;t \cdot \frac{\sqrt{\frac{1}{\frac{1}{x} + \frac{\frac{1}{x}}{x}}}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{-1}{x}\right) + \frac{0.5}{x \cdot x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -8.5e-265)
   (- (sqrt (/ (+ x -1.0) (+ 1.0 x))))
   (if (<= t 8.8e-121)
     (* t (/ (sqrt (/ 1.0 (+ (/ 1.0 x) (/ (/ 1.0 x) x)))) l))
     (+ (+ 1.0 (/ -1.0 x)) (/ 0.5 (* x x))))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -8.5e-265) {
		tmp = -sqrt(((x + -1.0) / (1.0 + x)));
	} else if (t <= 8.8e-121) {
		tmp = t * (sqrt((1.0 / ((1.0 / x) + ((1.0 / x) / x)))) / l);
	} else {
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-8.5d-265)) then
        tmp = -sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
    else if (t <= 8.8d-121) then
        tmp = t * (sqrt((1.0d0 / ((1.0d0 / x) + ((1.0d0 / x) / x)))) / l)
    else
        tmp = (1.0d0 + ((-1.0d0) / x)) + (0.5d0 / (x * x))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -8.5e-265) {
		tmp = -Math.sqrt(((x + -1.0) / (1.0 + x)));
	} else if (t <= 8.8e-121) {
		tmp = t * (Math.sqrt((1.0 / ((1.0 / x) + ((1.0 / x) / x)))) / l);
	} else {
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -8.5e-265:
		tmp = -math.sqrt(((x + -1.0) / (1.0 + x)))
	elif t <= 8.8e-121:
		tmp = t * (math.sqrt((1.0 / ((1.0 / x) + ((1.0 / x) / x)))) / l)
	else:
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -8.5e-265)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))));
	elseif (t <= 8.8e-121)
		tmp = Float64(t * Float64(sqrt(Float64(1.0 / Float64(Float64(1.0 / x) + Float64(Float64(1.0 / x) / x)))) / l));
	else
		tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + Float64(0.5 / Float64(x * x)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -8.5e-265)
		tmp = -sqrt(((x + -1.0) / (1.0 + x)));
	elseif (t <= 8.8e-121)
		tmp = t * (sqrt((1.0 / ((1.0 / x) + ((1.0 / x) / x)))) / l);
	else
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -8.5e-265], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 8.8e-121], N[(t * N[(N[Sqrt[N[(1.0 / N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{-265}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\

\mathbf{elif}\;t \leq 8.8 \cdot 10^{-121}:\\
\;\;\;\;t \cdot \frac{\sqrt{\frac{1}{\frac{1}{x} + \frac{\frac{1}{x}}{x}}}}{\ell}\\

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


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

    1. Initial program 37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.4999999999999997e-265 < t < 8.80000000000000084e-121

    1. Initial program 5.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/5.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{{\ell}^{2}}{x} - -2 \cdot \frac{{\ell}^{2}}{{x}^{2}}}}} \cdot t \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv67.4%

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\ell \cdot \ell}{x} + 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{x}^{2}}}} \cdot t \]
      5. unpow267.4%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\ell \cdot \ell}{x} + 2 \cdot \frac{\ell \cdot \ell}{\color{blue}{x \cdot x}}}} \cdot t \]
    9. Simplified67.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \sqrt{\color{blue}{\frac{\frac{2}{2}}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}}} \]
      3. metadata-eval73.1%

        \[\leadsto t \cdot \sqrt{\frac{\color{blue}{1}}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}} \]
    13. Simplified73.1%

      \[\leadsto \color{blue}{t \cdot \sqrt{\frac{1}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}}} \]
    14. Taylor expanded in l around 0 53.6%

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

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

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

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

        \[\leadsto t \cdot \frac{\sqrt{\frac{1}{\frac{1}{x} + \frac{1}{\color{blue}{x \cdot x}}}}}{\ell} \]
      5. associate-/r*53.7%

        \[\leadsto t \cdot \frac{\sqrt{\frac{1}{\frac{1}{x} + \color{blue}{\frac{\frac{1}{x}}{x}}}}}{\ell} \]
    16. Simplified53.7%

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

    if 8.80000000000000084e-121 < t

    1. Initial program 41.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. Step-by-step derivation
      1. associate-*r/41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 76.7% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{-269}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-123}:\\ \;\;\;\;t \cdot \sqrt{\frac{x}{\ell \cdot \ell} - \frac{\frac{1}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{-1}{x}\right) + \frac{0.5}{x \cdot x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -8e-269)
   (- (sqrt (/ (+ x -1.0) (+ 1.0 x))))
   (if (<= t 3.1e-123)
     (* t (sqrt (- (/ x (* l l)) (/ (/ 1.0 l) l))))
     (+ (+ 1.0 (/ -1.0 x)) (/ 0.5 (* x x))))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -8e-269) {
		tmp = -sqrt(((x + -1.0) / (1.0 + x)));
	} else if (t <= 3.1e-123) {
		tmp = t * sqrt(((x / (l * l)) - ((1.0 / l) / l)));
	} else {
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-8d-269)) then
        tmp = -sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
    else if (t <= 3.1d-123) then
        tmp = t * sqrt(((x / (l * l)) - ((1.0d0 / l) / l)))
    else
        tmp = (1.0d0 + ((-1.0d0) / x)) + (0.5d0 / (x * x))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -8e-269) {
		tmp = -Math.sqrt(((x + -1.0) / (1.0 + x)));
	} else if (t <= 3.1e-123) {
		tmp = t * Math.sqrt(((x / (l * l)) - ((1.0 / l) / l)));
	} else {
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -8e-269:
		tmp = -math.sqrt(((x + -1.0) / (1.0 + x)))
	elif t <= 3.1e-123:
		tmp = t * math.sqrt(((x / (l * l)) - ((1.0 / l) / l)))
	else:
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -8e-269)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))));
	elseif (t <= 3.1e-123)
		tmp = Float64(t * sqrt(Float64(Float64(x / Float64(l * l)) - Float64(Float64(1.0 / l) / l))));
	else
		tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + Float64(0.5 / Float64(x * x)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -8e-269)
		tmp = -sqrt(((x + -1.0) / (1.0 + x)));
	elseif (t <= 3.1e-123)
		tmp = t * sqrt(((x / (l * l)) - ((1.0 / l) / l)));
	else
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -8e-269], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 3.1e-123], N[(t * N[Sqrt[N[(N[(x / N[(l * l), $MachinePrecision]), $MachinePrecision] - N[(N[(1.0 / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{-269}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\

\mathbf{elif}\;t \leq 3.1 \cdot 10^{-123}:\\
\;\;\;\;t \cdot \sqrt{\frac{x}{\ell \cdot \ell} - \frac{\frac{1}{\ell}}{\ell}}\\

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


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

    1. Initial program 36.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. Step-by-step derivation
      1. associate-*r/36.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.9999999999999997e-269 < t < 3.09999999999999998e-123

    1. Initial program 5.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/5.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{{\ell}^{2}}{x} - -2 \cdot \frac{{\ell}^{2}}{{x}^{2}}}}} \cdot t \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv69.2%

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\ell \cdot \ell}{x} + 2 \cdot \frac{\ell \cdot \ell}{\color{blue}{x \cdot x}}}} \cdot t \]
    9. Simplified69.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \sqrt{\color{blue}{\frac{\frac{2}{2}}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}}} \]
      3. metadata-eval75.1%

        \[\leadsto t \cdot \sqrt{\frac{\color{blue}{1}}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}} \]
    13. Simplified75.1%

      \[\leadsto \color{blue}{t \cdot \sqrt{\frac{1}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}}} \]
    14. Taylor expanded in x around inf 74.6%

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

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

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

        \[\leadsto t \cdot \sqrt{\frac{x}{\ell \cdot \ell} - \color{blue}{\frac{\frac{1}{\ell}}{\ell}}} \]
    16. Simplified74.6%

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

    if 3.09999999999999998e-123 < t

    1. Initial program 41.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. Step-by-step derivation
      1. associate-*r/41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 77.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.06 \cdot 10^{-266}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-123}:\\ \;\;\;\;t \cdot \sqrt{\frac{1}{\frac{\ell}{x} \cdot \left(\ell + \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{-1}{x}\right) + \frac{0.5}{x \cdot x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.06e-266)
   (- (sqrt (/ (+ x -1.0) (+ 1.0 x))))
   (if (<= t 7.2e-123)
     (* t (sqrt (/ 1.0 (* (/ l x) (+ l (/ l x))))))
     (+ (+ 1.0 (/ -1.0 x)) (/ 0.5 (* x x))))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.06e-266) {
		tmp = -sqrt(((x + -1.0) / (1.0 + x)));
	} else if (t <= 7.2e-123) {
		tmp = t * sqrt((1.0 / ((l / x) * (l + (l / x)))));
	} else {
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-1.06d-266)) then
        tmp = -sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
    else if (t <= 7.2d-123) then
        tmp = t * sqrt((1.0d0 / ((l / x) * (l + (l / x)))))
    else
        tmp = (1.0d0 + ((-1.0d0) / x)) + (0.5d0 / (x * x))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.06e-266) {
		tmp = -Math.sqrt(((x + -1.0) / (1.0 + x)));
	} else if (t <= 7.2e-123) {
		tmp = t * Math.sqrt((1.0 / ((l / x) * (l + (l / x)))));
	} else {
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -1.06e-266:
		tmp = -math.sqrt(((x + -1.0) / (1.0 + x)))
	elif t <= 7.2e-123:
		tmp = t * math.sqrt((1.0 / ((l / x) * (l + (l / x)))))
	else:
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -1.06e-266)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))));
	elseif (t <= 7.2e-123)
		tmp = Float64(t * sqrt(Float64(1.0 / Float64(Float64(l / x) * Float64(l + Float64(l / x))))));
	else
		tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + Float64(0.5 / Float64(x * x)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1.06e-266)
		tmp = -sqrt(((x + -1.0) / (1.0 + x)));
	elseif (t <= 7.2e-123)
		tmp = t * sqrt((1.0 / ((l / x) * (l + (l / x)))));
	else
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -1.06e-266], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 7.2e-123], N[(t * N[Sqrt[N[(1.0 / N[(N[(l / x), $MachinePrecision] * N[(l + N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.06 \cdot 10^{-266}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\

\mathbf{elif}\;t \leq 7.2 \cdot 10^{-123}:\\
\;\;\;\;t \cdot \sqrt{\frac{1}{\frac{\ell}{x} \cdot \left(\ell + \frac{\ell}{x}\right)}}\\

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


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

    1. Initial program 36.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. Step-by-step derivation
      1. associate-*r/36.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0599999999999999e-266 < t < 7.1999999999999994e-123

    1. Initial program 5.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/5.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{{\ell}^{2}}{x} - -2 \cdot \frac{{\ell}^{2}}{{x}^{2}}}}} \cdot t \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv69.2%

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\ell \cdot \ell}{x} + 2 \cdot \frac{\ell \cdot \ell}{\color{blue}{x \cdot x}}}} \cdot t \]
    9. Simplified69.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \sqrt{\color{blue}{\frac{\frac{2}{2}}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}}} \]
      3. metadata-eval75.1%

        \[\leadsto t \cdot \sqrt{\frac{\color{blue}{1}}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}} \]
      4. associate-/r/75.1%

        \[\leadsto t \cdot \sqrt{\frac{1}{\color{blue}{\frac{\ell}{x} \cdot \ell} + \frac{\ell}{x} \cdot \frac{\ell}{x}}} \]
      5. distribute-lft-out74.9%

        \[\leadsto t \cdot \sqrt{\frac{1}{\color{blue}{\frac{\ell}{x} \cdot \left(\ell + \frac{\ell}{x}\right)}}} \]
    13. Simplified74.9%

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

    if 7.1999999999999994e-123 < t

    1. Initial program 41.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. Step-by-step derivation
      1. associate-*r/41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 77.4% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{-269}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{-123}:\\ \;\;\;\;t \cdot \frac{1}{\sqrt{\frac{\ell}{x} \cdot \left(\ell + \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{-1}{x}\right) + \frac{0.5}{x \cdot x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -5.2e-269)
   (- (sqrt (/ (+ x -1.0) (+ 1.0 x))))
   (if (<= t 4.7e-123)
     (* t (/ 1.0 (sqrt (* (/ l x) (+ l (/ l x))))))
     (+ (+ 1.0 (/ -1.0 x)) (/ 0.5 (* x x))))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5.2e-269) {
		tmp = -sqrt(((x + -1.0) / (1.0 + x)));
	} else if (t <= 4.7e-123) {
		tmp = t * (1.0 / sqrt(((l / x) * (l + (l / x)))));
	} else {
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-5.2d-269)) then
        tmp = -sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
    else if (t <= 4.7d-123) then
        tmp = t * (1.0d0 / sqrt(((l / x) * (l + (l / x)))))
    else
        tmp = (1.0d0 + ((-1.0d0) / x)) + (0.5d0 / (x * x))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -5.2e-269) {
		tmp = -Math.sqrt(((x + -1.0) / (1.0 + x)));
	} else if (t <= 4.7e-123) {
		tmp = t * (1.0 / Math.sqrt(((l / x) * (l + (l / x)))));
	} else {
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -5.2e-269:
		tmp = -math.sqrt(((x + -1.0) / (1.0 + x)))
	elif t <= 4.7e-123:
		tmp = t * (1.0 / math.sqrt(((l / x) * (l + (l / x)))))
	else:
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -5.2e-269)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))));
	elseif (t <= 4.7e-123)
		tmp = Float64(t * Float64(1.0 / sqrt(Float64(Float64(l / x) * Float64(l + Float64(l / x))))));
	else
		tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + Float64(0.5 / Float64(x * x)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -5.2e-269)
		tmp = -sqrt(((x + -1.0) / (1.0 + x)));
	elseif (t <= 4.7e-123)
		tmp = t * (1.0 / sqrt(((l / x) * (l + (l / x)))));
	else
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -5.2e-269], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 4.7e-123], N[(t * N[(1.0 / N[Sqrt[N[(N[(l / x), $MachinePrecision] * N[(l + N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{-269}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\

\mathbf{elif}\;t \leq 4.7 \cdot 10^{-123}:\\
\;\;\;\;t \cdot \frac{1}{\sqrt{\frac{\ell}{x} \cdot \left(\ell + \frac{\ell}{x}\right)}}\\

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


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

    1. Initial program 36.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. Step-by-step derivation
      1. associate-*r/36.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.2e-269 < t < 4.7000000000000002e-123

    1. Initial program 5.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/5.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{{\ell}^{2}}{x} - -2 \cdot \frac{{\ell}^{2}}{{x}^{2}}}}} \cdot t \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv69.2%

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\ell \cdot \ell}{x} + 2 \cdot \frac{\ell \cdot \ell}{\color{blue}{x \cdot x}}}} \cdot t \]
    9. Simplified69.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \sqrt{\color{blue}{\frac{\frac{2}{2}}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}}} \]
      3. metadata-eval75.1%

        \[\leadsto t \cdot \sqrt{\frac{\color{blue}{1}}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}} \]
    13. Simplified75.1%

      \[\leadsto \color{blue}{t \cdot \sqrt{\frac{1}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}}} \]
    14. Step-by-step derivation
      1. sqrt-div75.1%

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

        \[\leadsto t \cdot \frac{\color{blue}{1}}{\sqrt{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}} \]
      3. div-inv75.1%

        \[\leadsto t \cdot \frac{1}{\sqrt{\color{blue}{\ell \cdot \frac{1}{\frac{x}{\ell}}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}} \]
      4. clear-num75.1%

        \[\leadsto t \cdot \frac{1}{\sqrt{\ell \cdot \color{blue}{\frac{\ell}{x}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}} \]
      5. pow275.1%

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

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

        \[\leadsto t \cdot \frac{1}{\sqrt{\ell \cdot \frac{\ell}{x} + \color{blue}{\frac{\ell}{x} \cdot \frac{\ell}{x}}}} \]
      2. distribute-rgt-out75.0%

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

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

    if 4.7000000000000002e-123 < t

    1. Initial program 41.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. Step-by-step derivation
      1. associate-*r/41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 76.6% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{0.5}{x \cdot x}\\ \mathbf{if}\;t \leq -6.1 \cdot 10^{-267}:\\ \;\;\;\;\frac{1}{x} - \left(1 + t_1\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-123}:\\ \;\;\;\;t \cdot \sqrt{\frac{x}{\ell \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{-1}{x}\right) + t_1\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ 0.5 (* x x))))
   (if (<= t -6.1e-267)
     (- (/ 1.0 x) (+ 1.0 t_1))
     (if (<= t 3.1e-123)
       (* t (sqrt (/ x (* l l))))
       (+ (+ 1.0 (/ -1.0 x)) t_1)))))
double code(double x, double l, double t) {
	double t_1 = 0.5 / (x * x);
	double tmp;
	if (t <= -6.1e-267) {
		tmp = (1.0 / x) - (1.0 + t_1);
	} else if (t <= 3.1e-123) {
		tmp = t * sqrt((x / (l * l)));
	} else {
		tmp = (1.0 + (-1.0 / x)) + t_1;
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 0.5d0 / (x * x)
    if (t <= (-6.1d-267)) then
        tmp = (1.0d0 / x) - (1.0d0 + t_1)
    else if (t <= 3.1d-123) then
        tmp = t * sqrt((x / (l * l)))
    else
        tmp = (1.0d0 + ((-1.0d0) / x)) + t_1
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = 0.5 / (x * x);
	double tmp;
	if (t <= -6.1e-267) {
		tmp = (1.0 / x) - (1.0 + t_1);
	} else if (t <= 3.1e-123) {
		tmp = t * Math.sqrt((x / (l * l)));
	} else {
		tmp = (1.0 + (-1.0 / x)) + t_1;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = 0.5 / (x * x)
	tmp = 0
	if t <= -6.1e-267:
		tmp = (1.0 / x) - (1.0 + t_1)
	elif t <= 3.1e-123:
		tmp = t * math.sqrt((x / (l * l)))
	else:
		tmp = (1.0 + (-1.0 / x)) + t_1
	return tmp
function code(x, l, t)
	t_1 = Float64(0.5 / Float64(x * x))
	tmp = 0.0
	if (t <= -6.1e-267)
		tmp = Float64(Float64(1.0 / x) - Float64(1.0 + t_1));
	elseif (t <= 3.1e-123)
		tmp = Float64(t * sqrt(Float64(x / Float64(l * l))));
	else
		tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + t_1);
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = 0.5 / (x * x);
	tmp = 0.0;
	if (t <= -6.1e-267)
		tmp = (1.0 / x) - (1.0 + t_1);
	elseif (t <= 3.1e-123)
		tmp = t * sqrt((x / (l * l)));
	else
		tmp = (1.0 + (-1.0 / x)) + t_1;
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.1e-267], N[(N[(1.0 / x), $MachinePrecision] - N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e-123], N[(t * N[Sqrt[N[(x / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq -6.1 \cdot 10^{-267}:\\
\;\;\;\;\frac{1}{x} - \left(1 + t_1\right)\\

\mathbf{elif}\;t \leq 3.1 \cdot 10^{-123}:\\
\;\;\;\;t \cdot \sqrt{\frac{x}{\ell \cdot \ell}}\\

\mathbf{else}:\\
\;\;\;\;\left(1 + \frac{-1}{x}\right) + t_1\\


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

    1. Initial program 36.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. Step-by-step derivation
      1. associate-/l*36.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.10000000000000008e-267 < t < 3.09999999999999998e-123

    1. Initial program 5.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/5.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{{\ell}^{2}}{x} - -2 \cdot \frac{{\ell}^{2}}{{x}^{2}}}}} \cdot t \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv69.2%

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\ell \cdot \ell}{x} + 2 \cdot \frac{\ell \cdot \ell}{\color{blue}{x \cdot x}}}} \cdot t \]
    9. Simplified69.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \sqrt{\color{blue}{\frac{\frac{2}{2}}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}}} \]
      3. metadata-eval75.1%

        \[\leadsto t \cdot \sqrt{\frac{\color{blue}{1}}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}} \]
    13. Simplified75.1%

      \[\leadsto \color{blue}{t \cdot \sqrt{\frac{1}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}}} \]
    14. Taylor expanded in x around inf 74.5%

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

        \[\leadsto t \cdot \sqrt{\frac{x}{\color{blue}{\ell \cdot \ell}}} \]
    16. Simplified74.5%

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

    if 3.09999999999999998e-123 < t

    1. Initial program 41.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. Step-by-step derivation
      1. associate-*r/41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 76.8% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{-267}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-123}:\\ \;\;\;\;t \cdot \sqrt{\frac{x}{\ell \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{-1}{x}\right) + \frac{0.5}{x \cdot x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.25e-267)
   (- (sqrt (/ (+ x -1.0) (+ 1.0 x))))
   (if (<= t 3.9e-123)
     (* t (sqrt (/ x (* l l))))
     (+ (+ 1.0 (/ -1.0 x)) (/ 0.5 (* x x))))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.25e-267) {
		tmp = -sqrt(((x + -1.0) / (1.0 + x)));
	} else if (t <= 3.9e-123) {
		tmp = t * sqrt((x / (l * l)));
	} else {
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-1.25d-267)) then
        tmp = -sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
    else if (t <= 3.9d-123) then
        tmp = t * sqrt((x / (l * l)))
    else
        tmp = (1.0d0 + ((-1.0d0) / x)) + (0.5d0 / (x * x))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.25e-267) {
		tmp = -Math.sqrt(((x + -1.0) / (1.0 + x)));
	} else if (t <= 3.9e-123) {
		tmp = t * Math.sqrt((x / (l * l)));
	} else {
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -1.25e-267:
		tmp = -math.sqrt(((x + -1.0) / (1.0 + x)))
	elif t <= 3.9e-123:
		tmp = t * math.sqrt((x / (l * l)))
	else:
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -1.25e-267)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))));
	elseif (t <= 3.9e-123)
		tmp = Float64(t * sqrt(Float64(x / Float64(l * l))));
	else
		tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + Float64(0.5 / Float64(x * x)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1.25e-267)
		tmp = -sqrt(((x + -1.0) / (1.0 + x)));
	elseif (t <= 3.9e-123)
		tmp = t * sqrt((x / (l * l)));
	else
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -1.25e-267], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 3.9e-123], N[(t * N[Sqrt[N[(x / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{-267}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\

\mathbf{elif}\;t \leq 3.9 \cdot 10^{-123}:\\
\;\;\;\;t \cdot \sqrt{\frac{x}{\ell \cdot \ell}}\\

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


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

    1. Initial program 36.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. Step-by-step derivation
      1. associate-*r/36.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.25e-267 < t < 3.89999999999999976e-123

    1. Initial program 5.1%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/5.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{{\ell}^{2}}{x} - -2 \cdot \frac{{\ell}^{2}}{{x}^{2}}}}} \cdot t \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv69.2%

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\ell \cdot \ell}{x} + 2 \cdot \frac{\ell \cdot \ell}{\color{blue}{x \cdot x}}}} \cdot t \]
    9. Simplified69.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \sqrt{\color{blue}{\frac{\frac{2}{2}}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}}} \]
      3. metadata-eval75.1%

        \[\leadsto t \cdot \sqrt{\frac{\color{blue}{1}}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}} \]
    13. Simplified75.1%

      \[\leadsto \color{blue}{t \cdot \sqrt{\frac{1}{\frac{\ell}{\frac{x}{\ell}} + \frac{\ell}{x} \cdot \frac{\ell}{x}}}} \]
    14. Taylor expanded in x around inf 74.5%

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

        \[\leadsto t \cdot \sqrt{\frac{x}{\color{blue}{\ell \cdot \ell}}} \]
    16. Simplified74.5%

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

    if 3.89999999999999976e-123 < t

    1. Initial program 41.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. Step-by-step derivation
      1. associate-*r/41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 76.1% accurate, 17.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{-1}{x}\right) + \frac{0.5}{x \cdot x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -2e-311) (+ (/ 1.0 x) -1.0) (+ (+ 1.0 (/ -1.0 x)) (/ 0.5 (* x x)))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-311) {
		tmp = (1.0 / x) + -1.0;
	} else {
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-2d-311)) then
        tmp = (1.0d0 / x) + (-1.0d0)
    else
        tmp = (1.0d0 + ((-1.0d0) / x)) + (0.5d0 / (x * x))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-311) {
		tmp = (1.0 / x) + -1.0;
	} else {
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -2e-311:
		tmp = (1.0 / x) + -1.0
	else:
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -2e-311)
		tmp = Float64(Float64(1.0 / x) + -1.0);
	else
		tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + Float64(0.5 / Float64(x * x)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -2e-311)
		tmp = (1.0 / x) + -1.0;
	else
		tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -2e-311], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\frac{1}{x} + -1\\

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


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

    1. Initial program 35.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. Step-by-step derivation
      1. associate-/l*35.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999e-311 < t

    1. Initial program 33.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\sqrt{\frac{1 + x}{x - 1}}}} \]
    6. Step-by-step derivation
      1. sub-neg68.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 76.2% accurate, 17.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{0.5}{x \cdot x}\\ \mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\ \;\;\;\;\frac{1}{x} - \left(1 + t_1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{-1}{x}\right) + t_1\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ 0.5 (* x x))))
   (if (<= t -2e-311) (- (/ 1.0 x) (+ 1.0 t_1)) (+ (+ 1.0 (/ -1.0 x)) t_1))))
double code(double x, double l, double t) {
	double t_1 = 0.5 / (x * x);
	double tmp;
	if (t <= -2e-311) {
		tmp = (1.0 / x) - (1.0 + t_1);
	} else {
		tmp = (1.0 + (-1.0 / x)) + t_1;
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 0.5d0 / (x * x)
    if (t <= (-2d-311)) then
        tmp = (1.0d0 / x) - (1.0d0 + t_1)
    else
        tmp = (1.0d0 + ((-1.0d0) / x)) + t_1
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double t_1 = 0.5 / (x * x);
	double tmp;
	if (t <= -2e-311) {
		tmp = (1.0 / x) - (1.0 + t_1);
	} else {
		tmp = (1.0 + (-1.0 / x)) + t_1;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = 0.5 / (x * x)
	tmp = 0
	if t <= -2e-311:
		tmp = (1.0 / x) - (1.0 + t_1)
	else:
		tmp = (1.0 + (-1.0 / x)) + t_1
	return tmp
function code(x, l, t)
	t_1 = Float64(0.5 / Float64(x * x))
	tmp = 0.0
	if (t <= -2e-311)
		tmp = Float64(Float64(1.0 / x) - Float64(1.0 + t_1));
	else
		tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + t_1);
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = 0.5 / (x * x);
	tmp = 0.0;
	if (t <= -2e-311)
		tmp = (1.0 / x) - (1.0 + t_1);
	else
		tmp = (1.0 + (-1.0 / x)) + t_1;
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := Block[{t$95$1 = N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-311], N[(N[(1.0 / x), $MachinePrecision] - N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\frac{1}{x} - \left(1 + t_1\right)\\

\mathbf{else}:\\
\;\;\;\;\left(1 + \frac{-1}{x}\right) + t_1\\


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

    1. Initial program 35.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. Step-by-step derivation
      1. associate-/l*35.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999e-311 < t

    1. Initial program 33.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\sqrt{\frac{1 + x}{x - 1}}}} \]
    6. Step-by-step derivation
      1. sub-neg68.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 75.7% accurate, 31.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -2e-311) -1.0 (+ 1.0 (/ -1.0 x))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-311) {
		tmp = -1.0;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-2d-311)) then
        tmp = -1.0d0
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-311) {
		tmp = -1.0;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -2e-311:
		tmp = -1.0
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -2e-311)
		tmp = -1.0;
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -2e-311)
		tmp = -1.0;
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -2e-311], -1.0, N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\
\;\;\;\;-1\\

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


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

    1. Initial program 35.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. Step-by-step derivation
      1. associate-/l*35.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999e-311 < t

    1. Initial program 33.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\sqrt{\frac{1 + x}{x - 1}}}} \]
    6. Step-by-step derivation
      1. sub-neg68.9%

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

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

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

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

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

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

Alternative 12: 76.0% accurate, 31.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -2e-311) (+ (/ 1.0 x) -1.0) (+ 1.0 (/ -1.0 x))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-311) {
		tmp = (1.0 / x) + -1.0;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-2d-311)) then
        tmp = (1.0d0 / x) + (-1.0d0)
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-311) {
		tmp = (1.0 / x) + -1.0;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -2e-311:
		tmp = (1.0 / x) + -1.0
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -2e-311)
		tmp = Float64(Float64(1.0 / x) + -1.0);
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -2e-311)
		tmp = (1.0 / x) + -1.0;
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -2e-311], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\frac{1}{x} + -1\\

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


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

    1. Initial program 35.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. Step-by-step derivation
      1. associate-/l*35.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999e-311 < t

    1. Initial program 33.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\sqrt{\frac{1 + x}{x - 1}}}} \]
    6. Step-by-step derivation
      1. sub-neg68.9%

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

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

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

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

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

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

Alternative 13: 75.4% accurate, 73.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
(FPCore (x l t) :precision binary64 (if (<= t -2e-311) -1.0 1.0))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-311) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-2d-311)) then
        tmp = -1.0d0
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -2e-311) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -2e-311:
		tmp = -1.0
	else:
		tmp = 1.0
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -2e-311)
		tmp = -1.0;
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -2e-311)
		tmp = -1.0;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -2e-311], -1.0, 1.0]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\
\;\;\;\;-1\\

\mathbf{else}:\\
\;\;\;\;1\\


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

    1. Initial program 35.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. Step-by-step derivation
      1. associate-/l*35.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999e-311 < t

    1. Initial program 33.0%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*l/33.2%

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

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

      \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{0.5}} \]
    5. Step-by-step derivation
      1. sqrt-unprod68.2%

        \[\leadsto \color{blue}{\sqrt{2 \cdot 0.5}} \]
      2. metadata-eval68.2%

        \[\leadsto \sqrt{\color{blue}{1}} \]
      3. metadata-eval68.2%

        \[\leadsto \color{blue}{1} \]
    6. Applied egg-rr68.2%

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification73.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 14: 38.6% accurate, 225.0× speedup?

\[\begin{array}{l} \\ -1 \end{array} \]
(FPCore (x l t) :precision binary64 -1.0)
double code(double x, double l, double t) {
	return -1.0;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    code = -1.0d0
end function
public static double code(double x, double l, double t) {
	return -1.0;
}
def code(x, l, t):
	return -1.0
function code(x, l, t)
	return -1.0
end
function tmp = code(x, l, t)
	tmp = -1.0;
end
code[x_, l_, t_] := -1.0
\begin{array}{l}

\\
-1
\end{array}
Derivation
  1. Initial program 34.2%

    \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
  2. Step-by-step derivation
    1. associate-/l*34.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{-1} \]
  8. Final simplification41.6%

    \[\leadsto -1 \]

Reproduce

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