Toniolo and Linder, Equation (7)

Percentage Accurate: 33.9% → 84.7%
Time: 23.5s
Alternatives: 11
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 11 alternatives:

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

Initial Program: 33.9% accurate, 1.0× speedup?

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

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

Alternative 1: 84.7% accurate, 0.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := 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(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{+28}:\\ \;\;\;\;-1 - \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-162}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-206}:\\ \;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}}\right)\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+32}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1
         (*
          t
          (/
           (sqrt 2.0)
           (sqrt
            (+
             (/ (* l l) x)
             (+
              (* 2.0 (+ (* t t) (/ (* t t) x)))
              (/ (fma 2.0 (* t t) (* l l)) x))))))))
   (if (<= t -1.6e+28)
     (- -1.0 (- (/ 0.5 (* x x)) (/ 1.0 x)))
     (if (<= t -1.45e-162)
       t_1
       (if (<= t 2.7e-206)
         (*
          t
          (* (/ (sqrt 2.0) l) (sqrt (/ 1.0 (+ (/ 2.0 (* x x)) (/ 2.0 x))))))
         (if (<= t 1.15e+32) t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma(2.0, (t * t), (l * l)) / x)))));
	double tmp;
	if (t <= -1.6e+28) {
		tmp = -1.0 - ((0.5 / (x * x)) - (1.0 / x));
	} else if (t <= -1.45e-162) {
		tmp = t_1;
	} else if (t <= 2.7e-206) {
		tmp = t * ((sqrt(2.0) / l) * sqrt((1.0 / ((2.0 / (x * x)) + (2.0 / x)))));
	} else if (t <= 1.15e+32) {
		tmp = t_1;
	} else {
		tmp = sqrt(((x + -1.0) / (1.0 + x)));
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = 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(2.0, Float64(t * t), Float64(l * l)) / x))))))
	tmp = 0.0
	if (t <= -1.6e+28)
		tmp = Float64(-1.0 - Float64(Float64(0.5 / Float64(x * x)) - Float64(1.0 / x)));
	elseif (t <= -1.45e-162)
		tmp = t_1;
	elseif (t <= 2.7e-206)
		tmp = Float64(t * Float64(Float64(sqrt(2.0) / l) * sqrt(Float64(1.0 / Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / x))))));
	elseif (t <= 1.15e+32)
		tmp = t_1;
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x)));
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = 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[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+28], N[(-1.0 - N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.45e-162], t$95$1, If[LessEqual[t, 2.7e-206], N[(t * N[(N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+32], t$95$1, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 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(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+28}:\\
\;\;\;\;-1 - \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\\

\mathbf{elif}\;t \leq -1.45 \cdot 10^{-162}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+32}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 39.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-*r/39.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-neg39.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. remove-double-neg39.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6e28 < t < -1.4500000000000001e-162 or 2.7000000000000001e-206 < t < 1.15e32

    1. Initial program 39.5%

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

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

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

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

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

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

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

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative91.1%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow291.1%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef91.1%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified91.1%

      \[\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]

    if -1.4500000000000001e-162 < t < 2.7000000000000001e-206

    1. Initial program 3.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/3.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. Simplified3.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 l around inf 2.8%

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

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

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

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

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

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

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

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

    if 1.15e32 < t

    1. Initial program 37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+28}:\\ \;\;\;\;-1 - \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-162}:\\ \;\;\;\;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(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-206}:\\ \;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}}\right)\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+32}:\\ \;\;\;\;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(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \]

Alternative 2: 84.5% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \frac{\ell \cdot \ell}{x}\\ t_2 := \sqrt{2} \cdot \frac{t}{\sqrt{t_1 + \left(t_1 + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\ \mathbf{if}\;t \leq -3.7 \cdot 10^{+25}:\\ \;\;\;\;-1 - \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-162}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-201}:\\ \;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}}\right)\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+36}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ (* l l) x))
        (t_2
         (*
          (sqrt 2.0)
          (/ t (sqrt (+ t_1 (+ t_1 (* 2.0 (+ (* t t) (/ (* t t) x))))))))))
   (if (<= t -3.7e+25)
     (- -1.0 (- (/ 0.5 (* x x)) (/ 1.0 x)))
     (if (<= t -2.2e-162)
       t_2
       (if (<= t 1.25e-201)
         (*
          t
          (* (/ (sqrt 2.0) l) (sqrt (/ 1.0 (+ (/ 2.0 (* x x)) (/ 2.0 x))))))
         (if (<= t 1.35e+36) t_2 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = (l * l) / x;
	double t_2 = sqrt(2.0) * (t / sqrt((t_1 + (t_1 + (2.0 * ((t * t) + ((t * t) / x)))))));
	double tmp;
	if (t <= -3.7e+25) {
		tmp = -1.0 - ((0.5 / (x * x)) - (1.0 / x));
	} else if (t <= -2.2e-162) {
		tmp = t_2;
	} else if (t <= 1.25e-201) {
		tmp = t * ((sqrt(2.0) / l) * sqrt((1.0 / ((2.0 / (x * x)) + (2.0 / x)))));
	} else if (t <= 1.35e+36) {
		tmp = t_2;
	} else {
		tmp = sqrt(((x + -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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (l * l) / x
    t_2 = sqrt(2.0d0) * (t / sqrt((t_1 + (t_1 + (2.0d0 * ((t * t) + ((t * t) / x)))))))
    if (t <= (-3.7d+25)) then
        tmp = (-1.0d0) - ((0.5d0 / (x * x)) - (1.0d0 / x))
    else if (t <= (-2.2d-162)) then
        tmp = t_2
    else if (t <= 1.25d-201) then
        tmp = t * ((sqrt(2.0d0) / l) * sqrt((1.0d0 / ((2.0d0 / (x * x)) + (2.0d0 / x)))))
    else if (t <= 1.35d+36) then
        tmp = t_2
    else
        tmp = sqrt(((x + (-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 t_1 = (l * l) / x;
	double t_2 = Math.sqrt(2.0) * (t / Math.sqrt((t_1 + (t_1 + (2.0 * ((t * t) + ((t * t) / x)))))));
	double tmp;
	if (t <= -3.7e+25) {
		tmp = -1.0 - ((0.5 / (x * x)) - (1.0 / x));
	} else if (t <= -2.2e-162) {
		tmp = t_2;
	} else if (t <= 1.25e-201) {
		tmp = t * ((Math.sqrt(2.0) / l) * Math.sqrt((1.0 / ((2.0 / (x * x)) + (2.0 / x)))));
	} else if (t <= 1.35e+36) {
		tmp = t_2;
	} else {
		tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = (l * l) / x
	t_2 = math.sqrt(2.0) * (t / math.sqrt((t_1 + (t_1 + (2.0 * ((t * t) + ((t * t) / x)))))))
	tmp = 0
	if t <= -3.7e+25:
		tmp = -1.0 - ((0.5 / (x * x)) - (1.0 / x))
	elif t <= -2.2e-162:
		tmp = t_2
	elif t <= 1.25e-201:
		tmp = t * ((math.sqrt(2.0) / l) * math.sqrt((1.0 / ((2.0 / (x * x)) + (2.0 / x)))))
	elif t <= 1.35e+36:
		tmp = t_2
	else:
		tmp = math.sqrt(((x + -1.0) / (1.0 + x)))
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = Float64(Float64(l * l) / x)
	t_2 = Float64(sqrt(2.0) * Float64(t / sqrt(Float64(t_1 + Float64(t_1 + Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))))))))
	tmp = 0.0
	if (t <= -3.7e+25)
		tmp = Float64(-1.0 - Float64(Float64(0.5 / Float64(x * x)) - Float64(1.0 / x)));
	elseif (t <= -2.2e-162)
		tmp = t_2;
	elseif (t <= 1.25e-201)
		tmp = Float64(t * Float64(Float64(sqrt(2.0) / l) * sqrt(Float64(1.0 / Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / x))))));
	elseif (t <= 1.35e+36)
		tmp = t_2;
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = (l * l) / x;
	t_2 = sqrt(2.0) * (t / sqrt((t_1 + (t_1 + (2.0 * ((t * t) + ((t * t) / x)))))));
	tmp = 0.0;
	if (t <= -3.7e+25)
		tmp = -1.0 - ((0.5 / (x * x)) - (1.0 / x));
	elseif (t <= -2.2e-162)
		tmp = t_2;
	elseif (t <= 1.25e-201)
		tmp = t * ((sqrt(2.0) / l) * sqrt((1.0 / ((2.0 / (x * x)) + (2.0 / x)))));
	elseif (t <= 1.35e+36)
		tmp = t_2;
	else
		tmp = sqrt(((x + -1.0) / (1.0 + x)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(t$95$1 + N[(t$95$1 + N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+25], N[(-1.0 - N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.2e-162], t$95$2, If[LessEqual[t, 1.25e-201], N[(t * N[(N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+36], t$95$2, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{x}\\
t_2 := \sqrt{2} \cdot \frac{t}{\sqrt{t_1 + \left(t_1 + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+25}:\\
\;\;\;\;-1 - \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\\

\mathbf{elif}\;t \leq -2.2 \cdot 10^{-162}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 1.35 \cdot 10^{+36}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 39.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-*r/39.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-neg39.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. remove-double-neg39.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6999999999999999e25 < t < -2.1999999999999999e-162 or 1.25e-201 < t < 1.35e36

    1. Initial program 40.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}}} \]
    5. Step-by-step derivation
      1. associate--l+90.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \]
    7. Taylor expanded in t around 0 90.6%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\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 \cdot \ell\right)}{x}}\right)}} \]
      3. mul-1-neg90.6%

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

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

    if -2.1999999999999999e-162 < t < 1.25e-201

    1. Initial program 3.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/3.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. Simplified3.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 l around inf 2.8%

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

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

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

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

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

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

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

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

    if 1.35e36 < t

    1. Initial program 37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{+25}:\\ \;\;\;\;-1 - \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-162}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-201}:\\ \;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}}\right)\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+36}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \]

Alternative 3: 80.5% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}}\right)\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{-150}:\\ \;\;\;\;-1 - \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-194}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-231}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-203}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1
         (*
          t
          (* (/ (sqrt 2.0) l) (sqrt (/ 1.0 (+ (/ 2.0 (* x x)) (/ 2.0 x))))))))
   (if (<= t -1.6e-150)
     (- -1.0 (- (/ 0.5 (* x x)) (/ 1.0 x)))
     (if (<= t -1.5e-194)
       t_1
       (if (<= t -3e-231)
         (+ (/ 1.0 x) -1.0)
         (if (<= t 4e-203) t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = t * ((sqrt(2.0) / l) * sqrt((1.0 / ((2.0 / (x * x)) + (2.0 / x)))));
	double tmp;
	if (t <= -1.6e-150) {
		tmp = -1.0 - ((0.5 / (x * x)) - (1.0 / x));
	} else if (t <= -1.5e-194) {
		tmp = t_1;
	} else if (t <= -3e-231) {
		tmp = (1.0 / x) + -1.0;
	} else if (t <= 4e-203) {
		tmp = t_1;
	} else {
		tmp = sqrt(((x + -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) :: t_1
    real(8) :: tmp
    t_1 = t * ((sqrt(2.0d0) / l) * sqrt((1.0d0 / ((2.0d0 / (x * x)) + (2.0d0 / x)))))
    if (t <= (-1.6d-150)) then
        tmp = (-1.0d0) - ((0.5d0 / (x * x)) - (1.0d0 / x))
    else if (t <= (-1.5d-194)) then
        tmp = t_1
    else if (t <= (-3d-231)) then
        tmp = (1.0d0 / x) + (-1.0d0)
    else if (t <= 4d-203) then
        tmp = t_1
    else
        tmp = sqrt(((x + (-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 t_1 = t * ((Math.sqrt(2.0) / l) * Math.sqrt((1.0 / ((2.0 / (x * x)) + (2.0 / x)))));
	double tmp;
	if (t <= -1.6e-150) {
		tmp = -1.0 - ((0.5 / (x * x)) - (1.0 / x));
	} else if (t <= -1.5e-194) {
		tmp = t_1;
	} else if (t <= -3e-231) {
		tmp = (1.0 / x) + -1.0;
	} else if (t <= 4e-203) {
		tmp = t_1;
	} else {
		tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = t * ((math.sqrt(2.0) / l) * math.sqrt((1.0 / ((2.0 / (x * x)) + (2.0 / x)))))
	tmp = 0
	if t <= -1.6e-150:
		tmp = -1.0 - ((0.5 / (x * x)) - (1.0 / x))
	elif t <= -1.5e-194:
		tmp = t_1
	elif t <= -3e-231:
		tmp = (1.0 / x) + -1.0
	elif t <= 4e-203:
		tmp = t_1
	else:
		tmp = math.sqrt(((x + -1.0) / (1.0 + x)))
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = Float64(t * Float64(Float64(sqrt(2.0) / l) * sqrt(Float64(1.0 / Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / x))))))
	tmp = 0.0
	if (t <= -1.6e-150)
		tmp = Float64(-1.0 - Float64(Float64(0.5 / Float64(x * x)) - Float64(1.0 / x)));
	elseif (t <= -1.5e-194)
		tmp = t_1;
	elseif (t <= -3e-231)
		tmp = Float64(Float64(1.0 / x) + -1.0);
	elseif (t <= 4e-203)
		tmp = t_1;
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = t * ((sqrt(2.0) / l) * sqrt((1.0 / ((2.0 / (x * x)) + (2.0 / x)))));
	tmp = 0.0;
	if (t <= -1.6e-150)
		tmp = -1.0 - ((0.5 / (x * x)) - (1.0 / x));
	elseif (t <= -1.5e-194)
		tmp = t_1;
	elseif (t <= -3e-231)
		tmp = (1.0 / x) + -1.0;
	elseif (t <= 4e-203)
		tmp = t_1;
	else
		tmp = sqrt(((x + -1.0) / (1.0 + x)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e-150], N[(-1.0 - N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.5e-194], t$95$1, If[LessEqual[t, -3e-231], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, 4e-203], t$95$1, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}}\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{-150}:\\
\;\;\;\;-1 - \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\\

\mathbf{elif}\;t \leq -1.5 \cdot 10^{-194}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -3 \cdot 10^{-231}:\\
\;\;\;\;\frac{1}{x} + -1\\

\mathbf{elif}\;t \leq 4 \cdot 10^{-203}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 40.9%

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

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

        \[\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. remove-double-neg40.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5999999999999999e-150 < t < -1.5e-194 or -3.0000000000000003e-231 < t < 4.0000000000000001e-203

    1. Initial program 4.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/4.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. Simplified4.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 l around inf 4.2%

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

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

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

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

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

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

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

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

    if -1.5e-194 < t < -3.0000000000000003e-231

    1. Initial program 3.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.0000000000000001e-203 < t

    1. Initial program 38.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-*r/38.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-neg38.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. remove-double-neg38.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{-150}:\\ \;\;\;\;-1 - \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-194}:\\ \;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}}\right)\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-231}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-203}:\\ \;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\frac{2}{x \cdot x} + \frac{2}{x}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \]

Alternative 4: 79.0% accurate, 1.0× speedup?

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

\mathbf{elif}\;t \leq -1.5 \cdot 10^{-194}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -6.5 \cdot 10^{-233}:\\
\;\;\;\;\frac{1}{x} + -1\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{-201}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 40.9%

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

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

        \[\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. remove-double-neg40.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.54999999999999999e-150 < t < -1.5e-194 or -6.49999999999999989e-233 < t < 1.14999999999999993e-201

    1. Initial program 4.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/4.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-neg4.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. remove-double-neg4.2%

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}}} \]
    5. Step-by-step derivation
      1. associate--l+65.6%

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

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

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

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

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

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative65.6%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow265.6%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef65.6%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified65.6%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \]
    7. Taylor expanded in t around 0 62.9%

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

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

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\frac{{\ell}^{2}}{x} + \color{blue}{1} \cdot \frac{{\ell}^{2}}{x}}} \]
      3. distribute-rgt1-in62.9%

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

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

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

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

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

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

    if -1.5e-194 < t < -6.49999999999999989e-233

    1. Initial program 3.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.14999999999999993e-201 < t

    1. Initial program 38.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-*r/38.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-neg38.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. remove-double-neg38.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{-150}:\\ \;\;\;\;-1 - \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-194}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-233}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-201}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \]

Alternative 5: 80.3% accurate, 1.0× speedup?

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

\mathbf{elif}\;t \leq -1.5 \cdot 10^{-194}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\

\mathbf{elif}\;t \leq -1.05 \cdot 10^{-235}:\\
\;\;\;\;\frac{1}{x} + -1\\

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

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


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

    1. Initial program 40.9%

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

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

        \[\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. remove-double-neg40.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7000000000000001e-150 < t < -1.5e-194

    1. Initial program 5.1%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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}}}} \]
    5. Step-by-step derivation
      1. associate--l+67.1%

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

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

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

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

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

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

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

        \[\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}{\ell \cdot \ell} + 2 \cdot {t}^{2}\right)}{x}\right)}} \cdot t \]
      9. +-commutative67.1%

        \[\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 \cdot \ell\right)}}{x}\right)}} \cdot t \]
      10. unpow267.1%

        \[\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 \cdot \ell\right)}{x}\right)}} \cdot t \]
      11. fma-udef67.1%

        \[\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, t \cdot t, \ell \cdot \ell\right)}}{x}\right)}} \cdot t \]
    6. Simplified67.0%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \]
    7. Taylor expanded in t around 0 58.5%

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

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

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

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

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

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

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

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

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

    if -1.5e-194 < t < -1.05e-235

    1. Initial program 3.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.05e-235 < t < 1.34999999999999999e-203

    1. Initial program 3.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/3.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. Simplified3.8%

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

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

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

    if 1.34999999999999999e-203 < t

    1. Initial program 38.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-*r/38.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-neg38.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. remove-double-neg38.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{-150}:\\ \;\;\;\;-1 - \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-194}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-235}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-203}:\\ \;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{\frac{1}{\frac{2}{x}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\ \end{array} \]

Alternative 6: 77.0% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-1 - \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{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 (- (/ 0.5 (* x x)) (/ 1.0 x)))
   (sqrt (/ (+ 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 - ((0.5 / (x * x)) - (1.0 / x));
	} else {
		tmp = sqrt(((x + -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) - ((0.5d0 / (x * x)) - (1.0d0 / x))
    else
        tmp = sqrt(((x + (-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 - ((0.5 / (x * x)) - (1.0 / x));
	} else {
		tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -5e-310:
		tmp = -1.0 - ((0.5 / (x * x)) - (1.0 / x))
	else:
		tmp = math.sqrt(((x + -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(Float64(0.5 / Float64(x * x)) - Float64(1.0 / x)));
	else
		tmp = sqrt(Float64(Float64(x + -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 - ((0.5 / (x * x)) - (1.0 / x));
	else
		tmp = sqrt(((x + -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[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $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 - \left(\frac{0.5}{x \cdot x} - \frac{1}{x}\right)\\

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


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

    1. Initial program 32.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 33.9%

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

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

        \[\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. remove-double-neg33.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 76.6% accurate, 17.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{1}{x} + -1\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{0.5}{x \cdot x}\right) + \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 x) -1.0) (+ (+ 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 / x) + -1.0;
	} 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 / x) + (-1.0d0)
    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 / x) + -1.0;
	} 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 / x) + -1.0
	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(Float64(1.0 / x) + -1.0);
	else
		tmp = Float64(Float64(1.0 + 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 / x) + -1.0;
	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[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], N[(N[(1.0 + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{x} + -1\\

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


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

    1. Initial program 32.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 33.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/34.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{\frac{-1 + x}{t \cdot t}}}}} \cdot t \]
      3. times-frac35.9%

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

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

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

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

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

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

        \[\leadsto \left(\frac{{2}^{0.25}}{\sqrt{2}} \cdot \frac{{2}^{\color{blue}{0.25}}}{\sqrt{\frac{x + 1}{\frac{-1 + x}{t \cdot t}}}}\right) \cdot t \]
      10. associate-/r/47.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{\sqrt{\frac{x + 1}{x + -1}} \cdot t}} \cdot t \]
      2. *-commutative78.6%

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

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

        \[\leadsto \frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{x + 1}{\color{blue}{x - 1}}}} \cdot t \]
      5. +-commutative78.6%

        \[\leadsto \frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{\color{blue}{1 + x}}{x - 1}}} \cdot t \]
      6. sub-neg78.6%

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

        \[\leadsto \frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{1 + x}{x + \color{blue}{-1}}}} \cdot t \]
    10. Simplified78.6%

      \[\leadsto \color{blue}{\frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{1 + x}{x + -1}}}} \cdot t \]
    11. Taylor expanded in x around inf 79.3%

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

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

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

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

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

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

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

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

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

Alternative 8: 76.8% accurate, 17.2× speedup?

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

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


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

    1. Initial program 32.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 33.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/34.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{\frac{-1 + x}{t \cdot t}}}}} \cdot t \]
      3. times-frac35.9%

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

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

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

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

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

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

        \[\leadsto \left(\frac{{2}^{0.25}}{\sqrt{2}} \cdot \frac{{2}^{\color{blue}{0.25}}}{\sqrt{\frac{x + 1}{\frac{-1 + x}{t \cdot t}}}}\right) \cdot t \]
      10. associate-/r/47.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{\sqrt{\frac{x + 1}{x + -1}} \cdot t}} \cdot t \]
      2. *-commutative78.6%

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

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

        \[\leadsto \frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{x + 1}{\color{blue}{x - 1}}}} \cdot t \]
      5. +-commutative78.6%

        \[\leadsto \frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{\color{blue}{1 + x}}{x - 1}}} \cdot t \]
      6. sub-neg78.6%

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

        \[\leadsto \frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{1 + x}{x + \color{blue}{-1}}}} \cdot t \]
    10. Simplified78.6%

      \[\leadsto \color{blue}{\frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{1 + x}{x + -1}}}} \cdot t \]
    11. Taylor expanded in x around inf 79.3%

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

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

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

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

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

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

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

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

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

Alternative 9: 76.5% accurate, 31.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{1}{x} + -1\\ \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 x) -1.0) (- 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 / x) + -1.0;
	} 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 / x) + (-1.0d0)
    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 / x) + -1.0;
	} 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 / x) + -1.0
	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(Float64(1.0 / x) + -1.0);
	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 / x) + -1.0;
	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[(N[(1.0 / x), $MachinePrecision] + -1.0), $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}:\\
\;\;\;\;\frac{1}{x} + -1\\

\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 32.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 33.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/34.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{\frac{-1 + x}{t \cdot t}}}}} \cdot t \]
      3. times-frac35.9%

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

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

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

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

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

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

        \[\leadsto \left(\frac{{2}^{0.25}}{\sqrt{2}} \cdot \frac{{2}^{\color{blue}{0.25}}}{\sqrt{\frac{x + 1}{\frac{-1 + x}{t \cdot t}}}}\right) \cdot t \]
      10. associate-/r/47.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{\sqrt{\frac{x + 1}{x + -1}} \cdot t}} \cdot t \]
      2. *-commutative78.6%

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

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

        \[\leadsto \frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{x + 1}{\color{blue}{x - 1}}}} \cdot t \]
      5. +-commutative78.6%

        \[\leadsto \frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{\color{blue}{1 + x}}{x - 1}}} \cdot t \]
      6. sub-neg78.6%

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

        \[\leadsto \frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{1 + x}{x + \color{blue}{-1}}}} \cdot t \]
    10. Simplified78.6%

      \[\leadsto \color{blue}{\frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{1 + x}{x + -1}}}} \cdot t \]
    11. Taylor expanded in x around inf 79.0%

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

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

Alternative 10: 39.5% accurate, 45.0× speedup?

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{x + 1}{\frac{-1 + x}{t \cdot t}}}}} \cdot t \]
  7. Step-by-step derivation
    1. add-sqr-sqrt35.2%

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

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

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

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

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

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

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

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

      \[\leadsto \left(\frac{{2}^{0.25}}{\sqrt{2}} \cdot \frac{{2}^{\color{blue}{0.25}}}{\sqrt{\frac{x + 1}{\frac{-1 + x}{t \cdot t}}}}\right) \cdot t \]
    10. associate-/r/44.3%

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

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

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

      \[\leadsto \left(\frac{{2}^{0.25}}{\sqrt{2}} \cdot \frac{{2}^{0.25}}{\sqrt{\frac{x + 1}{x + -1}} \cdot \color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)}}\right) \cdot t \]
    14. add-sqr-sqrt38.2%

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

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

      \[\leadsto \color{blue}{\frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{\sqrt{\frac{x + 1}{x + -1}} \cdot t}} \cdot t \]
    2. *-commutative38.1%

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

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

      \[\leadsto \frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{x + 1}{\color{blue}{x - 1}}}} \cdot t \]
    5. +-commutative38.1%

      \[\leadsto \frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{\color{blue}{1 + x}}{x - 1}}} \cdot t \]
    6. sub-neg38.1%

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

      \[\leadsto \frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{1 + x}{x + \color{blue}{-1}}}} \cdot t \]
  10. Simplified38.1%

    \[\leadsto \color{blue}{\frac{\frac{{2}^{0.25}}{\sqrt{2}} \cdot {2}^{0.25}}{t \cdot \sqrt{\frac{1 + x}{x + -1}}}} \cdot t \]
  11. Taylor expanded in x around inf 38.3%

    \[\leadsto \color{blue}{1 - \frac{1}{x}} \]
  12. Final simplification38.3%

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

Alternative 11: 39.2% 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.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/32.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. Simplified32.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 t around inf 30.9%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{1}{t}} \cdot t \]
  8. Taylor expanded in t around 0 38.1%

    \[\leadsto \color{blue}{1} \]
  9. Final simplification38.1%

    \[\leadsto 1 \]

Reproduce

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