Toniolo and Linder, Equation (7)

Percentage Accurate: 32.8% → 81.6%
Time: 20.2s
Alternatives: 9
Speedup: 225.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 9 alternatives:

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

Initial Program: 32.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: 81.6% accurate, 0.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{-127}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-155}:\\ \;\;\;\;t \cdot \left(\sqrt{\frac{1}{\frac{2}{x} + \frac{2}{x \cdot x}}} \cdot \frac{\sqrt{2}}{\ell}\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+20}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(t \cdot 2, t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{1 + x}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -9e-127)
   (+ -1.0 (/ 1.0 x))
   (if (<= t 6.2e-155)
     (* t (* (sqrt (/ 1.0 (+ (/ 2.0 x) (/ 2.0 (* x x))))) (/ (sqrt 2.0) l)))
     (if (<= t 1.8e+20)
       (*
        t
        (/
         (sqrt 2.0)
         (sqrt
          (+
           (/ (* l l) x)
           (+
            (* 2.0 (+ (* t t) (/ (* t t) x)))
            (/ (fma (* t 2.0) t (* l l)) x))))))
       (sqrt (/ (+ -1.0 x) (+ 1.0 x)))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -9e-127) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 6.2e-155) {
		tmp = t * (sqrt((1.0 / ((2.0 / x) + (2.0 / (x * x))))) * (sqrt(2.0) / l));
	} else if (t <= 1.8e+20) {
		tmp = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma((t * 2.0), t, (l * l)) / x)))));
	} else {
		tmp = sqrt(((-1.0 + x) / (1.0 + x)));
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -9e-127)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	elseif (t <= 6.2e-155)
		tmp = Float64(t * Float64(sqrt(Float64(1.0 / Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))) * Float64(sqrt(2.0) / l)));
	elseif (t <= 1.8e+20)
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(Float64(t * 2.0), t, Float64(l * l)) / x))))));
	else
		tmp = sqrt(Float64(Float64(-1.0 + x) / Float64(1.0 + x)));
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -9e-127], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e-155], N[(t * N[(N[Sqrt[N[(1.0 / N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+20], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * 2.0), $MachinePrecision] * t + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{-127}:\\
\;\;\;\;-1 + \frac{1}{x}\\

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

\mathbf{elif}\;t \leq 1.8 \cdot 10^{+20}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(t \cdot 2, t, \ell \cdot \ell\right)}{x}\right)}}\\

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


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

    1. Initial program 41.4%

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

        \[\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. Simplified41.5%

      \[\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. Step-by-step derivation
      1. sqrt-undiv41.6%

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

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

        \[\leadsto \sqrt{\frac{2}{\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)}} \cdot t \]
      4. fma-udef41.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{-1}\right)}^{2} + \frac{1}{x}} \]
    10. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} + \frac{1}{x} \]
      2. rem-square-sqrt87.9%

        \[\leadsto \color{blue}{-1} + \frac{1}{x} \]
    11. Simplified87.9%

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

    if -8.9999999999999998e-127 < t < 6.2e-155

    1. Initial program 5.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/5.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. Simplified5.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 39.5%

      \[\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+39.5%

        \[\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. unpow239.5%

        \[\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-neg39.5%

        \[\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. Simplified39.5%

      \[\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 l around inf 41.2%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}} \cdot t \]
    10. Taylor expanded in l around 0 41.2%

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

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

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

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

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

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

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

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

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

    if 6.2e-155 < t < 1.8e20

    1. Initial program 32.3%

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

        \[\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. Simplified32.4%

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

      \[\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+90.5%

        \[\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. unpow290.5%

        \[\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-out90.5%

        \[\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. unpow290.5%

        \[\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. unpow290.5%

        \[\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/90.5%

        \[\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-neg90.5%

        \[\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. +-commutative90.5%

        \[\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. unpow290.5%

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

        \[\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. unpow290.5%

        \[\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-udef90.5%

        \[\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. Simplified90.5%

      \[\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 \]

    if 1.8e20 < t

    1. Initial program 41.4%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. associate-*r/41.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-neg41.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-neg41.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-eval41.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. +-commutative41.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-def41.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-in41.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. Simplified41.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-rr85.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{-127}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-155}:\\ \;\;\;\;t \cdot \left(\sqrt{\frac{1}{\frac{2}{x} + \frac{2}{x \cdot x}}} \cdot \frac{\sqrt{2}}{\ell}\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+20}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(t \cdot 2, t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{1 + x}}\\ \end{array} \]

Alternative 2: 78.8% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{-127}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-123}:\\ \;\;\;\;t \cdot \left(\sqrt{\frac{1}{\frac{2}{x} + \frac{2}{x \cdot x}}} \cdot \frac{\sqrt{2}}{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{1 + x}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -9e-127)
   (+ -1.0 (/ 1.0 x))
   (if (<= t 6.5e-123)
     (* t (* (sqrt (/ 1.0 (+ (/ 2.0 x) (/ 2.0 (* x x))))) (/ (sqrt 2.0) l)))
     (sqrt (/ (+ -1.0 x) (+ 1.0 x))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -9e-127) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 6.5e-123) {
		tmp = t * (sqrt((1.0 / ((2.0 / x) + (2.0 / (x * x))))) * (sqrt(2.0) / l));
	} else {
		tmp = sqrt(((-1.0 + x) / (1.0 + x)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-9d-127)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else if (t <= 6.5d-123) then
        tmp = t * (sqrt((1.0d0 / ((2.0d0 / x) + (2.0d0 / (x * x))))) * (sqrt(2.0d0) / l))
    else
        tmp = sqrt((((-1.0d0) + x) / (1.0d0 + x)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -9e-127) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 6.5e-123) {
		tmp = t * (Math.sqrt((1.0 / ((2.0 / x) + (2.0 / (x * x))))) * (Math.sqrt(2.0) / l));
	} else {
		tmp = Math.sqrt(((-1.0 + x) / (1.0 + x)));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -9e-127:
		tmp = -1.0 + (1.0 / x)
	elif t <= 6.5e-123:
		tmp = t * (math.sqrt((1.0 / ((2.0 / x) + (2.0 / (x * x))))) * (math.sqrt(2.0) / l))
	else:
		tmp = math.sqrt(((-1.0 + x) / (1.0 + x)))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -9e-127)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	elseif (t <= 6.5e-123)
		tmp = Float64(t * Float64(sqrt(Float64(1.0 / Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))) * Float64(sqrt(2.0) / l)));
	else
		tmp = sqrt(Float64(Float64(-1.0 + x) / Float64(1.0 + x)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -9e-127)
		tmp = -1.0 + (1.0 / x);
	elseif (t <= 6.5e-123)
		tmp = t * (sqrt((1.0 / ((2.0 / x) + (2.0 / (x * x))))) * (sqrt(2.0) / l));
	else
		tmp = sqrt(((-1.0 + x) / (1.0 + x)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -9e-127], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e-123], N[(t * N[(N[Sqrt[N[(1.0 / N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{-127}:\\
\;\;\;\;-1 + \frac{1}{x}\\

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

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


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

    1. Initial program 41.4%

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

        \[\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. Simplified41.5%

      \[\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. Step-by-step derivation
      1. sqrt-undiv41.6%

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

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

        \[\leadsto \sqrt{\frac{2}{\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)}} \cdot t \]
      4. fma-udef41.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{-1}\right)}^{2} + \frac{1}{x}} \]
    10. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} + \frac{1}{x} \]
      2. rem-square-sqrt87.9%

        \[\leadsto \color{blue}{-1} + \frac{1}{x} \]
    11. Simplified87.9%

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

    if -8.9999999999999998e-127 < t < 6.49999999999999938e-123

    1. Initial program 4.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/4.9%

        \[\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. Simplified4.9%

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

      \[\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+43.8%

        \[\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. unpow243.8%

        \[\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-neg43.8%

        \[\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. Simplified43.8%

      \[\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 l around inf 41.3%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1}{{x}^{2}} + 2 \cdot \frac{1}{x}} \cdot \ell}} \cdot t \]
    8. Step-by-step derivation
      1. *-commutative41.3%

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}} \cdot t \]
    10. Taylor expanded in l around 0 41.3%

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

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

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

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

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

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

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

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

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

    if 6.49999999999999938e-123 < t

    1. Initial program 41.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/41.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-neg41.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-neg41.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-eval41.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. +-commutative41.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-def41.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-in41.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. Simplified41.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-rr75.6%

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

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

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

Alternative 3: 79.0% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{-127}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-130}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{1 + x}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -9e-127)
   (+ -1.0 (/ 1.0 x))
   (if (<= t 2.4e-130)
     (* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
     (sqrt (/ (+ -1.0 x) (+ 1.0 x))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -9e-127) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 2.4e-130) {
		tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
	} else {
		tmp = sqrt(((-1.0 + x) / (1.0 + x)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-9d-127)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else if (t <= 2.4d-130) then
        tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x))))))
    else
        tmp = sqrt((((-1.0d0) + x) / (1.0d0 + x)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -9e-127) {
		tmp = -1.0 + (1.0 / x);
	} else if (t <= 2.4e-130) {
		tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x))))));
	} else {
		tmp = Math.sqrt(((-1.0 + x) / (1.0 + x)));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -9e-127:
		tmp = -1.0 + (1.0 / x)
	elif t <= 2.4e-130:
		tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x))))))
	else:
		tmp = math.sqrt(((-1.0 + x) / (1.0 + x)))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -9e-127)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	elseif (t <= 2.4e-130)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x)))))));
	else
		tmp = sqrt(Float64(Float64(-1.0 + x) / Float64(1.0 + x)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -9e-127)
		tmp = -1.0 + (1.0 / x);
	elseif (t <= 2.4e-130)
		tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
	else
		tmp = sqrt(((-1.0 + x) / (1.0 + x)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -9e-127], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-130], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{-127}:\\
\;\;\;\;-1 + \frac{1}{x}\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{-130}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\

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


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

    1. Initial program 41.4%

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

        \[\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. Simplified41.5%

      \[\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. Step-by-step derivation
      1. sqrt-undiv41.6%

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

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

        \[\leadsto \sqrt{\frac{2}{\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)}} \cdot t \]
      4. fma-udef41.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{-1}\right)}^{2} + \frac{1}{x}} \]
    10. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} + \frac{1}{x} \]
      2. rem-square-sqrt87.9%

        \[\leadsto \color{blue}{-1} + \frac{1}{x} \]
    11. Simplified87.9%

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

    if -8.9999999999999998e-127 < t < 2.39999999999999997e-130

    1. Initial program 4.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/4.9%

        \[\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. Simplified4.9%

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

      \[\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+43.8%

        \[\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. unpow243.8%

        \[\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-neg43.8%

        \[\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. Simplified43.8%

      \[\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 l around inf 41.3%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1}{{x}^{2}} + 2 \cdot \frac{1}{x}} \cdot \ell}} \cdot t \]
    8. Step-by-step derivation
      1. *-commutative41.3%

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

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

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

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

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

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

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

    if 2.39999999999999997e-130 < t

    1. Initial program 41.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/41.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-neg41.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-neg41.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-eval41.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. +-commutative41.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-def41.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-in41.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. Simplified41.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-rr75.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{-127}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-130}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{1 + x}}\\ \end{array} \]

Alternative 4: 76.0% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{1 + x}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -5e-310) (+ -1.0 (/ 1.0 x)) (sqrt (/ (+ -1.0 x) (+ 1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = sqrt(((-1.0 + x) / (1.0 + x)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-5d-310)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else
        tmp = sqrt((((-1.0d0) + x) / (1.0d0 + x)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = Math.sqrt(((-1.0 + x) / (1.0 + x)));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = -1.0 + (1.0 / x)
	else:
		tmp = math.sqrt(((-1.0 + x) / (1.0 + x)))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-310)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	else
		tmp = sqrt(Float64(Float64(-1.0 + x) / Float64(1.0 + x)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -5e-310)
		tmp = -1.0 + (1.0 / x);
	else
		tmp = sqrt(((-1.0 + x) / (1.0 + x)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1 + \frac{1}{x}\\

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


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

    1. Initial program 31.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/31.3%

        \[\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. Simplified31.3%

      \[\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. Step-by-step derivation
      1. sqrt-undiv30.9%

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

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

        \[\leadsto \sqrt{\frac{2}{\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)}} \cdot t \]
      4. fma-udef30.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{-1}\right)}^{2} + \frac{1}{x}} \]
    10. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} + \frac{1}{x} \]
      2. rem-square-sqrt73.7%

        \[\leadsto \color{blue}{-1} + \frac{1}{x} \]
    11. Simplified73.7%

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

    if -4.999999999999985e-310 < t

    1. Initial program 34.6%

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

        \[\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-neg34.6%

        \[\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-neg34.6%

        \[\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-eval34.6%

        \[\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. +-commutative34.6%

        \[\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-def34.6%

        \[\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-in34.6%

        \[\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. Simplified34.6%

      \[\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-rr66.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{1 + x}}\\ \end{array} \]

Alternative 5: 75.8% accurate, 17.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -5e-310) (+ -1.0 (/ 1.0 x)) (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-5d-310)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else
        tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = -1.0 + (1.0 / x)
	else:
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-310)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	else
		tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -5e-310)
		tmp = -1.0 + (1.0 / x);
	else
		tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1 + \frac{1}{x}\\

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


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

    1. Initial program 31.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/31.3%

        \[\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. Simplified31.3%

      \[\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. Step-by-step derivation
      1. sqrt-undiv30.9%

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

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

        \[\leadsto \sqrt{\frac{2}{\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)}} \cdot t \]
      4. fma-udef30.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{-1}\right)}^{2} + \frac{1}{x}} \]
    10. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} + \frac{1}{x} \]
      2. rem-square-sqrt73.7%

        \[\leadsto \color{blue}{-1} + \frac{1}{x} \]
    11. Simplified73.7%

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

    if -4.999999999999985e-310 < t

    1. Initial program 34.6%

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

        \[\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. Simplified34.7%

      \[\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. Step-by-step derivation
      1. sqrt-undiv34.7%

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

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

        \[\leadsto \sqrt{\frac{2}{\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)}} \cdot t \]
      4. fma-udef34.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 75.2% accurate, 31.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t) :precision binary64 (if (<= t -5e-310) (+ -1.0 (/ 1.0 x)) 1.0))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0;
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-5d-310)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = -1.0 + (1.0 / x)
	else:
		tmp = 1.0
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-310)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	else
		tmp = 1.0;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -5e-310)
		tmp = -1.0 + (1.0 / x);
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1 + \frac{1}{x}\\

\mathbf{else}:\\
\;\;\;\;1\\


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

    1. Initial program 31.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/31.3%

        \[\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. Simplified31.3%

      \[\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. Step-by-step derivation
      1. sqrt-undiv30.9%

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

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

        \[\leadsto \sqrt{\frac{2}{\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)}} \cdot t \]
      4. fma-udef30.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{-1}\right)}^{2} + \frac{1}{x}} \]
    10. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} + \frac{1}{x} \]
      2. rem-square-sqrt73.7%

        \[\leadsto \color{blue}{-1} + \frac{1}{x} \]
    11. Simplified73.7%

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

    if -4.999999999999985e-310 < t

    1. Initial program 34.6%

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

        \[\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. Simplified34.7%

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

      \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{0.5}} \]
    5. Step-by-step derivation
      1. sqrt-unprod79.0%

        \[\leadsto \color{blue}{\sqrt{2 \cdot 0.5}} \]
      2. metadata-eval79.0%

        \[\leadsto \sqrt{\color{blue}{1}} \]
      3. metadata-eval79.0%

        \[\leadsto \color{blue}{1} \]
    6. Applied egg-rr79.0%

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 7: 75.6% accurate, 31.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -5e-310) (+ -1.0 (/ 1.0 x)) (+ 1.0 (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-5d-310)) then
        tmp = (-1.0d0) + (1.0d0 / x)
    else
        tmp = 1.0d0 + ((-1.0d0) / x)
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0 + (1.0 / x);
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = -1.0 + (1.0 / x)
	else:
		tmp = 1.0 + (-1.0 / x)
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-310)
		tmp = Float64(-1.0 + Float64(1.0 / x));
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -5e-310)
		tmp = -1.0 + (1.0 / x);
	else
		tmp = 1.0 + (-1.0 / x);
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1 + \frac{1}{x}\\

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


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

    1. Initial program 31.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/31.3%

        \[\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. Simplified31.3%

      \[\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. Step-by-step derivation
      1. sqrt-undiv30.9%

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

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

        \[\leadsto \sqrt{\frac{2}{\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)}} \cdot t \]
      4. fma-udef30.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{-1}\right)}^{2} + \frac{1}{x}} \]
    10. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} + \frac{1}{x} \]
      2. rem-square-sqrt73.7%

        \[\leadsto \color{blue}{-1} + \frac{1}{x} \]
    11. Simplified73.7%

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

    if -4.999999999999985e-310 < t

    1. Initial program 34.6%

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

        \[\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. Simplified34.7%

      \[\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. Step-by-step derivation
      1. sqrt-undiv34.7%

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

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

        \[\leadsto \sqrt{\frac{2}{\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)}} \cdot t \]
      4. fma-udef34.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternative 8: 74.9% accurate, 73.5× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t) :precision binary64 (if (<= t -5e-310) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-5d-310)) then
        tmp = -1.0d0
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -5e-310) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = -1.0
	else:
		tmp = 1.0
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -5e-310)
		tmp = -1.0;
	else
		tmp = 1.0;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -5e-310)
		tmp = -1.0;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -5e-310], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1\\

\mathbf{else}:\\
\;\;\;\;1\\


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

    1. Initial program 31.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/31.3%

        \[\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. Simplified31.3%

      \[\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. Step-by-step derivation
      1. sqrt-undiv30.9%

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

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

        \[\leadsto \sqrt{\frac{2}{\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)}} \cdot t \]
      4. fma-udef30.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\sqrt{-1}\right)}^{2}}{t}} \cdot t \]
    10. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \frac{\color{blue}{\sqrt{-1} \cdot \sqrt{-1}}}{t} \cdot t \]
      2. rem-square-sqrt73.4%

        \[\leadsto \frac{\color{blue}{-1}}{t} \cdot t \]
    11. Simplified73.4%

      \[\leadsto \color{blue}{\frac{-1}{t}} \cdot t \]
    12. Taylor expanded in t around 0 73.6%

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

    if -4.999999999999985e-310 < t

    1. Initial program 34.6%

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

        \[\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. Simplified34.7%

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

      \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{0.5}} \]
    5. Step-by-step derivation
      1. sqrt-unprod79.0%

        \[\leadsto \color{blue}{\sqrt{2 \cdot 0.5}} \]
      2. metadata-eval79.0%

        \[\leadsto \sqrt{\color{blue}{1}} \]
      3. metadata-eval79.0%

        \[\leadsto \color{blue}{1} \]
    6. Applied egg-rr79.0%

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 9: 38.5% accurate, 225.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ -1 \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t) :precision binary64 -1.0)
l = abs(l);
double code(double x, double l, double t) {
	return -1.0;
}
NOTE: l should be positive before calling this function
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
l = Math.abs(l);
public static double code(double x, double l, double t) {
	return -1.0;
}
l = abs(l)
def code(x, l, t):
	return -1.0
l = abs(l)
function code(x, l, t)
	return -1.0
end
l = abs(l)
function tmp = code(x, l, t)
	tmp = -1.0;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := -1.0
\begin{array}{l}
l = |l|\\
\\
-1
\end{array}
Derivation
  1. Initial program 32.8%

    \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
  2. Step-by-step derivation
    1. associate-*l/32.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. Simplified32.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. Step-by-step derivation
    1. sqrt-undiv32.6%

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

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

      \[\leadsto \sqrt{\frac{2}{\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)}} \cdot t \]
    4. fma-udef32.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{{\left(\sqrt{-1}\right)}^{2}}{t}} \cdot t \]
  10. Step-by-step derivation
    1. unpow20.0%

      \[\leadsto \frac{\color{blue}{\sqrt{-1} \cdot \sqrt{-1}}}{t} \cdot t \]
    2. rem-square-sqrt40.4%

      \[\leadsto \frac{\color{blue}{-1}}{t} \cdot t \]
  11. Simplified40.4%

    \[\leadsto \color{blue}{\frac{-1}{t}} \cdot t \]
  12. Taylor expanded in t around 0 40.5%

    \[\leadsto \color{blue}{-1} \]
  13. Final simplification40.5%

    \[\leadsto -1 \]

Reproduce

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