Toniolo and Linder, Equation (7)

Percentage Accurate: 33.0% → 81.2%
Time: 16.7s
Alternatives: 10
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 10 alternatives:

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

Initial Program: 33.0% accurate, 1.0× speedup?

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

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

Alternative 1: 81.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t \leq 5 \cdot 10^{-160}:\\
\;\;\;\;1\\

\mathbf{elif}\;t \leq 6.4 \cdot 10^{+18}:\\
\;\;\;\;\frac{t}{\frac{\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(t_2 + \frac{{\ell}^{2}}{x}\right)\right) + \frac{t_2 + {\ell}^{2}}{x}}}{\sqrt{2}}}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


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

    1. Initial program 39.7%

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

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

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

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in86.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.19999999999999991e-161 < t < 1.05000000000000004e-304

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.05000000000000004e-304 < t < 4.99999999999999994e-160

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \left(t \cdot \sqrt{\frac{1 + x}{x - 1}}\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg1.8%

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in1.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt70.1%

        \[\leadsto -\color{blue}{-1} \]
    11. Simplified70.1%

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

    if 4.99999999999999994e-160 < t < 6.4e18

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

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

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

    if 6.4e18 < t

    1. Initial program 35.3%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    4. Step-by-step derivation
      1. +-commutative92.9%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Taylor expanded in t around 0 92.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{-161}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-304}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \frac{1}{{x}^{2}}\right)} \cdot \frac{\ell}{\sqrt{2}}}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-160}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{+18}:\\ \;\;\;\;\frac{t}{\frac{\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(2 \cdot {t}^{2} + \frac{{\ell}^{2}}{x}\right)\right) + \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}}{\sqrt{2}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 2: 78.9% accurate, 0.7× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


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

    1. Initial program 39.7%

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

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

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

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in86.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.64999999999999994e-153 < t < 1.05000000000000004e-304

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.05000000000000004e-304 < t

    1. Initial program 31.0%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    4. Step-by-step derivation
      1. +-commutative79.5%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Taylor expanded in t around 0 79.5%

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

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

Alternative 3: 77.8% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 39.7%

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

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

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

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in86.2%

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

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

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

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

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

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

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

    if -1.69999999999999991e-161 < t < 1.2600000000000001e-306

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t}}{\sqrt{\frac{1}{-1 + x} + \frac{1}{x}} \cdot \frac{\ell}{\sqrt{2}}} \]
      5. add-sqr-sqrt57.0%

        \[\leadsto \frac{t}{\sqrt{\color{blue}{\sqrt{\frac{1}{-1 + x}} \cdot \sqrt{\frac{1}{-1 + x}}} + \frac{1}{x}} \cdot \frac{\ell}{\sqrt{2}}} \]
      6. add-sqr-sqrt57.0%

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

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

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

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

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

        \[\leadsto \frac{t}{\mathsf{hypot}\left({\left(x + -1\right)}^{\color{blue}{-0.5}}, \sqrt{\frac{1}{x}}\right) \cdot \frac{\ell}{\sqrt{2}}} \]
      12. inv-pow57.1%

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

        \[\leadsto \frac{t}{\mathsf{hypot}\left({\left(x + -1\right)}^{-0.5}, \color{blue}{{x}^{\left(\frac{-1}{2}\right)}}\right) \cdot \frac{\ell}{\sqrt{2}}} \]
      14. metadata-eval57.1%

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

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

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

    if 1.2600000000000001e-306 < t

    1. Initial program 31.0%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    4. Step-by-step derivation
      1. +-commutative79.5%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Taylor expanded in t around 0 79.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{-161}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 1.26 \cdot 10^{-306}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 4: 78.5% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 39.7%

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

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

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

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in86.2%

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

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

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

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

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

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

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

    if -3.55000000000000002e-158 < t < 1.2600000000000001e-306

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t}}{\sqrt{\frac{1}{-1 + x} + \frac{1}{x}} \cdot \frac{\ell}{\sqrt{2}}} \]
      5. add-sqr-sqrt57.0%

        \[\leadsto \frac{t}{\sqrt{\color{blue}{\sqrt{\frac{1}{-1 + x}} \cdot \sqrt{\frac{1}{-1 + x}}} + \frac{1}{x}} \cdot \frac{\ell}{\sqrt{2}}} \]
      6. add-sqr-sqrt57.0%

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

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

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

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

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

        \[\leadsto \frac{t}{\mathsf{hypot}\left({\left(x + -1\right)}^{\color{blue}{-0.5}}, \sqrt{\frac{1}{x}}\right) \cdot \frac{\ell}{\sqrt{2}}} \]
      12. inv-pow57.1%

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

        \[\leadsto \frac{t}{\mathsf{hypot}\left({\left(x + -1\right)}^{-0.5}, \color{blue}{{x}^{\left(\frac{-1}{2}\right)}}\right) \cdot \frac{\ell}{\sqrt{2}}} \]
      14. metadata-eval57.1%

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

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

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

    if 1.2600000000000001e-306 < t

    1. Initial program 31.0%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    4. Step-by-step derivation
      1. +-commutative79.5%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Taylor expanded in t around 0 79.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.55 \cdot 10^{-158}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq 1.26 \cdot 10^{-306}:\\ \;\;\;\;\frac{t}{\ell \cdot \sqrt{\frac{1}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 5: 78.9% accurate, 2.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


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

    1. Initial program 39.7%

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

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

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

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in86.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.00000000000000053e-152 < t < 1.05000000000000004e-304

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t}}{\sqrt{\frac{1}{-1 + x} + \frac{1}{x}} \cdot \frac{\ell}{\sqrt{2}}} \]
      5. add-sqr-sqrt57.0%

        \[\leadsto \frac{t}{\sqrt{\color{blue}{\sqrt{\frac{1}{-1 + x}} \cdot \sqrt{\frac{1}{-1 + x}}} + \frac{1}{x}} \cdot \frac{\ell}{\sqrt{2}}} \]
      6. add-sqr-sqrt57.0%

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

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

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

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

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

        \[\leadsto \frac{t}{\mathsf{hypot}\left({\left(x + -1\right)}^{\color{blue}{-0.5}}, \sqrt{\frac{1}{x}}\right) \cdot \frac{\ell}{\sqrt{2}}} \]
      12. inv-pow57.1%

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

        \[\leadsto \frac{t}{\mathsf{hypot}\left({\left(x + -1\right)}^{-0.5}, \color{blue}{{x}^{\left(\frac{-1}{2}\right)}}\right) \cdot \frac{\ell}{\sqrt{2}}} \]
      14. metadata-eval57.1%

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

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

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

    if 1.05000000000000004e-304 < t

    1. Initial program 31.0%

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    4. Step-by-step derivation
      1. +-commutative79.5%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{t \cdot \sqrt{\frac{x + 1}{-1 + x}}}} \]
    6. Taylor expanded in t around 0 79.5%

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

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

Alternative 6: 77.6% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 39.7%

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

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

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

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in86.2%

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

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

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

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

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

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

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

    if -4.30000000000000014e-160 < t < 7.99999999999999997e-305

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t}}{\sqrt{\frac{1}{-1 + x} + \frac{1}{x}} \cdot \frac{\ell}{\sqrt{2}}} \]
      5. add-sqr-sqrt57.0%

        \[\leadsto \frac{t}{\sqrt{\color{blue}{\sqrt{\frac{1}{-1 + x}} \cdot \sqrt{\frac{1}{-1 + x}}} + \frac{1}{x}} \cdot \frac{\ell}{\sqrt{2}}} \]
      6. add-sqr-sqrt57.0%

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

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

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

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

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

        \[\leadsto \frac{t}{\mathsf{hypot}\left({\left(x + -1\right)}^{\color{blue}{-0.5}}, \sqrt{\frac{1}{x}}\right) \cdot \frac{\ell}{\sqrt{2}}} \]
      12. inv-pow57.1%

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

        \[\leadsto \frac{t}{\mathsf{hypot}\left({\left(x + -1\right)}^{-0.5}, \color{blue}{{x}^{\left(\frac{-1}{2}\right)}}\right) \cdot \frac{\ell}{\sqrt{2}}} \]
      14. metadata-eval57.1%

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

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

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

    if 7.99999999999999997e-305 < t

    1. Initial program 31.0%

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \left(t \cdot \sqrt{\frac{1 + x}{x - 1}}\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg1.7%

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in1.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\left(\color{blue}{\sqrt{-1} \cdot \sqrt{-1}} + \frac{1}{x}\right) \]
      3. rem-square-sqrt78.9%

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

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

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

Alternative 7: 76.5% accurate, 31.9× speedup?

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

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


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

    1. Initial program 32.8%

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \left(t \cdot \sqrt{\frac{1 + x}{x - 1}}\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg75.5%

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in75.5%

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 31.0%

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \left(t \cdot \sqrt{\frac{1 + x}{x - 1}}\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg1.7%

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in1.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt78.3%

        \[\leadsto -\color{blue}{-1} \]
    11. Simplified78.3%

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

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

Alternative 8: 76.8% accurate, 31.9× speedup?

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

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


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

    1. Initial program 32.8%

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \left(t \cdot \sqrt{\frac{1 + x}{x - 1}}\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg75.5%

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in75.5%

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 31.0%

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \left(t \cdot \sqrt{\frac{1 + x}{x - 1}}\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg1.7%

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in1.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\left(\color{blue}{\sqrt{-1} \cdot \sqrt{-1}} + \frac{1}{x}\right) \]
      3. rem-square-sqrt78.9%

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

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

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

Alternative 9: 76.2% accurate, 73.5× speedup?

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

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


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

    1. Initial program 32.8%

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \left(t \cdot \sqrt{\frac{1 + x}{x - 1}}\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg75.5%

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in75.5%

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < t

    1. Initial program 31.0%

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \left(t \cdot \sqrt{\frac{1 + x}{x - 1}}\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg1.7%

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

        \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
      3. distribute-rgt-neg-in1.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]
      2. rem-square-sqrt78.3%

        \[\leadsto -\color{blue}{-1} \]
    11. Simplified78.3%

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

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

Alternative 10: 38.4% 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 31.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. Simplified31.9%

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

    \[\leadsto \frac{t}{\color{blue}{-1 \cdot \left(t \cdot \sqrt{\frac{1 + x}{x - 1}}\right)}} \]
  4. Step-by-step derivation
    1. mul-1-neg40.9%

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

      \[\leadsto \frac{t}{-\color{blue}{\sqrt{\frac{1 + x}{x - 1}} \cdot t}} \]
    3. distribute-rgt-neg-in40.9%

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

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

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

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

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

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

    \[\leadsto \color{blue}{-1} \]
  7. Final simplification39.7%

    \[\leadsto -1 \]

Reproduce

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