Toniolo and Linder, Equation (7)

Percentage Accurate: 33.5% → 82.6%
Time: 24.8s
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.5% 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: 82.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -4.6 \cdot 10^{-74}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 2.45 \cdot 10^{-5}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(t \cdot 2, t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -4.6e-74)
     (- t_1)
     (if (<= t 2.45e-5)
       (*
        t
        (/
         (sqrt 2.0)
         (sqrt
          (+
           (/ (* l l) x)
           (+
            (* 2.0 (+ (* t t) (/ (* t t) x)))
            (/ (fma (* t 2.0) t (* l l)) x))))))
       t_1))))
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -4.6e-74) {
		tmp = -t_1;
	} else if (t <= 2.45e-5) {
		tmp = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma((t * 2.0), t, (l * l)) / x)))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -4.6e-74)
		tmp = Float64(-t_1);
	elseif (t <= 2.45e-5)
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(Float64(t * 2.0), t, Float64(l * l)) / x))))));
	else
		tmp = t_1;
	end
	return tmp
end
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, -4.6e-74], (-t$95$1), If[LessEqual[t, 2.45e-5], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * 2.0), $MachinePrecision] * t + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -4.6 \cdot 10^{-74}:\\
\;\;\;\;-t_1\\

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

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


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

    1. Initial program 37.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.59999999999999961e-74 < t < 2.45e-5

    1. Initial program 20.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.45e-5 < t

    1. Initial program 37.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 80.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -1.5 \cdot 10^{-103}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{-183}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\frac{\mathsf{hypot}\left(\ell, \ell\right)}{\sqrt{x}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -1.5e-103)
     (- t_1)
     (if (<= t 6.6e-183) (/ (sqrt 2.0) (/ (/ (hypot l l) (sqrt x)) t)) t_1))))
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -1.5e-103) {
		tmp = -t_1;
	} else if (t <= 6.6e-183) {
		tmp = sqrt(2.0) / ((hypot(l, l) / sqrt(x)) / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
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.5e-103) {
		tmp = -t_1;
	} else if (t <= 6.6e-183) {
		tmp = Math.sqrt(2.0) / ((Math.hypot(l, l) / Math.sqrt(x)) / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -1.5e-103:
		tmp = -t_1
	elif t <= 6.6e-183:
		tmp = math.sqrt(2.0) / ((math.hypot(l, l) / math.sqrt(x)) / t)
	else:
		tmp = t_1
	return tmp
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -1.5e-103)
		tmp = Float64(-t_1);
	elseif (t <= 6.6e-183)
		tmp = Float64(sqrt(2.0) / Float64(Float64(hypot(l, l) / sqrt(x)) / t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -1.5e-103)
		tmp = -t_1;
	elseif (t <= 6.6e-183)
		tmp = sqrt(2.0) / ((hypot(l, l) / sqrt(x)) / t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
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.5e-103], (-t$95$1), If[LessEqual[t, 6.6e-183], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[Sqrt[l ^ 2 + l ^ 2], $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{-103}:\\
\;\;\;\;-t_1\\

\mathbf{elif}\;t \leq 6.6 \cdot 10^{-183}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\frac{\mathsf{hypot}\left(\ell, \ell\right)}{\sqrt{x}}}{t}}\\

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


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

    1. Initial program 38.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5e-103 < t < 6.5999999999999999e-183

    1. Initial program 11.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{\color{blue}{\ell \cdot \ell} - -1 \cdot {\ell}^{2}}{x}}}{t}} \]
      2. neg-mul-149.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{\frac{\color{blue}{\frac{\sqrt{\mathsf{fma}\left(\ell, \ell, \ell \cdot \ell\right)}}{\sqrt{x}}}}{t}} \]
    12. Step-by-step derivation
      1. fma-udef53.7%

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\frac{\color{blue}{\mathsf{hypot}\left(\ell, \ell\right)}}{\sqrt{x}}}{t}} \]
    13. Simplified57.3%

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

    if 6.5999999999999999e-183 < t

    1. Initial program 37.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{-103}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{-183}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\frac{\mathsf{hypot}\left(\ell, \ell\right)}{\sqrt{x}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 3: 78.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -2.95 \cdot 10^{-226}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{-268}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell + \ell \cdot \ell}{x}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -2.95e-226)
     (- t_1)
     (if (<= t 1.85e-268)
       (/ (sqrt 2.0) (/ (sqrt (/ (+ (* l l) (* l l)) x)) t))
       t_1))))
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -2.95e-226) {
		tmp = -t_1;
	} else if (t <= 1.85e-268) {
		tmp = sqrt(2.0) / (sqrt((((l * l) + (l * l)) / x)) / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
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 <= (-2.95d-226)) then
        tmp = -t_1
    else if (t <= 1.85d-268) then
        tmp = sqrt(2.0d0) / (sqrt((((l * l) + (l * l)) / x)) / t)
    else
        tmp = t_1
    end if
    code = tmp
end function
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 <= -2.95e-226) {
		tmp = -t_1;
	} else if (t <= 1.85e-268) {
		tmp = Math.sqrt(2.0) / (Math.sqrt((((l * l) + (l * l)) / x)) / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -2.95e-226:
		tmp = -t_1
	elif t <= 1.85e-268:
		tmp = math.sqrt(2.0) / (math.sqrt((((l * l) + (l * l)) / x)) / t)
	else:
		tmp = t_1
	return tmp
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -2.95e-226)
		tmp = Float64(-t_1);
	elseif (t <= 1.85e-268)
		tmp = Float64(sqrt(2.0) / Float64(sqrt(Float64(Float64(Float64(l * l) + Float64(l * l)) / x)) / t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -2.95e-226)
		tmp = -t_1;
	elseif (t <= 1.85e-268)
		tmp = sqrt(2.0) / (sqrt((((l * l) + (l * l)) / x)) / t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
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, -2.95e-226], (-t$95$1), If[LessEqual[t, 1.85e-268], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -2.95 \cdot 10^{-226}:\\
\;\;\;\;-t_1\\

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

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


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

    1. Initial program 34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.95e-226 < t < 1.85000000000000009e-268

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{\color{blue}{\ell \cdot \ell} - -1 \cdot {\ell}^{2}}{x}}}{t}} \]
      2. neg-mul-173.3%

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

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

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

    if 1.85000000000000009e-268 < t

    1. Initial program 32.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.95 \cdot 10^{-226}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{-268}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell + \ell \cdot \ell}{x}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 4: 78.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -4.5 \cdot 10^{-226}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-268}:\\ \;\;\;\;t \cdot \sqrt{x \cdot \frac{2}{\mathsf{fma}\left(\ell, \ell, \ell \cdot \ell\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -4.5e-226)
     (- t_1)
     (if (<= t 2.3e-268) (* t (sqrt (* x (/ 2.0 (fma l l (* l l)))))) t_1))))
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -4.5e-226) {
		tmp = -t_1;
	} else if (t <= 2.3e-268) {
		tmp = t * sqrt((x * (2.0 / fma(l, l, (l * l)))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -4.5e-226)
		tmp = Float64(-t_1);
	elseif (t <= 2.3e-268)
		tmp = Float64(t * sqrt(Float64(x * Float64(2.0 / fma(l, l, Float64(l * l))))));
	else
		tmp = t_1;
	end
	return tmp
end
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, -4.5e-226], (-t$95$1), If[LessEqual[t, 2.3e-268], N[(t * N[Sqrt[N[(x * N[(2.0 / N[(l * l + N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{-226}:\\
\;\;\;\;-t_1\\

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

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


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

    1. Initial program 34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.50000000000000011e-226 < t < 2.3000000000000001e-268

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{\color{blue}{\ell \cdot \ell} - -1 \cdot {\ell}^{2}}{x}}}{t}} \]
      2. neg-mul-173.3%

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

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

      \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\color{blue}{\frac{\ell \cdot \ell - \left(-\ell \cdot \ell\right)}{x}}}}{t}} \]
    10. Step-by-step derivation
      1. expm1-log1p-u73.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell - \left(-\ell \cdot \ell\right)}{x}}}{t}}\right)\right)} \]
      2. expm1-udef39.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell - \left(-\ell \cdot \ell\right)}{x}}}{t}}\right)} - 1} \]
    11. Applied egg-rr38.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{2}{\frac{\mathsf{fma}\left(\ell, \ell, \ell \cdot \ell\right)}{x}}} \cdot t\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def69.4%

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

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

        \[\leadsto \color{blue}{t \cdot \sqrt{\frac{2}{\frac{\mathsf{fma}\left(\ell, \ell, \ell \cdot \ell\right)}{x}}}} \]
      4. associate-/r/69.6%

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

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

    if 2.3000000000000001e-268 < t

    1. Initial program 32.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 78.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -5 \cdot 10^{-227}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-270}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{2 \cdot \frac{\ell}{\frac{x}{\ell}}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -5e-227)
     (- t_1)
     (if (<= t 4.4e-270)
       (/ (sqrt 2.0) (/ (sqrt (* 2.0 (/ l (/ x l)))) t))
       t_1))))
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -5e-227) {
		tmp = -t_1;
	} else if (t <= 4.4e-270) {
		tmp = sqrt(2.0) / (sqrt((2.0 * (l / (x / l)))) / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
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 <= (-5d-227)) then
        tmp = -t_1
    else if (t <= 4.4d-270) then
        tmp = sqrt(2.0d0) / (sqrt((2.0d0 * (l / (x / l)))) / t)
    else
        tmp = t_1
    end if
    code = tmp
end function
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 <= -5e-227) {
		tmp = -t_1;
	} else if (t <= 4.4e-270) {
		tmp = Math.sqrt(2.0) / (Math.sqrt((2.0 * (l / (x / l)))) / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -5e-227:
		tmp = -t_1
	elif t <= 4.4e-270:
		tmp = math.sqrt(2.0) / (math.sqrt((2.0 * (l / (x / l)))) / t)
	else:
		tmp = t_1
	return tmp
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -5e-227)
		tmp = Float64(-t_1);
	elseif (t <= 4.4e-270)
		tmp = Float64(sqrt(2.0) / Float64(sqrt(Float64(2.0 * Float64(l / Float64(x / l)))) / t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -5e-227)
		tmp = -t_1;
	elseif (t <= 4.4e-270)
		tmp = sqrt(2.0) / (sqrt((2.0 * (l / (x / l)))) / t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
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, -5e-227], (-t$95$1), If[LessEqual[t, 4.4e-270], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(2.0 * N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-227}:\\
\;\;\;\;-t_1\\

\mathbf{elif}\;t \leq 4.4 \cdot 10^{-270}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{2 \cdot \frac{\ell}{\frac{x}{\ell}}}}{t}}\\

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


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

    1. Initial program 34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999961e-227 < t < 4.3999999999999997e-270

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{\color{blue}{\ell \cdot \ell} - -1 \cdot {\ell}^{2}}{x}}}{t}} \]
      2. neg-mul-173.3%

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

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

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

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

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

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

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

    if 4.3999999999999997e-270 < t

    1. Initial program 32.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-227}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-270}:\\ \;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{2 \cdot \frac{\ell}{\frac{x}{\ell}}}}{t}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 6: 77.5% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-226}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-270}:\\ \;\;\;\;\sqrt{x} \cdot \frac{-t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.45e-226)
   -1.0
   (if (<= t 6.8e-270)
     (* (sqrt x) (/ (- t) l))
     (sqrt (/ (+ x -1.0) (+ x 1.0))))))
double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.45e-226) {
		tmp = -1.0;
	} else if (t <= 6.8e-270) {
		tmp = sqrt(x) * (-t / l);
	} else {
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
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.45d-226)) then
        tmp = -1.0d0
    else if (t <= 6.8d-270) then
        tmp = sqrt(x) * (-t / l)
    else
        tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	double tmp;
	if (t <= -1.45e-226) {
		tmp = -1.0;
	} else if (t <= 6.8e-270) {
		tmp = Math.sqrt(x) * (-t / l);
	} else {
		tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
	}
	return tmp;
}
def code(x, l, t):
	tmp = 0
	if t <= -1.45e-226:
		tmp = -1.0
	elif t <= 6.8e-270:
		tmp = math.sqrt(x) * (-t / l)
	else:
		tmp = math.sqrt(((x + -1.0) / (x + 1.0)))
	return tmp
function code(x, l, t)
	tmp = 0.0
	if (t <= -1.45e-226)
		tmp = -1.0;
	elseif (t <= 6.8e-270)
		tmp = Float64(sqrt(x) * Float64(Float64(-t) / l));
	else
		tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)));
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	tmp = 0.0;
	if (t <= -1.45e-226)
		tmp = -1.0;
	elseif (t <= 6.8e-270)
		tmp = sqrt(x) * (-t / l);
	else
		tmp = sqrt(((x + -1.0) / (x + 1.0)));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := If[LessEqual[t, -1.45e-226], -1.0, If[LessEqual[t, 6.8e-270], N[(N[Sqrt[x], $MachinePrecision] * N[((-t) / l), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{-226}:\\
\;\;\;\;-1\\

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

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


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

    1. Initial program 34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45000000000000001e-226 < t < 6.8000000000000001e-270

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{\color{blue}{\ell \cdot \ell} - -1 \cdot {\ell}^{2}}{x}}}{t}} \]
      2. neg-mul-173.3%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{t}{\ell} \cdot \sqrt{x}\right)} \]
    11. Step-by-step derivation
      1. mul-1-neg63.6%

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

        \[\leadsto -\color{blue}{\sqrt{x} \cdot \frac{t}{\ell}} \]
      3. distribute-rgt-neg-in63.6%

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

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

    if 6.8000000000000001e-270 < t

    1. Initial program 32.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-226}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-270}:\\ \;\;\;\;\sqrt{x} \cdot \frac{-t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 7: 78.1% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{if}\;t \leq -4.1 \cdot 10^{-227}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-268}:\\ \;\;\;\;\sqrt{x} \cdot \frac{-t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
   (if (<= t -4.1e-227)
     (- t_1)
     (if (<= t 2.25e-268) (* (sqrt x) (/ (- t) l)) t_1))))
double code(double x, double l, double t) {
	double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	double tmp;
	if (t <= -4.1e-227) {
		tmp = -t_1;
	} else if (t <= 2.25e-268) {
		tmp = sqrt(x) * (-t / l);
	} else {
		tmp = t_1;
	}
	return tmp;
}
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 <= (-4.1d-227)) then
        tmp = -t_1
    else if (t <= 2.25d-268) then
        tmp = sqrt(x) * (-t / l)
    else
        tmp = t_1
    end if
    code = tmp
end function
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 <= -4.1e-227) {
		tmp = -t_1;
	} else if (t <= 2.25e-268) {
		tmp = Math.sqrt(x) * (-t / l);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, l, t):
	t_1 = math.sqrt(((x + -1.0) / (x + 1.0)))
	tmp = 0
	if t <= -4.1e-227:
		tmp = -t_1
	elif t <= 2.25e-268:
		tmp = math.sqrt(x) * (-t / l)
	else:
		tmp = t_1
	return tmp
function code(x, l, t)
	t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))
	tmp = 0.0
	if (t <= -4.1e-227)
		tmp = Float64(-t_1);
	elseif (t <= 2.25e-268)
		tmp = Float64(sqrt(x) * Float64(Float64(-t) / l));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, l, t)
	t_1 = sqrt(((x + -1.0) / (x + 1.0)));
	tmp = 0.0;
	if (t <= -4.1e-227)
		tmp = -t_1;
	elseif (t <= 2.25e-268)
		tmp = sqrt(x) * (-t / l);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
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, -4.1e-227], (-t$95$1), If[LessEqual[t, 2.25e-268], N[(N[Sqrt[x], $MachinePrecision] * N[((-t) / l), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -4.1 \cdot 10^{-227}:\\
\;\;\;\;-t_1\\

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

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


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

    1. Initial program 34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.10000000000000009e-227 < t < 2.2500000000000001e-268

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{\color{blue}{\ell \cdot \ell} - -1 \cdot {\ell}^{2}}{x}}}{t}} \]
      2. neg-mul-173.3%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{t}{\ell} \cdot \sqrt{x}\right)} \]
    11. Step-by-step derivation
      1. mul-1-neg63.6%

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

        \[\leadsto -\color{blue}{\sqrt{x} \cdot \frac{t}{\ell}} \]
      3. distribute-rgt-neg-in63.6%

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

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

    if 2.2500000000000001e-268 < t

    1. Initial program 32.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.1 \cdot 10^{-227}:\\ \;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-268}:\\ \;\;\;\;\sqrt{x} \cdot \frac{-t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]

Alternative 8: 76.9% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-227}:\\
\;\;\;\;-1\\

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

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


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

    1. Initial program 34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7e-227 < t < 8.79999999999999936e-269

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{\frac{\sqrt{\frac{\color{blue}{\ell \cdot \ell} - -1 \cdot {\ell}^{2}}{x}}}{t}} \]
      2. neg-mul-173.3%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{t}{\ell} \cdot \sqrt{x}\right)} \]
    11. Step-by-step derivation
      1. mul-1-neg63.6%

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

        \[\leadsto -\color{blue}{\sqrt{x} \cdot \frac{t}{\ell}} \]
      3. distribute-rgt-neg-in63.6%

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

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

    if 8.79999999999999936e-269 < t

    1. Initial program 32.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\color{blue}{\sqrt{2 \cdot {\ell}^{2} + 2 \cdot {t}^{2}}}} \]
    7. Step-by-step derivation
      1. distribute-lft-out33.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{-227}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{-269}:\\ \;\;\;\;\sqrt{x} \cdot \frac{-t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 9: 76.0% accurate, 73.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.02 \cdot 10^{-302}:\\
\;\;\;\;-1\\

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


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

    1. Initial program 32.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\color{blue}{\sqrt{2 \cdot {\ell}^{2} + 2 \cdot {t}^{2}}}} \]
    7. Step-by-step derivation
      1. distribute-lft-out35.5%

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

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

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

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

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

    if -1.02e-302 < t

    1. Initial program 31.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\color{blue}{\sqrt{2 \cdot {\ell}^{2} + 2 \cdot {t}^{2}}}} \]
    7. Step-by-step derivation
      1. distribute-lft-out34.0%

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

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

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

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

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

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

Alternative 10: 38.4% accurate, 225.0× speedup?

\[\begin{array}{l} \\ -1 \end{array} \]
(FPCore (x l t) :precision binary64 -1.0)
double code(double x, double l, double t) {
	return -1.0;
}
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
public static double code(double x, double l, double t) {
	return -1.0;
}
def code(x, l, t):
	return -1.0
function code(x, l, t)
	return -1.0
end
function tmp = code(x, l, t)
	tmp = -1.0;
end
code[x_, l_, t_] := -1.0
\begin{array}{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. Step-by-step derivation
    1. associate-*r/31.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \sqrt{2} \cdot \frac{t}{\color{blue}{\sqrt{2 \cdot {\ell}^{2} + 2 \cdot {t}^{2}}}} \]
  7. Step-by-step derivation
    1. distribute-lft-out34.8%

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

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

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

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

    \[\leadsto \color{blue}{-1} \]
  10. Final simplification42.6%

    \[\leadsto -1 \]

Reproduce

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