Toniolo and Linder, Equation (7)

Percentage Accurate: 32.7% → 81.6%
Time: 25.4s
Alternatives: 11
Speedup: 225.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 11 alternatives:

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

Initial Program: 32.7% accurate, 1.0× speedup?

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

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

Alternative 1: 81.6% accurate, 0.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := 2 + \left(\frac{2}{x} + \frac{2}{x}\right)\\ t_2 := \sqrt{2} \cdot t\\ t_3 := \frac{x + 1}{x + -1}\\ t_4 := \frac{t_2}{\sqrt{t_3 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\ t_5 := \mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)\\ \mathbf{if}\;t_4 \leq -1.000000000000001:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\frac{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}{t} \cdot \left(\sqrt{\frac{1}{t_1}} \cdot -0.5\right) - t \cdot \sqrt{t_1}}\\ \mathbf{elif}\;t_4 \leq 0:\\ \;\;\;\;\sqrt[3]{{\left(\frac{t}{\frac{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t_2\right) \cdot \sqrt{t_3}, \ell\right)}{\sqrt{2}}}\right)}^{3}}\\ \mathbf{elif}\;t_4 \leq \infty:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{t_5 + t_5}{x \cdot x}\right) + \frac{t_5}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (+ 2.0 (+ (/ 2.0 x) (/ 2.0 x))))
        (t_2 (* (sqrt 2.0) t))
        (t_3 (/ (+ x 1.0) (+ x -1.0)))
        (t_4 (/ t_2 (sqrt (- (* t_3 (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
        (t_5 (fma (* 2.0 t) t (* l l))))
   (if (<= t_4 -1.000000000000001)
     (*
      t
      (/
       (sqrt 2.0)
       (-
        (* (/ (* 2.0 (* l (/ l x))) t) (* (sqrt (/ 1.0 t_1)) -0.5))
        (* t (sqrt t_1)))))
     (if (<= t_4 0.0)
       (cbrt
        (pow (/ t (/ (hypot (* (hypot l t_2) (sqrt t_3)) l) (sqrt 2.0))) 3.0))
       (if (<= t_4 INFINITY)
         (*
          t
          (/
           (sqrt 2.0)
           (sqrt
            (+
             (/ (* l l) x)
             (+
              (+ (* 2.0 (+ (* t t) (/ (* t t) x))) (/ (+ t_5 t_5) (* x x)))
              (/ t_5 x))))))
         (* t (/ (sqrt 2.0) (* l (* (sqrt 2.0) (sqrt (/ 1.0 x)))))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = 2.0 + ((2.0 / x) + (2.0 / x));
	double t_2 = sqrt(2.0) * t;
	double t_3 = (x + 1.0) / (x + -1.0);
	double t_4 = t_2 / sqrt(((t_3 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
	double t_5 = fma((2.0 * t), t, (l * l));
	double tmp;
	if (t_4 <= -1.000000000000001) {
		tmp = t * (sqrt(2.0) / ((((2.0 * (l * (l / x))) / t) * (sqrt((1.0 / t_1)) * -0.5)) - (t * sqrt(t_1))));
	} else if (t_4 <= 0.0) {
		tmp = cbrt(pow((t / (hypot((hypot(l, t_2) * sqrt(t_3)), l) / sqrt(2.0))), 3.0));
	} else if (t_4 <= ((double) INFINITY)) {
		tmp = t * (sqrt(2.0) / sqrt((((l * l) / x) + (((2.0 * ((t * t) + ((t * t) / x))) + ((t_5 + t_5) / (x * x))) + (t_5 / x)))));
	} else {
		tmp = t * (sqrt(2.0) / (l * (sqrt(2.0) * sqrt((1.0 / x)))));
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = Float64(2.0 + Float64(Float64(2.0 / x) + Float64(2.0 / x)))
	t_2 = Float64(sqrt(2.0) * t)
	t_3 = Float64(Float64(x + 1.0) / Float64(x + -1.0))
	t_4 = Float64(t_2 / sqrt(Float64(Float64(t_3 * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l))))
	t_5 = fma(Float64(2.0 * t), t, Float64(l * l))
	tmp = 0.0
	if (t_4 <= -1.000000000000001)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(Float64(Float64(2.0 * Float64(l * Float64(l / x))) / t) * Float64(sqrt(Float64(1.0 / t_1)) * -0.5)) - Float64(t * sqrt(t_1)))));
	elseif (t_4 <= 0.0)
		tmp = cbrt((Float64(t / Float64(hypot(Float64(hypot(l, t_2) * sqrt(t_3)), l) / sqrt(2.0))) ^ 3.0));
	elseif (t_4 <= Inf)
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(Float64(t_5 + t_5) / Float64(x * x))) + Float64(t_5 / x))))));
	else
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * Float64(sqrt(2.0) * sqrt(Float64(1.0 / x))))));
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 + N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 / N[Sqrt[N[(N[(t$95$3 * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(2.0 * t), $MachinePrecision] * t + N[(l * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -1.000000000000001], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[(N[(2.0 * N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] - N[(t * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[Power[N[Power[N[(t / N[(N[Sqrt[N[(N[Sqrt[l ^ 2 + t$95$2 ^ 2], $MachinePrecision] * N[Sqrt[t$95$3], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$5 + t$95$5), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 + \left(\frac{2}{x} + \frac{2}{x}\right)\\
t_2 := \sqrt{2} \cdot t\\
t_3 := \frac{x + 1}{x + -1}\\
t_4 := \frac{t_2}{\sqrt{t_3 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
t_5 := \mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)\\
\mathbf{if}\;t_4 \leq -1.000000000000001:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\frac{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}{t} \cdot \left(\sqrt{\frac{1}{t_1}} \cdot -0.5\right) - t \cdot \sqrt{t_1}}\\

\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\sqrt[3]{{\left(\frac{t}{\frac{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t_2\right) \cdot \sqrt{t_3}, \ell\right)}{\sqrt{2}}}\right)}^{3}}\\

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{t_5 + t_5}{x \cdot x}\right) + \frac{t_5}{x}\right)}}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -1.00000000000000111

    1. Initial program 6.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000111 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < 0.0

    1. Initial program 34.1%

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < +inf.0

    1. Initial program 58.8%

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

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

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

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

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

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

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

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

    if +inf.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l))))

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}} \cdot t \]
  3. Recombined 4 regimes into one program.
  4. Final simplification81.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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}} \leq -1.000000000000001:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\frac{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}{t} \cdot \left(\sqrt{\frac{1}{2 + \left(\frac{2}{x} + \frac{2}{x}\right)}} \cdot -0.5\right) - t \cdot \sqrt{2 + \left(\frac{2}{x} + \frac{2}{x}\right)}}\\ \mathbf{elif}\;\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}} \leq 0:\\ \;\;\;\;\sqrt[3]{{\left(\frac{t}{\frac{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, \sqrt{2} \cdot t\right) \cdot \sqrt{\frac{x + 1}{x + -1}}, \ell\right)}{\sqrt{2}}}\right)}^{3}}\\ \mathbf{elif}\;\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}} \leq \infty:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right) + \mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x \cdot x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \end{array} \]

Alternative 2: 81.6% accurate, 0.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)\\ t_2 := 2 + \left(\frac{2}{x} + \frac{2}{x}\right)\\ t_3 := \sqrt{2} \cdot t\\ t_4 := \frac{x + 1}{x + -1}\\ t_5 := \frac{t_3}{\sqrt{t_4 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\ \mathbf{if}\;t_5 \leq -1.000000000000001:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\frac{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}{t} \cdot \left(\sqrt{\frac{1}{t_2}} \cdot -0.5\right) - t \cdot \sqrt{t_2}}\\ \mathbf{elif}\;t_5 \leq 0:\\ \;\;\;\;\frac{1}{\frac{\mathsf{hypot}\left(t_3 \cdot \left(-\sqrt{t_4}\right), \ell\right)}{t_3}}\\ \mathbf{elif}\;t_5 \leq \infty:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{t_1 + t_1}{x \cdot x}\right) + \frac{t_1}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (fma (* 2.0 t) t (* l l)))
        (t_2 (+ 2.0 (+ (/ 2.0 x) (/ 2.0 x))))
        (t_3 (* (sqrt 2.0) t))
        (t_4 (/ (+ x 1.0) (+ x -1.0)))
        (t_5 (/ t_3 (sqrt (- (* t_4 (+ (* l l) (* 2.0 (* t t)))) (* l l))))))
   (if (<= t_5 -1.000000000000001)
     (*
      t
      (/
       (sqrt 2.0)
       (-
        (* (/ (* 2.0 (* l (/ l x))) t) (* (sqrt (/ 1.0 t_2)) -0.5))
        (* t (sqrt t_2)))))
     (if (<= t_5 0.0)
       (/ 1.0 (/ (hypot (* t_3 (- (sqrt t_4))) l) t_3))
       (if (<= t_5 INFINITY)
         (*
          t
          (/
           (sqrt 2.0)
           (sqrt
            (+
             (/ (* l l) x)
             (+
              (+ (* 2.0 (+ (* t t) (/ (* t t) x))) (/ (+ t_1 t_1) (* x x)))
              (/ t_1 x))))))
         (* t (/ (sqrt 2.0) (* l (* (sqrt 2.0) (sqrt (/ 1.0 x)))))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = fma((2.0 * t), t, (l * l));
	double t_2 = 2.0 + ((2.0 / x) + (2.0 / x));
	double t_3 = sqrt(2.0) * t;
	double t_4 = (x + 1.0) / (x + -1.0);
	double t_5 = t_3 / sqrt(((t_4 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
	double tmp;
	if (t_5 <= -1.000000000000001) {
		tmp = t * (sqrt(2.0) / ((((2.0 * (l * (l / x))) / t) * (sqrt((1.0 / t_2)) * -0.5)) - (t * sqrt(t_2))));
	} else if (t_5 <= 0.0) {
		tmp = 1.0 / (hypot((t_3 * -sqrt(t_4)), l) / t_3);
	} else if (t_5 <= ((double) INFINITY)) {
		tmp = t * (sqrt(2.0) / sqrt((((l * l) / x) + (((2.0 * ((t * t) + ((t * t) / x))) + ((t_1 + t_1) / (x * x))) + (t_1 / x)))));
	} else {
		tmp = t * (sqrt(2.0) / (l * (sqrt(2.0) * sqrt((1.0 / x)))));
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = fma(Float64(2.0 * t), t, Float64(l * l))
	t_2 = Float64(2.0 + Float64(Float64(2.0 / x) + Float64(2.0 / x)))
	t_3 = Float64(sqrt(2.0) * t)
	t_4 = Float64(Float64(x + 1.0) / Float64(x + -1.0))
	t_5 = Float64(t_3 / sqrt(Float64(Float64(t_4 * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l))))
	tmp = 0.0
	if (t_5 <= -1.000000000000001)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(Float64(Float64(2.0 * Float64(l * Float64(l / x))) / t) * Float64(sqrt(Float64(1.0 / t_2)) * -0.5)) - Float64(t * sqrt(t_2)))));
	elseif (t_5 <= 0.0)
		tmp = Float64(1.0 / Float64(hypot(Float64(t_3 * Float64(-sqrt(t_4))), l) / t_3));
	elseif (t_5 <= Inf)
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(Float64(t_1 + t_1) / Float64(x * x))) + Float64(t_1 / x))))));
	else
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * Float64(sqrt(2.0) * sqrt(Float64(1.0 / x))))));
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(2.0 * t), $MachinePrecision] * t + N[(l * l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 + N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 / N[Sqrt[N[(N[(t$95$4 * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -1.000000000000001], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[(N[(2.0 * N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[Sqrt[N[(1.0 / t$95$2), $MachinePrecision]], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] - N[(t * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 0.0], N[(1.0 / N[(N[Sqrt[N[(t$95$3 * (-N[Sqrt[t$95$4], $MachinePrecision])), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 + t$95$1), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)\\
t_2 := 2 + \left(\frac{2}{x} + \frac{2}{x}\right)\\
t_3 := \sqrt{2} \cdot t\\
t_4 := \frac{x + 1}{x + -1}\\
t_5 := \frac{t_3}{\sqrt{t_4 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
\mathbf{if}\;t_5 \leq -1.000000000000001:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\frac{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}{t} \cdot \left(\sqrt{\frac{1}{t_2}} \cdot -0.5\right) - t \cdot \sqrt{t_2}}\\

\mathbf{elif}\;t_5 \leq 0:\\
\;\;\;\;\frac{1}{\frac{\mathsf{hypot}\left(t_3 \cdot \left(-\sqrt{t_4}\right), \ell\right)}{t_3}}\\

\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{t_1 + t_1}{x \cdot x}\right) + \frac{t_1}{x}\right)}}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -1.00000000000000111

    1. Initial program 6.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000111 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < 0.0

    1. Initial program 34.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < +inf.0

    1. Initial program 58.8%

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

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

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

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

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

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

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

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

    if +inf.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l))))

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}} \cdot t \]
  3. Recombined 4 regimes into one program.
  4. Final simplification81.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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}} \leq -1.000000000000001:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\frac{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}{t} \cdot \left(\sqrt{\frac{1}{2 + \left(\frac{2}{x} + \frac{2}{x}\right)}} \cdot -0.5\right) - t \cdot \sqrt{2 + \left(\frac{2}{x} + \frac{2}{x}\right)}}\\ \mathbf{elif}\;\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}} \leq 0:\\ \;\;\;\;\frac{1}{\frac{\mathsf{hypot}\left(\left(\sqrt{2} \cdot t\right) \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right), \ell\right)}{\sqrt{2} \cdot t}}\\ \mathbf{elif}\;\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}} \leq \infty:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right) + \mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x \cdot x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \end{array} \]

Alternative 3: 81.6% accurate, 0.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := 2 + \left(\frac{2}{x} + \frac{2}{x}\right)\\ t_2 := \sqrt{2} \cdot t\\ t_3 := \frac{x + 1}{x + -1}\\ t_4 := \frac{t_2}{\sqrt{t_3 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\ \mathbf{if}\;t_4 \leq -1.000000000000001:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\frac{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}{t} \cdot \left(\sqrt{\frac{1}{t_1}} \cdot -0.5\right) - t \cdot \sqrt{t_1}}\\ \mathbf{elif}\;t_4 \leq 0:\\ \;\;\;\;\frac{1}{\frac{\mathsf{hypot}\left(t_2 \cdot \left(-\sqrt{t_3}\right), \ell\right)}{t_2}}\\ \mathbf{elif}\;t_4 \leq \infty:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (+ 2.0 (+ (/ 2.0 x) (/ 2.0 x))))
        (t_2 (* (sqrt 2.0) t))
        (t_3 (/ (+ x 1.0) (+ x -1.0)))
        (t_4 (/ t_2 (sqrt (- (* t_3 (+ (* l l) (* 2.0 (* t t)))) (* l l))))))
   (if (<= t_4 -1.000000000000001)
     (*
      t
      (/
       (sqrt 2.0)
       (-
        (* (/ (* 2.0 (* l (/ l x))) t) (* (sqrt (/ 1.0 t_1)) -0.5))
        (* t (sqrt t_1)))))
     (if (<= t_4 0.0)
       (/ 1.0 (/ (hypot (* t_2 (- (sqrt t_3))) l) t_2))
       (if (<= t_4 INFINITY)
         (*
          t
          (/
           (sqrt 2.0)
           (sqrt
            (+
             (/ (* l l) x)
             (+
              (* 2.0 (+ (* t t) (/ (* t t) x)))
              (/ (fma (* 2.0 t) t (* l l)) x))))))
         (* t (/ (sqrt 2.0) (* l (* (sqrt 2.0) (sqrt (/ 1.0 x)))))))))))
l = abs(l);
double code(double x, double l, double t) {
	double t_1 = 2.0 + ((2.0 / x) + (2.0 / x));
	double t_2 = sqrt(2.0) * t;
	double t_3 = (x + 1.0) / (x + -1.0);
	double t_4 = t_2 / sqrt(((t_3 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
	double tmp;
	if (t_4 <= -1.000000000000001) {
		tmp = t * (sqrt(2.0) / ((((2.0 * (l * (l / x))) / t) * (sqrt((1.0 / t_1)) * -0.5)) - (t * sqrt(t_1))));
	} else if (t_4 <= 0.0) {
		tmp = 1.0 / (hypot((t_2 * -sqrt(t_3)), l) / t_2);
	} else if (t_4 <= ((double) INFINITY)) {
		tmp = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma((2.0 * t), t, (l * l)) / x)))));
	} else {
		tmp = t * (sqrt(2.0) / (l * (sqrt(2.0) * sqrt((1.0 / x)))));
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	t_1 = Float64(2.0 + Float64(Float64(2.0 / x) + Float64(2.0 / x)))
	t_2 = Float64(sqrt(2.0) * t)
	t_3 = Float64(Float64(x + 1.0) / Float64(x + -1.0))
	t_4 = Float64(t_2 / sqrt(Float64(Float64(t_3 * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l))))
	tmp = 0.0
	if (t_4 <= -1.000000000000001)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(Float64(Float64(2.0 * Float64(l * Float64(l / x))) / t) * Float64(sqrt(Float64(1.0 / t_1)) * -0.5)) - Float64(t * sqrt(t_1)))));
	elseif (t_4 <= 0.0)
		tmp = Float64(1.0 / Float64(hypot(Float64(t_2 * Float64(-sqrt(t_3))), l) / t_2));
	elseif (t_4 <= Inf)
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(Float64(2.0 * t), t, Float64(l * l)) / x))))));
	else
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * Float64(sqrt(2.0) * sqrt(Float64(1.0 / x))))));
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 + N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 / N[Sqrt[N[(N[(t$95$3 * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -1.000000000000001], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[(N[(2.0 * N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] - N[(t * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(1.0 / N[(N[Sqrt[N[(t$95$2 * (-N[Sqrt[t$95$3], $MachinePrecision])), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(2.0 * t), $MachinePrecision] * t + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 + \left(\frac{2}{x} + \frac{2}{x}\right)\\
t_2 := \sqrt{2} \cdot t\\
t_3 := \frac{x + 1}{x + -1}\\
t_4 := \frac{t_2}{\sqrt{t_3 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
\mathbf{if}\;t_4 \leq -1.000000000000001:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\frac{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}{t} \cdot \left(\sqrt{\frac{1}{t_1}} \cdot -0.5\right) - t \cdot \sqrt{t_1}}\\

\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\frac{1}{\frac{\mathsf{hypot}\left(t_2 \cdot \left(-\sqrt{t_3}\right), \ell\right)}{t_2}}\\

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x}\right)}}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -1.00000000000000111

    1. Initial program 6.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000111 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < 0.0

    1. Initial program 34.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < +inf.0

    1. Initial program 58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l))))

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}} \cdot t \]
  3. Recombined 4 regimes into one program.
  4. Final simplification81.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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}} \leq -1.000000000000001:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\frac{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}{t} \cdot \left(\sqrt{\frac{1}{2 + \left(\frac{2}{x} + \frac{2}{x}\right)}} \cdot -0.5\right) - t \cdot \sqrt{2 + \left(\frac{2}{x} + \frac{2}{x}\right)}}\\ \mathbf{elif}\;\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}} \leq 0:\\ \;\;\;\;\frac{1}{\frac{\mathsf{hypot}\left(\left(\sqrt{2} \cdot t\right) \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right), \ell\right)}{\sqrt{2} \cdot t}}\\ \mathbf{elif}\;\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}} \leq \infty:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \end{array} \]

Alternative 4: 79.5% accurate, 0.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5.7 \cdot 10^{-293}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.46 \cdot 10^{+57}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x}\right)}}\\ \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 -5.7e-293)
   (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t 1.46e+57)
     (*
      t
      (/
       (sqrt 2.0)
       (sqrt
        (+
         (/ (* l l) x)
         (+
          (* 2.0 (+ (* t t) (/ (* t t) x)))
          (/ (fma (* 2.0 t) t (* l l)) x))))))
     (- 1.0 (/ 1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -5.7e-293) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1.46e+57) {
		tmp = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma((2.0 * t), t, (l * l)) / x)))));
	} else {
		tmp = 1.0 - (1.0 / x);
	}
	return tmp;
}
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -5.7e-293)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 1.46e+57)
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(Float64(2.0 * t), t, Float64(l * l)) / x))))));
	else
		tmp = Float64(1.0 - Float64(1.0 / x));
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := If[LessEqual[t, -5.7e-293], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.46e+57], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(2.0 * t), $MachinePrecision] * t + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.7 \cdot 10^{-293}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

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

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


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

    1. Initial program 29.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.7e-293 < t < 1.46e57

    1. Initial program 41.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.46e57 < t

    1. Initial program 31.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.7 \cdot 10^{-293}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.46 \cdot 10^{+57}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]

Alternative 5: 79.4% accurate, 0.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{-243}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-203}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-117}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-101}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}{t}}\\ \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 -1.8e-243)
   (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t 2.15e-203)
     (* t (/ (sqrt 2.0) (* l (* (sqrt 2.0) (sqrt (/ 1.0 x))))))
     (if (<= t 1.9e-117)
       1.0
       (if (<= t 2.2e-101)
         (/ (sqrt 2.0) (/ (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x))))) t))
         (- 1.0 (/ 1.0 x)))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.8e-243) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 2.15e-203) {
		tmp = t * (sqrt(2.0) / (l * (sqrt(2.0) * sqrt((1.0 / x)))));
	} else if (t <= 1.9e-117) {
		tmp = 1.0;
	} else if (t <= 2.2e-101) {
		tmp = sqrt(2.0) / ((l * sqrt(((2.0 / x) + (2.0 / (x * x))))) / t);
	} 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 <= (-1.8d-243)) then
        tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if (t <= 2.15d-203) then
        tmp = t * (sqrt(2.0d0) / (l * (sqrt(2.0d0) * sqrt((1.0d0 / x)))))
    else if (t <= 1.9d-117) then
        tmp = 1.0d0
    else if (t <= 2.2d-101) then
        tmp = sqrt(2.0d0) / ((l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x))))) / t)
    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 <= -1.8e-243) {
		tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 2.15e-203) {
		tmp = t * (Math.sqrt(2.0) / (l * (Math.sqrt(2.0) * Math.sqrt((1.0 / x)))));
	} else if (t <= 1.9e-117) {
		tmp = 1.0;
	} else if (t <= 2.2e-101) {
		tmp = Math.sqrt(2.0) / ((l * Math.sqrt(((2.0 / x) + (2.0 / (x * x))))) / t);
	} else {
		tmp = 1.0 - (1.0 / x);
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= -1.8e-243:
		tmp = -math.sqrt(((x + -1.0) / (x + 1.0)))
	elif t <= 2.15e-203:
		tmp = t * (math.sqrt(2.0) / (l * (math.sqrt(2.0) * math.sqrt((1.0 / x)))))
	elif t <= 1.9e-117:
		tmp = 1.0
	elif t <= 2.2e-101:
		tmp = math.sqrt(2.0) / ((l * math.sqrt(((2.0 / x) + (2.0 / (x * x))))) / t)
	else:
		tmp = 1.0 - (1.0 / x)
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= -1.8e-243)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 2.15e-203)
		tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * Float64(sqrt(2.0) * sqrt(Float64(1.0 / x))))));
	elseif (t <= 1.9e-117)
		tmp = 1.0;
	elseif (t <= 2.2e-101)
		tmp = Float64(sqrt(2.0) / Float64(Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))) / t));
	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 <= -1.8e-243)
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	elseif (t <= 2.15e-203)
		tmp = t * (sqrt(2.0) / (l * (sqrt(2.0) * sqrt((1.0 / x)))));
	elseif (t <= 1.9e-117)
		tmp = 1.0;
	elseif (t <= 2.2e-101)
		tmp = sqrt(2.0) / ((l * sqrt(((2.0 / x) + (2.0 / (x * x))))) / t);
	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, -1.8e-243], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 2.15e-203], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-117], 1.0, If[LessEqual[t, 2.2e-101], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{-243}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

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

\mathbf{elif}\;t \leq 1.9 \cdot 10^{-117}:\\
\;\;\;\;1\\

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

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


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

    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. Step-by-step derivation
      1. associate-*r/33.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8000000000000001e-243 < t < 2.15000000000000014e-203

    1. Initial program 2.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.15000000000000014e-203 < t < 1.89999999999999986e-117

    1. Initial program 38.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}}{t}} \]
    3. 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}}} \]
    4. Taylor expanded in x around inf 62.4%

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

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

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

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

    if 1.89999999999999986e-117 < t < 2.1999999999999999e-101

    1. Initial program 1.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} - \frac{\ell \cdot \left(-\ell\right) - \ell \cdot \ell}{x \cdot x}\right)}}}{t}} \]
    10. Taylor expanded in l around 0 58.2%

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

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

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

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

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

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

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

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

    if 2.1999999999999999e-101 < t

    1. Initial program 43.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{-243}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-203}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-117}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-101}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]

Alternative 6: 79.4% accurate, 1.0× speedup?

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

\mathbf{elif}\;t \leq 1.12 \cdot 10^{-204}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 6.5 \cdot 10^{-118}:\\
\;\;\;\;1\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-101}:\\
\;\;\;\;t_1\\

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


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

    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. Step-by-step derivation
      1. associate-*r/33.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7e-243 < t < 1.11999999999999997e-204 or 6.49999999999999958e-118 < t < 2.1999999999999999e-101

    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. Step-by-step derivation
      1. associate-/l*2.0%

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}}{t}} \]
    3. 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}}} \]
    4. Taylor expanded in t around 0 5.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} - \frac{\ell \cdot \left(-\ell\right) - \ell \cdot \ell}{x \cdot x}\right)}}}{t}} \]
    10. Taylor expanded in l around 0 50.6%

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{\color{blue}{2}}{x}}}{t}} \]
    12. Simplified50.6%

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

    if 1.11999999999999997e-204 < t < 6.49999999999999958e-118

    1. Initial program 38.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}}{t}} \]
    3. 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}}} \]
    4. Taylor expanded in x around inf 62.4%

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

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

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

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

    if 2.1999999999999999e-101 < t

    1. Initial program 43.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{-243}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-204}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}{t}}\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-118}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-101}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]

Alternative 7: 75.9% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 10^{-293}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-116}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 1.26 \cdot 10^{-99}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\ \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-293)
   (- (sqrt (/ (+ x -1.0) (+ x 1.0))))
   (if (<= t 1.5e-116)
     1.0
     (if (<= t 1.26e-99)
       (* t (/ (sqrt 2.0) (sqrt (* 2.0 (* l (/ l x))))))
       (- 1.0 (/ 1.0 x))))))
l = abs(l);
double code(double x, double l, double t) {
	double tmp;
	if (t <= 1e-293) {
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1.5e-116) {
		tmp = 1.0;
	} else if (t <= 1.26e-99) {
		tmp = t * (sqrt(2.0) / sqrt((2.0 * (l * (l / 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-293) then
        tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    else if (t <= 1.5d-116) then
        tmp = 1.0d0
    else if (t <= 1.26d-99) then
        tmp = t * (sqrt(2.0d0) / sqrt((2.0d0 * (l * (l / 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-293) {
		tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
	} else if (t <= 1.5e-116) {
		tmp = 1.0;
	} else if (t <= 1.26e-99) {
		tmp = t * (Math.sqrt(2.0) / Math.sqrt((2.0 * (l * (l / x)))));
	} else {
		tmp = 1.0 - (1.0 / x);
	}
	return tmp;
}
l = abs(l)
def code(x, l, t):
	tmp = 0
	if t <= 1e-293:
		tmp = -math.sqrt(((x + -1.0) / (x + 1.0)))
	elif t <= 1.5e-116:
		tmp = 1.0
	elif t <= 1.26e-99:
		tmp = t * (math.sqrt(2.0) / math.sqrt((2.0 * (l * (l / x)))))
	else:
		tmp = 1.0 - (1.0 / x)
	return tmp
l = abs(l)
function code(x, l, t)
	tmp = 0.0
	if (t <= 1e-293)
		tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))));
	elseif (t <= 1.5e-116)
		tmp = 1.0;
	elseif (t <= 1.26e-99)
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(2.0 * Float64(l * Float64(l / 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-293)
		tmp = -sqrt(((x + -1.0) / (x + 1.0)));
	elseif (t <= 1.5e-116)
		tmp = 1.0;
	elseif (t <= 1.26e-99)
		tmp = t * (sqrt(2.0) / sqrt((2.0 * (l * (l / 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-293], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.5e-116], 1.0, If[LessEqual[t, 1.26e-99], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 * N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 10^{-293}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\

\mathbf{elif}\;t \leq 1.5 \cdot 10^{-116}:\\
\;\;\;\;1\\

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

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


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

    1. Initial program 28.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0000000000000001e-293 < t < 1.50000000000000013e-116

    1. Initial program 26.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.50000000000000013e-116 < t < 1.2599999999999999e-99

    1. Initial program 1.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2599999999999999e-99 < t

    1. Initial program 43.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 10^{-293}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-116}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 1.26 \cdot 10^{-99}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]

Alternative 8: 76.3% accurate, 2.0× speedup?

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

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


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

    1. Initial program 28.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0000000000000001e-293 < t

    1. Initial program 37.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 75.6% accurate, 31.9× speedup?

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

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


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

    1. Initial program 28.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \color{blue}{{t}^{2}}}} \]
    8. Step-by-step derivation
      1. unpow234.0%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \color{blue}{\left(t \cdot t\right)}}} \]
    9. Simplified34.0%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \color{blue}{\left(t \cdot t\right)}}} \]
    10. Taylor expanded in t around -inf 80.2%

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

    if 1.0000000000000001e-293 < t

    1. Initial program 37.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 75.3% accurate, 73.5× speedup?

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

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


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

    1. Initial program 28.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \color{blue}{{t}^{2}}}} \]
    8. Step-by-step derivation
      1. unpow234.0%

        \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \color{blue}{\left(t \cdot t\right)}}} \]
    9. Simplified34.0%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \color{blue}{\left(t \cdot t\right)}}} \]
    10. Taylor expanded in t around -inf 80.2%

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

    if 1.0000000000000001e-293 < t

    1. Initial program 37.4%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{x + 1}{x + -1} \cdot \color{blue}{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)} - \ell \cdot \ell}}{t}} \]
    3. Simplified37.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}}} \]
    4. Taylor expanded in x around inf 50.2%

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

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

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

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

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

Alternative 11: 39.0% 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.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \color{blue}{{t}^{2}}}} \]
  8. Step-by-step derivation
    1. unpow240.8%

      \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \color{blue}{\left(t \cdot t\right)}}} \]
  9. Simplified40.8%

    \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \color{blue}{\left(t \cdot t\right)}}} \]
  10. Taylor expanded in t around -inf 36.0%

    \[\leadsto \color{blue}{-1} \]
  11. Final simplification36.0%

    \[\leadsto -1 \]

Reproduce

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