Toniolo and Linder, Equation (7)

Percentage Accurate: 33.0% → 83.2%
Time: 24.8s
Alternatives: 15
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 15 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.0% 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: 83.2% accurate, 0.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := t \cdot \sqrt{\frac{2}{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, \mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)\right) + \frac{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{x}}}\\ \mathbf{if}\;t \leq -1.38 \cdot 10^{-52}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{-155}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-201}:\\ \;\;\;\;\frac{\sqrt{2}}{-\sqrt{2}}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-218}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \left(\frac{1}{{x}^{2}} + \left(\frac{1}{{x}^{3}} + \frac{1}{{x}^{4}}\right)\right)\right)}}{t}}\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \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
            (+
             (fma
              2.0
              (/ (pow t 2.0) x)
              (fma 2.0 (pow t 2.0) (/ (pow l 2.0) x)))
             (/ (fma 2.0 (pow t 2.0) (pow l 2.0)) x)))))))
   (if (<= t -1.38e-52)
     (/ (sqrt 2.0) (* (sqrt 2.0) (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
     (if (<= t -1.55e-155)
       t_1
       (if (<= t -1.25e-201)
         (/ (sqrt 2.0) (- (sqrt 2.0)))
         (if (<= t 4.8e-218)
           (/
            (sqrt 2.0)
            (/
             (*
              l
              (sqrt
               (+
                (/ 1.0 (+ x -1.0))
                (+
                 (/ 1.0 x)
                 (+
                  (/ 1.0 (pow x 2.0))
                  (+ (/ 1.0 (pow x 3.0)) (/ 1.0 (pow x 4.0))))))))
             t))
           (if (<= t 5.8e-8) t_1 (sqrt (/ (+ x -1.0) (+ x 1.0))))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = t * sqrt((2.0 / (fma(2.0, (pow(t, 2.0) / x), fma(2.0, pow(t, 2.0), (pow(l, 2.0) / x))) + (fma(2.0, pow(t, 2.0), pow(l, 2.0)) / x))));
	double tmp;
	if (t <= -1.38e-52) {
		tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= -1.55e-155) {
		tmp = t_1;
	} else if (t <= -1.25e-201) {
		tmp = sqrt(2.0) / -sqrt(2.0);
	} else if (t <= 4.8e-218) {
		tmp = sqrt(2.0) / ((l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / pow(x, 2.0)) + ((1.0 / pow(x, 3.0)) + (1.0 / pow(x, 4.0)))))))) / t);
	} else if (t <= 5.8e-8) {
		tmp = t_1;
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = Float64(t * sqrt(Float64(2.0 / Float64(fma(2.0, Float64((t ^ 2.0) / x), fma(2.0, (t ^ 2.0), Float64((l ^ 2.0) / x))) + Float64(fma(2.0, (t ^ 2.0), (l ^ 2.0)) / x)))))
	tmp = 0.0
	if (t <= -1.38e-52)
		tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	elseif (t <= -1.55e-155)
		tmp = t_1;
	elseif (t <= -1.25e-201)
		tmp = Float64(sqrt(2.0) / Float64(-sqrt(2.0)));
	elseif (t <= 4.8e-218)
		tmp = Float64(sqrt(2.0) / Float64(Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(Float64(1.0 / (x ^ 2.0)) + Float64(Float64(1.0 / (x ^ 3.0)) + Float64(1.0 / (x ^ 4.0)))))))) / t));
	elseif (t <= 5.8e-8)
		tmp = t_1;
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[Sqrt[N[(2.0 / N[(N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[Power[t, 2.0], $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[Power[t, 2.0], $MachinePrecision] + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.38e-52], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.55e-155], t$95$1, If[LessEqual[t, -1.25e-201], N[(N[Sqrt[2.0], $MachinePrecision] / (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, 4.8e-218], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e-8], t$95$1, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \sqrt{\frac{2}{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, \mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)\right) + \frac{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{x}}}\\
\mathbf{if}\;t \leq -1.38 \cdot 10^{-52}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\

\mathbf{elif}\;t \leq -1.55 \cdot 10^{-155}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.25 \cdot 10^{-201}:\\
\;\;\;\;\frac{\sqrt{2}}{-\sqrt{2}}\\

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

\mathbf{elif}\;t \leq 5.8 \cdot 10^{-8}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

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

    if -1.38000000000000008e-52 < t < -1.55e-155 or 4.8000000000000002e-218 < t < 5.8000000000000003e-8

    1. Initial program 33.4%

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}}}{t}} \]
      2. *-un-lft-identity77.0%

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{\color{blue}{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}}\right)}}{t}} \]
      3. cancel-sign-sub-inv77.0%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}}{t}} \]
      5. *-un-lft-identity77.0%

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}\right)}}{t}} \]
    5. Applied egg-rr77.0%

      \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, \mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)\right) + \frac{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{x}}\right)}}}{t}} \]
    6. Step-by-step derivation
      1. associate-/r/77.5%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{e^{\log \left(\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, \mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)\right) + \frac{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{x}}\right)}} \cdot t} \]
      2. add-exp-log82.4%

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

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

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

    if -1.55e-155 < t < -1.25e-201

    1. Initial program 2.4%

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}}}{t}} \]
      2. *-un-lft-identity22.3%

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}}{t}} \]
      5. *-un-lft-identity22.3%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{-1 \cdot \sqrt{2}}} \]
    10. Step-by-step derivation
      1. mul-1-neg68.9%

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{-\sqrt{2}}} \]
    11. Simplified68.9%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{-\sqrt{2}}} \]

    if -1.25e-201 < t < 4.8000000000000002e-218

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.8000000000000003e-8 < 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. Simplified33.8%

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    4. Step-by-step derivation
      1. sub-neg93.7%

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity93.7%

        \[\leadsto \color{blue}{1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      2. add-sqr-sqrt93.7%

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

        \[\leadsto 1 \cdot \color{blue}{\sqrt{\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}}} \]
      4. *-un-lft-identity93.7%

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

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

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

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

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

      \[\leadsto \color{blue}{1 \cdot \sqrt{\frac{x + -1}{x + 1}}} \]
    8. Step-by-step derivation
      1. *-lft-identity93.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.38 \cdot 10^{-52}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{-155}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, \mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)\right) + \frac{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{x}}}\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-201}:\\ \;\;\;\;\frac{\sqrt{2}}{-\sqrt{2}}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-218}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \left(\frac{1}{{x}^{2}} + \left(\frac{1}{{x}^{3}} + \frac{1}{{x}^{4}}\right)\right)\right)}}{t}}\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-8}:\\ \;\;\;\;t \cdot \sqrt{\frac{2}{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, \mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)\right) + \frac{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 2: 83.6% accurate, 0.3× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := 2 \cdot {t}^{2}\\ t_2 := \frac{\sqrt{2}}{\frac{\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(\frac{{\ell}^{2}}{x} + t_1\right)\right) + \frac{{\ell}^{2} + t_1}{x}}}{t}}\\ \mathbf{if}\;t \leq -1 \cdot 10^{-43}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-157}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-202}:\\ \;\;\;\;\frac{\sqrt{2}}{-\sqrt{2}}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-174}:\\ \;\;\;\;\frac{1}{\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\frac{1}{x}}} \cdot \frac{\sqrt{2}}{\frac{1}{t}}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-8}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (* 2.0 (pow t 2.0)))
        (t_2
         (/
          (sqrt 2.0)
          (/
           (sqrt
            (+
             (+ (* 2.0 (/ (pow t 2.0) x)) (+ (/ (pow l 2.0) x) t_1))
             (/ (+ (pow l 2.0) t_1) x)))
           t))))
   (if (<= t -1e-43)
     (/ (sqrt 2.0) (* (sqrt 2.0) (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
     (if (<= t -1.35e-157)
       t_2
       (if (<= t -5.8e-202)
         (/ (sqrt 2.0) (- (sqrt 2.0)))
         (if (<= t 1.3e-174)
           (*
            (/ 1.0 (* (* (sqrt 2.0) l) (sqrt (/ 1.0 x))))
            (/ (sqrt 2.0) (/ 1.0 t)))
           (if (<= t 5e-8) t_2 (sqrt (/ (+ x -1.0) (+ x 1.0))))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = 2.0 * pow(t, 2.0);
	double t_2 = sqrt(2.0) / (sqrt((((2.0 * (pow(t, 2.0) / x)) + ((pow(l, 2.0) / x) + t_1)) + ((pow(l, 2.0) + t_1) / x))) / t);
	double tmp;
	if (t <= -1e-43) {
		tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= -1.35e-157) {
		tmp = t_2;
	} else if (t <= -5.8e-202) {
		tmp = sqrt(2.0) / -sqrt(2.0);
	} else if (t <= 1.3e-174) {
		tmp = (1.0 / ((sqrt(2.0) * l) * sqrt((1.0 / x)))) * (sqrt(2.0) / (1.0 / t));
	} else if (t <= 5e-8) {
		tmp = t_2;
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 2.0d0 * (t ** 2.0d0)
    t_2 = sqrt(2.0d0) / (sqrt((((2.0d0 * ((t ** 2.0d0) / x)) + (((l ** 2.0d0) / x) + t_1)) + (((l ** 2.0d0) + t_1) / x))) / t)
    if (t <= (-1d-43)) then
        tmp = sqrt(2.0d0) / (sqrt(2.0d0) * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
    else if (t <= (-1.35d-157)) then
        tmp = t_2
    else if (t <= (-5.8d-202)) then
        tmp = sqrt(2.0d0) / -sqrt(2.0d0)
    else if (t <= 1.3d-174) then
        tmp = (1.0d0 / ((sqrt(2.0d0) * l) * sqrt((1.0d0 / x)))) * (sqrt(2.0d0) / (1.0d0 / t))
    else if (t <= 5d-8) then
        tmp = t_2
    else
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double t_1 = 2.0 * Math.pow(t, 2.0);
	double t_2 = Math.sqrt(2.0) / (Math.sqrt((((2.0 * (Math.pow(t, 2.0) / x)) + ((Math.pow(l, 2.0) / x) + t_1)) + ((Math.pow(l, 2.0) + t_1) / x))) / t);
	double tmp;
	if (t <= -1e-43) {
		tmp = Math.sqrt(2.0) / (Math.sqrt(2.0) * -Math.sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= -1.35e-157) {
		tmp = t_2;
	} else if (t <= -5.8e-202) {
		tmp = Math.sqrt(2.0) / -Math.sqrt(2.0);
	} else if (t <= 1.3e-174) {
		tmp = (1.0 / ((Math.sqrt(2.0) * l) * Math.sqrt((1.0 / x)))) * (Math.sqrt(2.0) / (1.0 / t));
	} else if (t <= 5e-8) {
		tmp = t_2;
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = 2.0 * math.pow(t, 2.0)
	t_2 = math.sqrt(2.0) / (math.sqrt((((2.0 * (math.pow(t, 2.0) / x)) + ((math.pow(l, 2.0) / x) + t_1)) + ((math.pow(l, 2.0) + t_1) / x))) / t)
	tmp = 0
	if t <= -1e-43:
		tmp = math.sqrt(2.0) / (math.sqrt(2.0) * -math.sqrt(((x + 1.0) / (x + -1.0))))
	elif t <= -1.35e-157:
		tmp = t_2
	elif t <= -5.8e-202:
		tmp = math.sqrt(2.0) / -math.sqrt(2.0)
	elif t <= 1.3e-174:
		tmp = (1.0 / ((math.sqrt(2.0) * l) * math.sqrt((1.0 / x)))) * (math.sqrt(2.0) / (1.0 / t))
	elif t <= 5e-8:
		tmp = t_2
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = Float64(2.0 * (t ^ 2.0))
	t_2 = Float64(sqrt(2.0) / Float64(sqrt(Float64(Float64(Float64(2.0 * Float64((t ^ 2.0) / x)) + Float64(Float64((l ^ 2.0) / x) + t_1)) + Float64(Float64((l ^ 2.0) + t_1) / x))) / t))
	tmp = 0.0
	if (t <= -1e-43)
		tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	elseif (t <= -1.35e-157)
		tmp = t_2;
	elseif (t <= -5.8e-202)
		tmp = Float64(sqrt(2.0) / Float64(-sqrt(2.0)));
	elseif (t <= 1.3e-174)
		tmp = Float64(Float64(1.0 / Float64(Float64(sqrt(2.0) * l) * sqrt(Float64(1.0 / x)))) * Float64(sqrt(2.0) / Float64(1.0 / t)));
	elseif (t <= 5e-8)
		tmp = t_2;
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = 2.0 * (t ^ 2.0);
	t_2 = sqrt(2.0) / (sqrt((((2.0 * ((t ^ 2.0) / x)) + (((l ^ 2.0) / x) + t_1)) + (((l ^ 2.0) + t_1) / x))) / t);
	tmp = 0.0;
	if (t <= -1e-43)
		tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0))));
	elseif (t <= -1.35e-157)
		tmp = t_2;
	elseif (t <= -5.8e-202)
		tmp = sqrt(2.0) / -sqrt(2.0);
	elseif (t <= 1.3e-174)
		tmp = (1.0 / ((sqrt(2.0) * l) * sqrt((1.0 / x)))) * (sqrt(2.0) / (1.0 / t));
	elseif (t <= 5e-8)
		tmp = t_2;
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[l, 2.0], $MachinePrecision] + t$95$1), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e-43], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e-157], t$95$2, If[LessEqual[t, -5.8e-202], N[(N[Sqrt[2.0], $MachinePrecision] / (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, 1.3e-174], N[(N[(1.0 / N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e-8], t$95$2, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot {t}^{2}\\
t_2 := \frac{\sqrt{2}}{\frac{\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(\frac{{\ell}^{2}}{x} + t_1\right)\right) + \frac{{\ell}^{2} + t_1}{x}}}{t}}\\
\mathbf{if}\;t \leq -1 \cdot 10^{-43}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\

\mathbf{elif}\;t \leq -1.35 \cdot 10^{-157}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -5.8 \cdot 10^{-202}:\\
\;\;\;\;\frac{\sqrt{2}}{-\sqrt{2}}\\

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

\mathbf{elif}\;t \leq 5 \cdot 10^{-8}:\\
\;\;\;\;t_2\\

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


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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000008e-43 < t < -1.35e-157 or 1.3000000000000001e-174 < t < 4.9999999999999998e-8

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

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

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

    if -1.35e-157 < t < -5.79999999999999976e-202

    1. Initial program 2.4%

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}}}{t}} \]
      2. *-un-lft-identity22.3%

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}}{t}} \]
      5. *-un-lft-identity22.3%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{-1 \cdot \sqrt{2}}} \]
    10. Step-by-step derivation
      1. mul-1-neg68.9%

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{-\sqrt{2}}} \]
    11. Simplified68.9%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{-\sqrt{2}}} \]

    if -5.79999999999999976e-202 < t < 1.3000000000000001e-174

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}}}{t}} \]
      2. *-un-lft-identity53.3%

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}}{t}} \]
      5. *-un-lft-identity53.3%

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

      \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, \mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)\right) + \frac{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{x}}\right)}}}{t}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity53.3%

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

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

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

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

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

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

    if 4.9999999999999998e-8 < 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. Simplified33.8%

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    4. Step-by-step derivation
      1. sub-neg93.7%

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity93.7%

        \[\leadsto \color{blue}{1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      2. add-sqr-sqrt93.7%

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

        \[\leadsto 1 \cdot \color{blue}{\sqrt{\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}}} \]
      4. *-un-lft-identity93.7%

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

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

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

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

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

      \[\leadsto \color{blue}{1 \cdot \sqrt{\frac{x + -1}{x + 1}}} \]
    8. Step-by-step derivation
      1. *-lft-identity93.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-43}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-157}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(\frac{{\ell}^{2}}{x} + 2 \cdot {t}^{2}\right)\right) + \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}}}{t}}\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-202}:\\ \;\;\;\;\frac{\sqrt{2}}{-\sqrt{2}}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-174}:\\ \;\;\;\;\frac{1}{\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\frac{1}{x}}} \cdot \frac{\sqrt{2}}{\frac{1}{t}}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-8}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(\frac{{\ell}^{2}}{x} + 2 \cdot {t}^{2}\right)\right) + \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 3: 80.6% accurate, 0.4× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := 2 + \frac{1}{x} \cdot 4\\ t_2 := \frac{1}{x + -1}\\ \mathbf{if}\;t \leq -7.4 \cdot 10^{-205}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-243}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{t_2 + \left(\frac{1}{x} + \left(\frac{1}{{x}^{2}} + \left(\frac{1}{{x}^{3}} + \frac{1}{{x}^{4}}\right)\right)\right)}}{t}}\\ \mathbf{elif}\;t \leq 7.4 \cdot 10^{-116}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{1}{t}} \cdot \frac{1}{t \cdot \sqrt{t_1} + \frac{{\ell}^{2}}{t \cdot x} \cdot \sqrt{\frac{1}{t_1}}}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-87}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{t_2 + \frac{1}{x}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (+ 2.0 (* (/ 1.0 x) 4.0))) (t_2 (/ 1.0 (+ x -1.0))))
   (if (<= t -7.4e-205)
     (/ (sqrt 2.0) (* (sqrt 2.0) (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
     (if (<= t 1.9e-243)
       (/
        (sqrt 2.0)
        (/
         (*
          l
          (sqrt
           (+
            t_2
            (+
             (/ 1.0 x)
             (+
              (/ 1.0 (pow x 2.0))
              (+ (/ 1.0 (pow x 3.0)) (/ 1.0 (pow x 4.0))))))))
         t))
       (if (<= t 7.4e-116)
         (*
          (/ (sqrt 2.0) (/ 1.0 t))
          (/
           1.0
           (+
            (* t (sqrt t_1))
            (* (/ (pow l 2.0) (* t x)) (sqrt (/ 1.0 t_1))))))
         (if (<= t 3.2e-87)
           (/ (sqrt 2.0) (/ (* l (sqrt (+ t_2 (/ 1.0 x)))) t))
           (sqrt (/ (+ x -1.0) (+ x 1.0)))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = 2.0 + ((1.0 / x) * 4.0);
	double t_2 = 1.0 / (x + -1.0);
	double tmp;
	if (t <= -7.4e-205) {
		tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 1.9e-243) {
		tmp = sqrt(2.0) / ((l * sqrt((t_2 + ((1.0 / x) + ((1.0 / pow(x, 2.0)) + ((1.0 / pow(x, 3.0)) + (1.0 / pow(x, 4.0)))))))) / t);
	} else if (t <= 7.4e-116) {
		tmp = (sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * sqrt(t_1)) + ((pow(l, 2.0) / (t * x)) * sqrt((1.0 / t_1)))));
	} else if (t <= 3.2e-87) {
		tmp = sqrt(2.0) / ((l * sqrt((t_2 + (1.0 / x)))) / t);
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 2.0d0 + ((1.0d0 / x) * 4.0d0)
    t_2 = 1.0d0 / (x + (-1.0d0))
    if (t <= (-7.4d-205)) then
        tmp = sqrt(2.0d0) / (sqrt(2.0d0) * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
    else if (t <= 1.9d-243) then
        tmp = sqrt(2.0d0) / ((l * sqrt((t_2 + ((1.0d0 / x) + ((1.0d0 / (x ** 2.0d0)) + ((1.0d0 / (x ** 3.0d0)) + (1.0d0 / (x ** 4.0d0)))))))) / t)
    else if (t <= 7.4d-116) then
        tmp = (sqrt(2.0d0) / (1.0d0 / t)) * (1.0d0 / ((t * sqrt(t_1)) + (((l ** 2.0d0) / (t * x)) * sqrt((1.0d0 / t_1)))))
    else if (t <= 3.2d-87) then
        tmp = sqrt(2.0d0) / ((l * sqrt((t_2 + (1.0d0 / x)))) / t)
    else
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double t_1 = 2.0 + ((1.0 / x) * 4.0);
	double t_2 = 1.0 / (x + -1.0);
	double tmp;
	if (t <= -7.4e-205) {
		tmp = Math.sqrt(2.0) / (Math.sqrt(2.0) * -Math.sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 1.9e-243) {
		tmp = Math.sqrt(2.0) / ((l * Math.sqrt((t_2 + ((1.0 / x) + ((1.0 / Math.pow(x, 2.0)) + ((1.0 / Math.pow(x, 3.0)) + (1.0 / Math.pow(x, 4.0)))))))) / t);
	} else if (t <= 7.4e-116) {
		tmp = (Math.sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * Math.sqrt(t_1)) + ((Math.pow(l, 2.0) / (t * x)) * Math.sqrt((1.0 / t_1)))));
	} else if (t <= 3.2e-87) {
		tmp = Math.sqrt(2.0) / ((l * Math.sqrt((t_2 + (1.0 / x)))) / t);
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = 2.0 + ((1.0 / x) * 4.0)
	t_2 = 1.0 / (x + -1.0)
	tmp = 0
	if t <= -7.4e-205:
		tmp = math.sqrt(2.0) / (math.sqrt(2.0) * -math.sqrt(((x + 1.0) / (x + -1.0))))
	elif t <= 1.9e-243:
		tmp = math.sqrt(2.0) / ((l * math.sqrt((t_2 + ((1.0 / x) + ((1.0 / math.pow(x, 2.0)) + ((1.0 / math.pow(x, 3.0)) + (1.0 / math.pow(x, 4.0)))))))) / t)
	elif t <= 7.4e-116:
		tmp = (math.sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * math.sqrt(t_1)) + ((math.pow(l, 2.0) / (t * x)) * math.sqrt((1.0 / t_1)))))
	elif t <= 3.2e-87:
		tmp = math.sqrt(2.0) / ((l * math.sqrt((t_2 + (1.0 / x)))) / t)
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = Float64(2.0 + Float64(Float64(1.0 / x) * 4.0))
	t_2 = Float64(1.0 / Float64(x + -1.0))
	tmp = 0.0
	if (t <= -7.4e-205)
		tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	elseif (t <= 1.9e-243)
		tmp = Float64(sqrt(2.0) / Float64(Float64(l * sqrt(Float64(t_2 + Float64(Float64(1.0 / x) + Float64(Float64(1.0 / (x ^ 2.0)) + Float64(Float64(1.0 / (x ^ 3.0)) + Float64(1.0 / (x ^ 4.0)))))))) / t));
	elseif (t <= 7.4e-116)
		tmp = Float64(Float64(sqrt(2.0) / Float64(1.0 / t)) * Float64(1.0 / Float64(Float64(t * sqrt(t_1)) + Float64(Float64((l ^ 2.0) / Float64(t * x)) * sqrt(Float64(1.0 / t_1))))));
	elseif (t <= 3.2e-87)
		tmp = Float64(sqrt(2.0) / Float64(Float64(l * sqrt(Float64(t_2 + Float64(1.0 / x)))) / t));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = 2.0 + ((1.0 / x) * 4.0);
	t_2 = 1.0 / (x + -1.0);
	tmp = 0.0;
	if (t <= -7.4e-205)
		tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0))));
	elseif (t <= 1.9e-243)
		tmp = sqrt(2.0) / ((l * sqrt((t_2 + ((1.0 / x) + ((1.0 / (x ^ 2.0)) + ((1.0 / (x ^ 3.0)) + (1.0 / (x ^ 4.0)))))))) / t);
	elseif (t <= 7.4e-116)
		tmp = (sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * sqrt(t_1)) + (((l ^ 2.0) / (t * x)) * sqrt((1.0 / t_1)))));
	elseif (t <= 3.2e-87)
		tmp = sqrt(2.0) / ((l * sqrt((t_2 + (1.0 / x)))) / t);
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 + N[(N[(1.0 / x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.4e-205], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-243], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(l * N[Sqrt[N[(t$95$2 + N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.4e-116], N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[(1.0 / t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(t * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t * x), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e-87], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(l * N[Sqrt[N[(t$95$2 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 + \frac{1}{x} \cdot 4\\
t_2 := \frac{1}{x + -1}\\
\mathbf{if}\;t \leq -7.4 \cdot 10^{-205}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{-243}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{t_2 + \left(\frac{1}{x} + \left(\frac{1}{{x}^{2}} + \left(\frac{1}{{x}^{3}} + \frac{1}{{x}^{4}}\right)\right)\right)}}{t}}\\

\mathbf{elif}\;t \leq 7.4 \cdot 10^{-116}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{1}{t}} \cdot \frac{1}{t \cdot \sqrt{t_1} + \frac{{\ell}^{2}}{t \cdot x} \cdot \sqrt{\frac{1}{t_1}}}\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{-87}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{t_2 + \frac{1}{x}}}{t}}\\

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


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

    1. Initial program 43.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. Simplified43.8%

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

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

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

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

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

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

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

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

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

    if -7.4000000000000002e-205 < t < 1.8999999999999999e-243

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8999999999999999e-243 < t < 7.4000000000000005e-116

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}}}{t}} \]
      2. *-un-lft-identity54.7%

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{\color{blue}{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}}\right)}}{t}} \]
      3. cancel-sign-sub-inv54.7%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}}{t}} \]
      5. *-un-lft-identity54.7%

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

      \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, \mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)\right) + \frac{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{x}}\right)}}}{t}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity54.7%

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

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

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

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

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

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

    if 7.4000000000000005e-116 < t < 3.19999999999999979e-87

    1. Initial program 17.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. Simplified17.9%

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

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

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

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

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

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

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

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

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

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

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

    if 3.19999999999999979e-87 < t

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity87.2%

        \[\leadsto \color{blue}{1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      2. add-sqr-sqrt87.2%

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

        \[\leadsto 1 \cdot \color{blue}{\sqrt{\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}}} \]
      4. *-un-lft-identity87.2%

        \[\leadsto 1 \cdot \sqrt{\color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      5. *-un-lft-identity87.2%

        \[\leadsto 1 \cdot \sqrt{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right) \cdot \color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)}} \]
      6. *-un-lft-identity87.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.4 \cdot 10^{-205}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-243}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \left(\frac{1}{{x}^{2}} + \left(\frac{1}{{x}^{3}} + \frac{1}{{x}^{4}}\right)\right)\right)}}{t}}\\ \mathbf{elif}\;t \leq 7.4 \cdot 10^{-116}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{1}{t}} \cdot \frac{1}{t \cdot \sqrt{2 + \frac{1}{x} \cdot 4} + \frac{{\ell}^{2}}{t \cdot x} \cdot \sqrt{\frac{1}{2 + \frac{1}{x} \cdot 4}}}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-87}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 4: 80.8% accurate, 0.5× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \frac{1}{x + -1}\\ t_2 := 2 + \frac{1}{x} \cdot 4\\ \mathbf{if}\;t \leq -1 \cdot 10^{-204}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-244}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{t_1 + \left(\frac{1}{x} + \left(\frac{1}{{x}^{2}} + \frac{1}{{x}^{3}}\right)\right)}}{t}}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-116}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{1}{t}} \cdot \frac{1}{t \cdot \sqrt{t_2} + \frac{{\ell}^{2}}{t \cdot x} \cdot \sqrt{\frac{1}{t_2}}}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-91}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{t_1 + \frac{1}{x}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ 1.0 (+ x -1.0))) (t_2 (+ 2.0 (* (/ 1.0 x) 4.0))))
   (if (<= t -1e-204)
     (/ (sqrt 2.0) (* (sqrt 2.0) (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
     (if (<= t 2.25e-244)
       (/
        (sqrt 2.0)
        (/
         (*
          l
          (sqrt
           (+ t_1 (+ (/ 1.0 x) (+ (/ 1.0 (pow x 2.0)) (/ 1.0 (pow x 3.0)))))))
         t))
       (if (<= t 3.6e-116)
         (*
          (/ (sqrt 2.0) (/ 1.0 t))
          (/
           1.0
           (+
            (* t (sqrt t_2))
            (* (/ (pow l 2.0) (* t x)) (sqrt (/ 1.0 t_2))))))
         (if (<= t 3.3e-91)
           (/ (sqrt 2.0) (/ (* l (sqrt (+ t_1 (/ 1.0 x)))) t))
           (sqrt (/ (+ x -1.0) (+ x 1.0)))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = 1.0 / (x + -1.0);
	double t_2 = 2.0 + ((1.0 / x) * 4.0);
	double tmp;
	if (t <= -1e-204) {
		tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 2.25e-244) {
		tmp = sqrt(2.0) / ((l * sqrt((t_1 + ((1.0 / x) + ((1.0 / pow(x, 2.0)) + (1.0 / pow(x, 3.0))))))) / t);
	} else if (t <= 3.6e-116) {
		tmp = (sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * sqrt(t_2)) + ((pow(l, 2.0) / (t * x)) * sqrt((1.0 / t_2)))));
	} else if (t <= 3.3e-91) {
		tmp = sqrt(2.0) / ((l * sqrt((t_1 + (1.0 / x)))) / t);
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 1.0d0 / (x + (-1.0d0))
    t_2 = 2.0d0 + ((1.0d0 / x) * 4.0d0)
    if (t <= (-1d-204)) then
        tmp = sqrt(2.0d0) / (sqrt(2.0d0) * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
    else if (t <= 2.25d-244) then
        tmp = sqrt(2.0d0) / ((l * sqrt((t_1 + ((1.0d0 / x) + ((1.0d0 / (x ** 2.0d0)) + (1.0d0 / (x ** 3.0d0))))))) / t)
    else if (t <= 3.6d-116) then
        tmp = (sqrt(2.0d0) / (1.0d0 / t)) * (1.0d0 / ((t * sqrt(t_2)) + (((l ** 2.0d0) / (t * x)) * sqrt((1.0d0 / t_2)))))
    else if (t <= 3.3d-91) then
        tmp = sqrt(2.0d0) / ((l * sqrt((t_1 + (1.0d0 / x)))) / t)
    else
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double t_1 = 1.0 / (x + -1.0);
	double t_2 = 2.0 + ((1.0 / x) * 4.0);
	double tmp;
	if (t <= -1e-204) {
		tmp = Math.sqrt(2.0) / (Math.sqrt(2.0) * -Math.sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 2.25e-244) {
		tmp = Math.sqrt(2.0) / ((l * Math.sqrt((t_1 + ((1.0 / x) + ((1.0 / Math.pow(x, 2.0)) + (1.0 / Math.pow(x, 3.0))))))) / t);
	} else if (t <= 3.6e-116) {
		tmp = (Math.sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * Math.sqrt(t_2)) + ((Math.pow(l, 2.0) / (t * x)) * Math.sqrt((1.0 / t_2)))));
	} else if (t <= 3.3e-91) {
		tmp = Math.sqrt(2.0) / ((l * Math.sqrt((t_1 + (1.0 / x)))) / t);
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	t_1 = 1.0 / (x + -1.0)
	t_2 = 2.0 + ((1.0 / x) * 4.0)
	tmp = 0
	if t <= -1e-204:
		tmp = math.sqrt(2.0) / (math.sqrt(2.0) * -math.sqrt(((x + 1.0) / (x + -1.0))))
	elif t <= 2.25e-244:
		tmp = math.sqrt(2.0) / ((l * math.sqrt((t_1 + ((1.0 / x) + ((1.0 / math.pow(x, 2.0)) + (1.0 / math.pow(x, 3.0))))))) / t)
	elif t <= 3.6e-116:
		tmp = (math.sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * math.sqrt(t_2)) + ((math.pow(l, 2.0) / (t * x)) * math.sqrt((1.0 / t_2)))))
	elif t <= 3.3e-91:
		tmp = math.sqrt(2.0) / ((l * math.sqrt((t_1 + (1.0 / x)))) / t)
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return tmp
l = abs(l)
function code(x, l, t)
	t_1 = Float64(1.0 / Float64(x + -1.0))
	t_2 = Float64(2.0 + Float64(Float64(1.0 / x) * 4.0))
	tmp = 0.0
	if (t <= -1e-204)
		tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	elseif (t <= 2.25e-244)
		tmp = Float64(sqrt(2.0) / Float64(Float64(l * sqrt(Float64(t_1 + Float64(Float64(1.0 / x) + Float64(Float64(1.0 / (x ^ 2.0)) + Float64(1.0 / (x ^ 3.0))))))) / t));
	elseif (t <= 3.6e-116)
		tmp = Float64(Float64(sqrt(2.0) / Float64(1.0 / t)) * Float64(1.0 / Float64(Float64(t * sqrt(t_2)) + Float64(Float64((l ^ 2.0) / Float64(t * x)) * sqrt(Float64(1.0 / t_2))))));
	elseif (t <= 3.3e-91)
		tmp = Float64(sqrt(2.0) / Float64(Float64(l * sqrt(Float64(t_1 + Float64(1.0 / x)))) / t));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	t_1 = 1.0 / (x + -1.0);
	t_2 = 2.0 + ((1.0 / x) * 4.0);
	tmp = 0.0;
	if (t <= -1e-204)
		tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0))));
	elseif (t <= 2.25e-244)
		tmp = sqrt(2.0) / ((l * sqrt((t_1 + ((1.0 / x) + ((1.0 / (x ^ 2.0)) + (1.0 / (x ^ 3.0))))))) / t);
	elseif (t <= 3.6e-116)
		tmp = (sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * sqrt(t_2)) + (((l ^ 2.0) / (t * x)) * sqrt((1.0 / t_2)))));
	elseif (t <= 3.3e-91)
		tmp = sqrt(2.0) / ((l * sqrt((t_1 + (1.0 / x)))) / t);
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 + N[(N[(1.0 / x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e-204], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e-244], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(l * N[Sqrt[N[(t$95$1 + N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e-116], N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[(1.0 / t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(t * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t * x), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e-91], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(l * N[Sqrt[N[(t$95$1 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{1}{x + -1}\\
t_2 := 2 + \frac{1}{x} \cdot 4\\
\mathbf{if}\;t \leq -1 \cdot 10^{-204}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\

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

\mathbf{elif}\;t \leq 3.6 \cdot 10^{-116}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{1}{t}} \cdot \frac{1}{t \cdot \sqrt{t_2} + \frac{{\ell}^{2}}{t \cdot x} \cdot \sqrt{\frac{1}{t_2}}}\\

\mathbf{elif}\;t \leq 3.3 \cdot 10^{-91}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{t_1 + \frac{1}{x}}}{t}}\\

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


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

    1. Initial program 43.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. Simplified43.8%

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

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

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

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

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

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

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

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

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

    if -1e-204 < t < 2.2500000000000001e-244

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.2500000000000001e-244 < t < 3.59999999999999975e-116

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}}}{t}} \]
      2. *-un-lft-identity54.7%

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{\color{blue}{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}}\right)}}{t}} \]
      3. cancel-sign-sub-inv54.7%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}}{t}} \]
      5. *-un-lft-identity54.7%

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

      \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, \mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)\right) + \frac{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{x}}\right)}}}{t}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity54.7%

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

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

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

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

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

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

    if 3.59999999999999975e-116 < t < 3.30000000000000011e-91

    1. Initial program 17.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. Simplified17.9%

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

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

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

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

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

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

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

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

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

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

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

    if 3.30000000000000011e-91 < t

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity87.2%

        \[\leadsto \color{blue}{1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      2. add-sqr-sqrt87.2%

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

        \[\leadsto 1 \cdot \color{blue}{\sqrt{\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}}} \]
      4. *-un-lft-identity87.2%

        \[\leadsto 1 \cdot \sqrt{\color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      5. *-un-lft-identity87.2%

        \[\leadsto 1 \cdot \sqrt{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right) \cdot \color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)}} \]
      6. *-un-lft-identity87.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-204}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-244}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \left(\frac{1}{{x}^{2}} + \frac{1}{{x}^{3}}\right)\right)}}{t}}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-116}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{1}{t}} \cdot \frac{1}{t \cdot \sqrt{2 + \frac{1}{x} \cdot 4} + \frac{{\ell}^{2}}{t \cdot x} \cdot \sqrt{\frac{1}{2 + \frac{1}{x} \cdot 4}}}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-91}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 5: 79.4% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 43.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. Simplified43.8%

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

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

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

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

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

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

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

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

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

    if -2.2e-201 < t < 3.19999999999999996e-91

    1. Initial program 8.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. Simplified8.8%

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}}{t}} \]
      5. *-un-lft-identity60.1%

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

      \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, \mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)\right) + \frac{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{x}}\right)}}}{t}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity60.1%

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

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

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

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

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

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

    if 3.19999999999999996e-91 < t

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity87.2%

        \[\leadsto \color{blue}{1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      2. add-sqr-sqrt87.2%

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

        \[\leadsto 1 \cdot \color{blue}{\sqrt{\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}}} \]
      4. *-un-lft-identity87.2%

        \[\leadsto 1 \cdot \sqrt{\color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      5. *-un-lft-identity87.2%

        \[\leadsto 1 \cdot \sqrt{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right) \cdot \color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)}} \]
      6. *-un-lft-identity87.2%

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

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

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

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

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

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

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

Alternative 6: 79.2% accurate, 0.7× speedup?

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

\mathbf{elif}\;t \leq 3.2 \cdot 10^{-87}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}{t}}\\

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


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

    1. Initial program 43.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. Simplified43.8%

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

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

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

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

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

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

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

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

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

    if -1.24999999999999993e-202 < t < 3.19999999999999979e-87

    1. Initial program 8.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. Simplified8.8%

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

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

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

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

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

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

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

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

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

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

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

    if 3.19999999999999979e-87 < t

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity87.2%

        \[\leadsto \color{blue}{1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      2. add-sqr-sqrt87.2%

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

        \[\leadsto 1 \cdot \color{blue}{\sqrt{\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}}} \]
      4. *-un-lft-identity87.2%

        \[\leadsto 1 \cdot \sqrt{\color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      5. *-un-lft-identity87.2%

        \[\leadsto 1 \cdot \sqrt{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right) \cdot \color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)}} \]
      6. *-un-lft-identity87.2%

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

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

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

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

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

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

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

Alternative 7: 78.9% accurate, 1.0× speedup?

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

\mathbf{elif}\;t \leq 3 \cdot 10^{-91}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}{t}}\\

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


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

    1. Initial program 43.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. Simplified43.8%

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}}}{t}} \]
      2. *-un-lft-identity54.0%

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{\color{blue}{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}}\right)}}{t}} \]
      3. cancel-sign-sub-inv54.0%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}}{t}} \]
      5. *-un-lft-identity54.0%

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}\right)}}{t}} \]
    5. Applied egg-rr54.0%

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \color{blue}{\left(\left(-t\right) \cdot \sqrt{2 + \frac{4}{x}}\right)}}}{t}} \]
    9. Taylor expanded in t around 0 87.2%

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

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{-\sqrt{2 + 4 \cdot \frac{1}{x}}}} \]
      2. associate-*r/87.2%

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

        \[\leadsto \frac{\sqrt{2}}{-\sqrt{2 + \frac{\color{blue}{4}}{x}}} \]
    11. Simplified87.2%

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

    if -4.0000000000000001e-202 < t < 3.0000000000000002e-91

    1. Initial program 8.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. Simplified8.8%

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

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

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

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

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

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

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

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

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

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

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

    if 3.0000000000000002e-91 < t

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity87.2%

        \[\leadsto \color{blue}{1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      2. add-sqr-sqrt87.2%

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

        \[\leadsto 1 \cdot \color{blue}{\sqrt{\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}}} \]
      4. *-un-lft-identity87.2%

        \[\leadsto 1 \cdot \sqrt{\color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      5. *-un-lft-identity87.2%

        \[\leadsto 1 \cdot \sqrt{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right) \cdot \color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)}} \]
      6. *-un-lft-identity87.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{-202}:\\ \;\;\;\;\frac{\sqrt{2}}{-\sqrt{2 + \frac{4}{x}}}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-91}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 8: 78.8% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 43.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. Simplified43.8%

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}}}{t}} \]
      2. *-un-lft-identity54.0%

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{\color{blue}{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}}\right)}}{t}} \]
      3. cancel-sign-sub-inv54.0%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}}{t}} \]
      5. *-un-lft-identity54.0%

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}\right)}}{t}} \]
    5. Applied egg-rr54.0%

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \color{blue}{\left(\left(-t\right) \cdot \sqrt{2 + \frac{4}{x}}\right)}}}{t}} \]
    9. Taylor expanded in t around 0 87.2%

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

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{-\sqrt{2 + 4 \cdot \frac{1}{x}}}} \]
      2. associate-*r/87.2%

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

        \[\leadsto \frac{\sqrt{2}}{-\sqrt{2 + \frac{\color{blue}{4}}{x}}} \]
    11. Simplified87.2%

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

    if -1.1e-201 < t < 2.15000000000000007e-240

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{2 \cdot {\ell}^{2}}{x}}}}{t}} \]
    8. Simplified67.0%

      \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{2 \cdot {\ell}^{2}}{x}}}}{t}} \]
    9. Taylor expanded in l around 0 49.4%

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

    if 2.15000000000000007e-240 < t

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity77.1%

        \[\leadsto \color{blue}{1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      2. add-sqr-sqrt77.1%

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

        \[\leadsto 1 \cdot \color{blue}{\sqrt{\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}}} \]
      4. *-un-lft-identity77.1%

        \[\leadsto 1 \cdot \sqrt{\color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      5. *-un-lft-identity77.1%

        \[\leadsto 1 \cdot \sqrt{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right) \cdot \color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)}} \]
      6. *-un-lft-identity77.1%

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

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

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

      \[\leadsto \color{blue}{1 \cdot \sqrt{\frac{x + -1}{x + 1}}} \]
    8. Step-by-step derivation
      1. *-lft-identity77.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{-201}:\\ \;\;\;\;\frac{\sqrt{2}}{-\sqrt{2 + \frac{4}{x}}}\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-240}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 9: 77.9% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 43.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. Simplified43.8%

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}}}{t}} \]
      2. *-un-lft-identity54.0%

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{\color{blue}{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}}\right)}}{t}} \]
      3. cancel-sign-sub-inv54.0%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}}{t}} \]
      5. *-un-lft-identity54.0%

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}\right)}}{t}} \]
    5. Applied egg-rr54.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{0.5} \cdot \sqrt{2}\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg85.4%

        \[\leadsto \color{blue}{-\sqrt{0.5} \cdot \sqrt{2}} \]
      2. distribute-rgt-neg-in85.4%

        \[\leadsto \color{blue}{\sqrt{0.5} \cdot \left(-\sqrt{2}\right)} \]
    11. Simplified85.4%

      \[\leadsto \color{blue}{\sqrt{0.5} \cdot \left(-\sqrt{2}\right)} \]

    if -6.59999999999999979e-202 < t < 2.5000000000000002e-240

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{2 \cdot {\ell}^{2}}{x}}}}{t}} \]
    8. Simplified67.0%

      \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{2 \cdot {\ell}^{2}}{x}}}}{t}} \]
    9. Taylor expanded in l around 0 49.4%

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

    if 2.5000000000000002e-240 < t

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity77.1%

        \[\leadsto \color{blue}{1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      2. add-sqr-sqrt77.1%

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

        \[\leadsto 1 \cdot \color{blue}{\sqrt{\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}}} \]
      4. *-un-lft-identity77.1%

        \[\leadsto 1 \cdot \sqrt{\color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      5. *-un-lft-identity77.1%

        \[\leadsto 1 \cdot \sqrt{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right) \cdot \color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)}} \]
      6. *-un-lft-identity77.1%

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

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

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

      \[\leadsto \color{blue}{1 \cdot \sqrt{\frac{x + -1}{x + 1}}} \]
    8. Step-by-step derivation
      1. *-lft-identity77.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{-202}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{0.5}\right)\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-240}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 10: 78.5% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 43.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. Simplified43.8%

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}}}{t}} \]
      2. *-un-lft-identity54.0%

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{\color{blue}{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}}\right)}}{t}} \]
      3. cancel-sign-sub-inv54.0%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}}{t}} \]
      5. *-un-lft-identity54.0%

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{\frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}\right)}}{t}} \]
    5. Applied egg-rr54.0%

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{-1 \cdot \sqrt{2}}} \]
    10. Step-by-step derivation
      1. mul-1-neg86.7%

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{-\sqrt{2}}} \]
    11. Simplified86.7%

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{-\sqrt{2}}} \]

    if -2.8e-204 < t < 4.20000000000000037e-242

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{2 \cdot {\ell}^{2}}{x}}}}{t}} \]
    8. Simplified67.0%

      \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{2 \cdot {\ell}^{2}}{x}}}}{t}} \]
    9. Taylor expanded in l around 0 49.4%

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

    if 4.20000000000000037e-242 < t

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity77.1%

        \[\leadsto \color{blue}{1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      2. add-sqr-sqrt77.1%

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

        \[\leadsto 1 \cdot \color{blue}{\sqrt{\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}}} \]
      4. *-un-lft-identity77.1%

        \[\leadsto 1 \cdot \sqrt{\color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      5. *-un-lft-identity77.1%

        \[\leadsto 1 \cdot \sqrt{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right) \cdot \color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)}} \]
      6. *-un-lft-identity77.1%

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

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

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

      \[\leadsto \color{blue}{1 \cdot \sqrt{\frac{x + -1}{x + 1}}} \]
    8. Step-by-step derivation
      1. *-lft-identity77.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{-204}:\\ \;\;\;\;\frac{\sqrt{2}}{-\sqrt{2}}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-242}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 11: 52.2% accurate, 2.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-42}:\\ \;\;\;\;-\sqrt{4 + \frac{-8}{x}}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-242}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1e-42)
   (- (sqrt (+ 4.0 (/ -8.0 x))))
   (if (<= t 7.2e-242) (* (/ t l) (sqrt x)) (sqrt (/ (+ x -1.0) (+ x 1.0))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-42) {
		tmp = -sqrt((4.0 + (-8.0 / x)));
	} else if (t <= 7.2e-242) {
		tmp = (t / l) * sqrt(x);
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-1d-42)) then
        tmp = -sqrt((4.0d0 + ((-8.0d0) / x)))
    else if (t <= 7.2d-242) then
        tmp = (t / l) * sqrt(x)
    else
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-42) {
		tmp = -Math.sqrt((4.0 + (-8.0 / x)));
	} else if (t <= 7.2e-242) {
		tmp = (t / l) * Math.sqrt(x);
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1e-42:
		tmp = -math.sqrt((4.0 + (-8.0 / x)))
	elif t <= 7.2e-242:
		tmp = (t / l) * math.sqrt(x)
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1e-42)
		tmp = Float64(-sqrt(Float64(4.0 + Float64(-8.0 / x))));
	elseif (t <= 7.2e-242)
		tmp = Float64(Float64(t / l) * sqrt(x));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1e-42)
		tmp = -sqrt((4.0 + (-8.0 / x)));
	elseif (t <= 7.2e-242)
		tmp = (t / l) * sqrt(x);
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -1e-42], (-N[Sqrt[N[(4.0 + N[(-8.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 7.2e-242], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-42}:\\
\;\;\;\;-\sqrt{4 + \frac{-8}{x}}\\

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

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


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

    1. Initial program 49.6%

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}}}{t}} \]
      2. *-un-lft-identity49.7%

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{\color{blue}{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}}\right)}}{t}} \]
      3. cancel-sign-sub-inv49.7%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}}{t}} \]
      5. *-un-lft-identity49.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0 - \sqrt{-2 \cdot \left(-2 + \frac{4}{x}\right)}} \]
    10. Step-by-step derivation
      1. sub0-neg17.9%

        \[\leadsto \color{blue}{-\sqrt{-2 \cdot \left(-2 + \frac{4}{x}\right)}} \]
      2. distribute-lft-in17.9%

        \[\leadsto -\sqrt{\color{blue}{-2 \cdot -2 + -2 \cdot \frac{4}{x}}} \]
      3. metadata-eval17.9%

        \[\leadsto -\sqrt{\color{blue}{4} + -2 \cdot \frac{4}{x}} \]
      4. associate-*r/17.9%

        \[\leadsto -\sqrt{4 + \color{blue}{\frac{-2 \cdot 4}{x}}} \]
      5. metadata-eval17.9%

        \[\leadsto -\sqrt{4 + \frac{\color{blue}{-8}}{x}} \]
    11. Simplified17.9%

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

    if -1.00000000000000004e-42 < t < 7.20000000000000028e-242

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{2 \cdot {\ell}^{2}}{x}}}}{t}} \]
    9. Taylor expanded in l around 0 33.9%

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

    if 7.20000000000000028e-242 < t

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity77.1%

        \[\leadsto \color{blue}{1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      2. add-sqr-sqrt77.1%

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

        \[\leadsto 1 \cdot \color{blue}{\sqrt{\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}}} \]
      4. *-un-lft-identity77.1%

        \[\leadsto 1 \cdot \sqrt{\color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)} \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
      5. *-un-lft-identity77.1%

        \[\leadsto 1 \cdot \sqrt{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right) \cdot \color{blue}{\left(1 \cdot \frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{-1 + x}}}\right)}} \]
      6. *-un-lft-identity77.1%

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

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

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

      \[\leadsto \color{blue}{1 \cdot \sqrt{\frac{x + -1}{x + 1}}} \]
    8. Step-by-step derivation
      1. *-lft-identity77.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-42}:\\ \;\;\;\;-\sqrt{4 + \frac{-8}{x}}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-242}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 12: 51.9% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-42}:\\ \;\;\;\;-\sqrt{4 + \frac{-8}{x}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-241}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (if (<= t -1e-42)
   (- (sqrt (+ 4.0 (/ -8.0 x))))
   (if (<= t 3.5e-241) (* (/ t l) (sqrt x)) (- 1.0 (/ 1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-42) {
		tmp = -sqrt((4.0 + (-8.0 / x)));
	} else if (t <= 3.5e-241) {
		tmp = (t / l) * sqrt(x);
	} else {
		tmp = 1.0 - (1.0 / x);
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-1d-42)) then
        tmp = -sqrt((4.0d0 + ((-8.0d0) / x)))
    else if (t <= 3.5d-241) then
        tmp = (t / l) * sqrt(x)
    else
        tmp = 1.0d0 - (1.0d0 / x)
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1e-42) {
		tmp = -Math.sqrt((4.0 + (-8.0 / x)));
	} else if (t <= 3.5e-241) {
		tmp = (t / l) * Math.sqrt(x);
	} else {
		tmp = 1.0 - (1.0 / x);
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1e-42:
		tmp = -math.sqrt((4.0 + (-8.0 / x)))
	elif t <= 3.5e-241:
		tmp = (t / l) * math.sqrt(x)
	else:
		tmp = 1.0 - (1.0 / x)
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1e-42)
		tmp = Float64(-sqrt(Float64(4.0 + Float64(-8.0 / x))));
	elseif (t <= 3.5e-241)
		tmp = Float64(Float64(t / l) * sqrt(x));
	else
		tmp = Float64(1.0 - Float64(1.0 / x));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1e-42)
		tmp = -sqrt((4.0 + (-8.0 / x)));
	elseif (t <= 3.5e-241)
		tmp = (t / l) * sqrt(x);
	else
		tmp = 1.0 - (1.0 / x);
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -1e-42], (-N[Sqrt[N[(4.0 + N[(-8.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 3.5e-241], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-42}:\\
\;\;\;\;-\sqrt{4 + \frac{-8}{x}}\\

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

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


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

    1. Initial program 49.6%

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{e^{\log \left(\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}\right)}}}{t}} \]
      2. *-un-lft-identity49.7%

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{\color{blue}{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}}\right)}}{t}} \]
      3. cancel-sign-sub-inv49.7%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{e^{\log \left(\sqrt{1 \cdot \left(\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \color{blue}{1} \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right)}\right)}}{t}} \]
      5. *-un-lft-identity49.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0 - \sqrt{-2 \cdot \left(-2 + \frac{4}{x}\right)}} \]
    10. Step-by-step derivation
      1. sub0-neg17.9%

        \[\leadsto \color{blue}{-\sqrt{-2 \cdot \left(-2 + \frac{4}{x}\right)}} \]
      2. distribute-lft-in17.9%

        \[\leadsto -\sqrt{\color{blue}{-2 \cdot -2 + -2 \cdot \frac{4}{x}}} \]
      3. metadata-eval17.9%

        \[\leadsto -\sqrt{\color{blue}{4} + -2 \cdot \frac{4}{x}} \]
      4. associate-*r/17.9%

        \[\leadsto -\sqrt{4 + \color{blue}{\frac{-2 \cdot 4}{x}}} \]
      5. metadata-eval17.9%

        \[\leadsto -\sqrt{4 + \frac{\color{blue}{-8}}{x}} \]
    11. Simplified17.9%

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

    if -1.00000000000000004e-42 < t < 3.4999999999999999e-241

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{2 \cdot {\ell}^{2}}{x}}}}{t}} \]
    9. Taylor expanded in l around 0 33.9%

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

    if 3.4999999999999999e-241 < t

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-42}:\\ \;\;\;\;-\sqrt{4 + \frac{-8}{x}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-241}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]

Alternative 13: 49.8% accurate, 2.1× speedup?

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{2 \cdot {\ell}^{2}}{x}}}}{t}} \]
    8. Simplified20.1%

      \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{2 \cdot {\ell}^{2}}{x}}}}{t}} \]
    9. Taylor expanded in l around 0 17.1%

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

    if 7.3000000000000001e-242 < t

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

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

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

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

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

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

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

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

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

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

Alternative 14: 39.0% 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 33.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. Simplified33.2%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{1 - \frac{1}{x}} \]
  7. Final simplification36.2%

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

Alternative 15: 38.7% 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 33.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. Simplified33.2%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{1} \]
  7. Final simplification36.1%

    \[\leadsto 1 \]

Reproduce

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