Toniolo and Linder, Equation (7)

Percentage Accurate: 32.8% → 85.2%
Time: 6.0s
Alternatives: 8
Speedup: 3.3×

Specification

?
\[\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}} \]
(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)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, l, t)
use fmin_fmax_functions
    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]
\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}}

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 8 alternatives:

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

Initial Program: 32.8% accurate, 1.0× speedup?

\[\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}} \]
(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)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, l, t)
use fmin_fmax_functions
    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]
\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}}

Alternative 1: 85.2% accurate, 0.1× speedup?

\[\begin{array}{l} t_1 := {\left(\left|t\right|\right)}^{2}\\ t_2 := {\left(\left|\ell\right|\right)}^{2}\\ t_3 := \mathsf{fma}\left(2, t\_1, t\_2\right)\\ t_4 := -1 \cdot t\_3\\ t_5 := \sqrt{2} \cdot \left|t\right|\\ \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 7.5 \cdot 10^{-181}:\\ \;\;\;\;\frac{t\_5}{\left|\ell\right| \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}}\\ \mathbf{elif}\;\left|t\right| \leq 5.2 \cdot 10^{-159}:\\ \;\;\;\;\frac{1.4142135623730951}{\sqrt{2}}\\ \mathbf{elif}\;\left|t\right| \leq 2.3 \cdot 10^{+64}:\\ \;\;\;\;\frac{t\_5}{\sqrt{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, t\_3 - t\_4, -1 \cdot \frac{\mathsf{fma}\left(-1, t\_4 - t\_3, \mathsf{fma}\left(2, \frac{t\_1}{x}, \frac{t\_2}{x}\right)\right) - -1 \cdot \frac{t\_3}{x}}{x}\right)}{x}, 2 \cdot t\_1\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}}\\ \end{array} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (pow (fabs t) 2.0))
        (t_2 (pow (fabs l) 2.0))
        (t_3 (fma 2.0 t_1 t_2))
        (t_4 (* -1.0 t_3))
        (t_5 (* (sqrt 2.0) (fabs t))))
   (*
    (copysign 1.0 t)
    (if (<= (fabs t) 7.5e-181)
      (/ t_5 (* (fabs l) (sqrt (/ (+ 2.0 (* 2.0 (/ 1.0 x))) x))))
      (if (<= (fabs t) 5.2e-159)
        (/ 1.4142135623730951 (sqrt 2.0))
        (if (<= (fabs t) 2.3e+64)
          (/
           t_5
           (sqrt
            (fma
             -1.0
             (/
              (fma
               -1.0
               (- t_3 t_4)
               (*
                -1.0
                (/
                 (-
                  (fma -1.0 (- t_4 t_3) (fma 2.0 (/ t_1 x) (/ t_2 x)))
                  (* -1.0 (/ t_3 x)))
                 x)))
              x)
             (* 2.0 t_1))))
          (sqrt (/ -1.0 (/ (- -1.0 x) (- x 1.0))))))))))
double code(double x, double l, double t) {
	double t_1 = pow(fabs(t), 2.0);
	double t_2 = pow(fabs(l), 2.0);
	double t_3 = fma(2.0, t_1, t_2);
	double t_4 = -1.0 * t_3;
	double t_5 = sqrt(2.0) * fabs(t);
	double tmp;
	if (fabs(t) <= 7.5e-181) {
		tmp = t_5 / (fabs(l) * sqrt(((2.0 + (2.0 * (1.0 / x))) / x)));
	} else if (fabs(t) <= 5.2e-159) {
		tmp = 1.4142135623730951 / sqrt(2.0);
	} else if (fabs(t) <= 2.3e+64) {
		tmp = t_5 / sqrt(fma(-1.0, (fma(-1.0, (t_3 - t_4), (-1.0 * ((fma(-1.0, (t_4 - t_3), fma(2.0, (t_1 / x), (t_2 / x))) - (-1.0 * (t_3 / x))) / x))) / x), (2.0 * t_1)));
	} else {
		tmp = sqrt((-1.0 / ((-1.0 - x) / (x - 1.0))));
	}
	return copysign(1.0, t) * tmp;
}
function code(x, l, t)
	t_1 = abs(t) ^ 2.0
	t_2 = abs(l) ^ 2.0
	t_3 = fma(2.0, t_1, t_2)
	t_4 = Float64(-1.0 * t_3)
	t_5 = Float64(sqrt(2.0) * abs(t))
	tmp = 0.0
	if (abs(t) <= 7.5e-181)
		tmp = Float64(t_5 / Float64(abs(l) * sqrt(Float64(Float64(2.0 + Float64(2.0 * Float64(1.0 / x))) / x))));
	elseif (abs(t) <= 5.2e-159)
		tmp = Float64(1.4142135623730951 / sqrt(2.0));
	elseif (abs(t) <= 2.3e+64)
		tmp = Float64(t_5 / sqrt(fma(-1.0, Float64(fma(-1.0, Float64(t_3 - t_4), Float64(-1.0 * Float64(Float64(fma(-1.0, Float64(t_4 - t_3), fma(2.0, Float64(t_1 / x), Float64(t_2 / x))) - Float64(-1.0 * Float64(t_3 / x))) / x))) / x), Float64(2.0 * t_1))));
	else
		tmp = sqrt(Float64(-1.0 / Float64(Float64(-1.0 - x) / Float64(x - 1.0))));
	end
	return Float64(copysign(1.0, t) * tmp)
end
code[x_, l_, t_] := Block[{t$95$1 = N[Power[N[Abs[t], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Abs[l], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * t$95$1 + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[Sqrt[2.0], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 7.5e-181], N[(t$95$5 / N[(N[Abs[l], $MachinePrecision] * N[Sqrt[N[(N[(2.0 + N[(2.0 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 5.2e-159], N[(1.4142135623730951 / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 2.3e+64], N[(t$95$5 / N[Sqrt[N[(-1.0 * N[(N[(-1.0 * N[(t$95$3 - t$95$4), $MachinePrecision] + N[(-1.0 * N[(N[(N[(-1.0 * N[(t$95$4 - t$95$3), $MachinePrecision] + N[(2.0 * N[(t$95$1 / x), $MachinePrecision] + N[(t$95$2 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(t$95$3 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(-1.0 / N[(N[(-1.0 - x), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]), $MachinePrecision]]]]]]
\begin{array}{l}
t_1 := {\left(\left|t\right|\right)}^{2}\\
t_2 := {\left(\left|\ell\right|\right)}^{2}\\
t_3 := \mathsf{fma}\left(2, t\_1, t\_2\right)\\
t_4 := -1 \cdot t\_3\\
t_5 := \sqrt{2} \cdot \left|t\right|\\
\mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|t\right| \leq 7.5 \cdot 10^{-181}:\\
\;\;\;\;\frac{t\_5}{\left|\ell\right| \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}}\\

\mathbf{elif}\;\left|t\right| \leq 5.2 \cdot 10^{-159}:\\
\;\;\;\;\frac{1.4142135623730951}{\sqrt{2}}\\

\mathbf{elif}\;\left|t\right| \leq 2.3 \cdot 10^{+64}:\\
\;\;\;\;\frac{t\_5}{\sqrt{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, t\_3 - t\_4, -1 \cdot \frac{\mathsf{fma}\left(-1, t\_4 - t\_3, \mathsf{fma}\left(2, \frac{t\_1}{x}, \frac{t\_2}{x}\right)\right) - -1 \cdot \frac{t\_3}{x}}{x}\right)}{x}, 2 \cdot t\_1\right)}}\\

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


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

    1. Initial program 32.8%

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\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}}} \]
      2. sub-negate-revN/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{neg}\left(\left(\ell \cdot \ell - \frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)\right)\right)}}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}\right)\right)}} \]
      4. lift-/.f64N/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{x + 1}{x - 1}} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)\right)\right)}} \]
      5. associate-*l/N/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{\left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{x - 1}}\right)\right)}} \]
      6. sub-to-fractionN/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\color{blue}{\frac{\left(\ell \cdot \ell\right) \cdot \left(x - 1\right) - \left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{x - 1}}\right)}} \]
      7. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\frac{\left(\ell \cdot \ell\right) \cdot \left(x - 1\right) - \left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{\mathsf{neg}\left(\left(x - 1\right)\right)}}}} \]
      8. lower-/.f64N/A

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}}} \]
    5. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \color{blue}{\sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
      3. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
      4. lower--.f64N/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
      5. lower-+.f64N/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
      7. lower-+.f64N/A

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
      2. lower-+.f64N/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
      4. lower-/.f6415.5%

        \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
    9. Applied rewrites15.5%

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

    if 7.5000000000000002e-181 < t < 5.1999999999999997e-159

    1. Initial program 32.8%

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

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
      5. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
      6. lower-+.f64N/A

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
      7. lower--.f6438.6%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
    4. Applied rewrites38.6%

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

      \[\leadsto \frac{\sqrt{2}}{\sqrt{2}} \]
    6. Step-by-step derivation
      1. Applied rewrites38.0%

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2}} \]
      2. Evaluated real constant38.0%

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

      if 5.1999999999999997e-159 < t < 2.3e64

      1. Initial program 32.8%

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{-1 \cdot \frac{-1 \cdot \left(\left(2 \cdot {t}^{2} + {\ell}^{2}\right) - -1 \cdot \left(2 \cdot {t}^{2} + {\ell}^{2}\right)\right) + -1 \cdot \frac{\left(-1 \cdot \left(-1 \cdot \left(2 \cdot {t}^{2} + {\ell}^{2}\right) - \left(2 \cdot {t}^{2} + {\ell}^{2}\right)\right) + \left(2 \cdot \frac{{t}^{2}}{x} + \frac{{\ell}^{2}}{x}\right)\right) - -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}}{x}}{x} + 2 \cdot {t}^{2}}}} \]
      3. Step-by-step derivation
        1. lower-fma.f64N/A

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

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

      if 2.3e64 < t

      1. Initial program 32.8%

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

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
        2. lower-sqrt.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
        3. lower-sqrt.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
        4. lower-*.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
        6. lower-+.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
        7. lower--.f6438.6%

          \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
      4. Applied rewrites38.6%

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
      5. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
        2. lift-sqrt.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
        3. lift-sqrt.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
        4. sqrt-undivN/A

          \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
        5. lower-sqrt.f64N/A

          \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
        6. lift-*.f64N/A

          \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
        7. lift-/.f64N/A

          \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
        8. lift-+.f64N/A

          \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
        9. +-commutativeN/A

          \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{x + 1}{x - 1}}} \]
        10. lift--.f64N/A

          \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{x + 1}{x - 1}}} \]
        11. associate-/r*N/A

          \[\leadsto \sqrt{\frac{\frac{2}{2}}{\frac{x + 1}{x - 1}}} \]
        12. metadata-evalN/A

          \[\leadsto \sqrt{\frac{1}{\frac{x + 1}{x - 1}}} \]
        13. metadata-evalN/A

          \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x + 1}{x - 1}}} \]
        14. add-flipN/A

          \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x - \left(\mathsf{neg}\left(1\right)\right)}{x - 1}}} \]
        15. metadata-evalN/A

          \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x - -1}{x - 1}}} \]
        16. sub-negate-revN/A

          \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
        17. lift--.f64N/A

          \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
        18. lift--.f64N/A

          \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
      6. Applied rewrites38.6%

        \[\leadsto \color{blue}{\sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}}} \]
    7. Recombined 4 regimes into one program.
    8. Add Preprocessing

    Alternative 2: 85.1% accurate, 0.2× speedup?

    \[\begin{array}{l} t_1 := {\left(\left|t\right|\right)}^{2}\\ t_2 := {\left(\left|\ell\right|\right)}^{2}\\ t_3 := \mathsf{fma}\left(2, t\_1, t\_2\right)\\ t_4 := \sqrt{2} \cdot \left|t\right|\\ \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 7.5 \cdot 10^{-181}:\\ \;\;\;\;\frac{t\_4}{\left|\ell\right| \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}}\\ \mathbf{elif}\;\left|t\right| \leq 5.2 \cdot 10^{-159}:\\ \;\;\;\;\frac{1.4142135623730951}{\sqrt{2}}\\ \mathbf{elif}\;\left|t\right| \leq 2.3 \cdot 10^{+64}:\\ \;\;\;\;\frac{t\_4}{\sqrt{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, t\_3 - -1 \cdot t\_3, -1 \cdot \frac{t\_3}{x}\right) - \mathsf{fma}\left(2, \frac{t\_1}{x}, \frac{t\_2}{x}\right)}{x}, 2 \cdot t\_1\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}}\\ \end{array} \end{array} \]
    (FPCore (x l t)
     :precision binary64
     (let* ((t_1 (pow (fabs t) 2.0))
            (t_2 (pow (fabs l) 2.0))
            (t_3 (fma 2.0 t_1 t_2))
            (t_4 (* (sqrt 2.0) (fabs t))))
       (*
        (copysign 1.0 t)
        (if (<= (fabs t) 7.5e-181)
          (/ t_4 (* (fabs l) (sqrt (/ (+ 2.0 (* 2.0 (/ 1.0 x))) x))))
          (if (<= (fabs t) 5.2e-159)
            (/ 1.4142135623730951 (sqrt 2.0))
            (if (<= (fabs t) 2.3e+64)
              (/
               t_4
               (sqrt
                (fma
                 -1.0
                 (/
                  (-
                   (fma -1.0 (- t_3 (* -1.0 t_3)) (* -1.0 (/ t_3 x)))
                   (fma 2.0 (/ t_1 x) (/ t_2 x)))
                  x)
                 (* 2.0 t_1))))
              (sqrt (/ -1.0 (/ (- -1.0 x) (- x 1.0))))))))))
    double code(double x, double l, double t) {
    	double t_1 = pow(fabs(t), 2.0);
    	double t_2 = pow(fabs(l), 2.0);
    	double t_3 = fma(2.0, t_1, t_2);
    	double t_4 = sqrt(2.0) * fabs(t);
    	double tmp;
    	if (fabs(t) <= 7.5e-181) {
    		tmp = t_4 / (fabs(l) * sqrt(((2.0 + (2.0 * (1.0 / x))) / x)));
    	} else if (fabs(t) <= 5.2e-159) {
    		tmp = 1.4142135623730951 / sqrt(2.0);
    	} else if (fabs(t) <= 2.3e+64) {
    		tmp = t_4 / sqrt(fma(-1.0, ((fma(-1.0, (t_3 - (-1.0 * t_3)), (-1.0 * (t_3 / x))) - fma(2.0, (t_1 / x), (t_2 / x))) / x), (2.0 * t_1)));
    	} else {
    		tmp = sqrt((-1.0 / ((-1.0 - x) / (x - 1.0))));
    	}
    	return copysign(1.0, t) * tmp;
    }
    
    function code(x, l, t)
    	t_1 = abs(t) ^ 2.0
    	t_2 = abs(l) ^ 2.0
    	t_3 = fma(2.0, t_1, t_2)
    	t_4 = Float64(sqrt(2.0) * abs(t))
    	tmp = 0.0
    	if (abs(t) <= 7.5e-181)
    		tmp = Float64(t_4 / Float64(abs(l) * sqrt(Float64(Float64(2.0 + Float64(2.0 * Float64(1.0 / x))) / x))));
    	elseif (abs(t) <= 5.2e-159)
    		tmp = Float64(1.4142135623730951 / sqrt(2.0));
    	elseif (abs(t) <= 2.3e+64)
    		tmp = Float64(t_4 / sqrt(fma(-1.0, Float64(Float64(fma(-1.0, Float64(t_3 - Float64(-1.0 * t_3)), Float64(-1.0 * Float64(t_3 / x))) - fma(2.0, Float64(t_1 / x), Float64(t_2 / x))) / x), Float64(2.0 * t_1))));
    	else
    		tmp = sqrt(Float64(-1.0 / Float64(Float64(-1.0 - x) / Float64(x - 1.0))));
    	end
    	return Float64(copysign(1.0, t) * tmp)
    end
    
    code[x_, l_, t_] := Block[{t$95$1 = N[Power[N[Abs[t], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Abs[l], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * t$95$1 + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[2.0], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 7.5e-181], N[(t$95$4 / N[(N[Abs[l], $MachinePrecision] * N[Sqrt[N[(N[(2.0 + N[(2.0 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 5.2e-159], N[(1.4142135623730951 / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 2.3e+64], N[(t$95$4 / N[Sqrt[N[(-1.0 * N[(N[(N[(-1.0 * N[(t$95$3 - N[(-1.0 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(-1.0 * N[(t$95$3 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(t$95$1 / x), $MachinePrecision] + N[(t$95$2 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(-1.0 / N[(N[(-1.0 - x), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    t_1 := {\left(\left|t\right|\right)}^{2}\\
    t_2 := {\left(\left|\ell\right|\right)}^{2}\\
    t_3 := \mathsf{fma}\left(2, t\_1, t\_2\right)\\
    t_4 := \sqrt{2} \cdot \left|t\right|\\
    \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|t\right| \leq 7.5 \cdot 10^{-181}:\\
    \;\;\;\;\frac{t\_4}{\left|\ell\right| \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}}\\
    
    \mathbf{elif}\;\left|t\right| \leq 5.2 \cdot 10^{-159}:\\
    \;\;\;\;\frac{1.4142135623730951}{\sqrt{2}}\\
    
    \mathbf{elif}\;\left|t\right| \leq 2.3 \cdot 10^{+64}:\\
    \;\;\;\;\frac{t\_4}{\sqrt{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, t\_3 - -1 \cdot t\_3, -1 \cdot \frac{t\_3}{x}\right) - \mathsf{fma}\left(2, \frac{t\_1}{x}, \frac{t\_2}{x}\right)}{x}, 2 \cdot t\_1\right)}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if t < 7.5000000000000002e-181

      1. Initial program 32.8%

        \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
      2. Step-by-step derivation
        1. lift--.f64N/A

          \[\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}}} \]
        2. sub-negate-revN/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{neg}\left(\left(\ell \cdot \ell - \frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)\right)\right)}}} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}\right)\right)}} \]
        4. lift-/.f64N/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{x + 1}{x - 1}} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)\right)\right)}} \]
        5. associate-*l/N/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{\left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{x - 1}}\right)\right)}} \]
        6. sub-to-fractionN/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\color{blue}{\frac{\left(\ell \cdot \ell\right) \cdot \left(x - 1\right) - \left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{x - 1}}\right)}} \]
        7. distribute-neg-frac2N/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\frac{\left(\ell \cdot \ell\right) \cdot \left(x - 1\right) - \left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{\mathsf{neg}\left(\left(x - 1\right)\right)}}}} \]
        8. lower-/.f64N/A

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}}} \]
      5. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \color{blue}{\sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}}} \]
        2. lower-sqrt.f64N/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
        3. lower-/.f64N/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
        4. lower--.f64N/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
        5. lower-+.f64N/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
        7. lower-+.f64N/A

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

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

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

        \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
      8. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
        2. lower-+.f64N/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
        4. lower-/.f6415.5%

          \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
      9. Applied rewrites15.5%

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

      if 7.5000000000000002e-181 < t < 5.1999999999999997e-159

      1. Initial program 32.8%

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

        \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
        2. lower-sqrt.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
        3. lower-sqrt.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
        4. lower-*.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
        6. lower-+.f64N/A

          \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
        7. lower--.f6438.6%

          \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
      4. Applied rewrites38.6%

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

        \[\leadsto \frac{\sqrt{2}}{\sqrt{2}} \]
      6. Step-by-step derivation
        1. Applied rewrites38.0%

          \[\leadsto \frac{\sqrt{2}}{\sqrt{2}} \]
        2. Evaluated real constant38.0%

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

        if 5.1999999999999997e-159 < t < 2.3e64

        1. Initial program 32.8%

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

          \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{-1 \cdot \frac{\left(-1 \cdot \left(\left(2 \cdot {t}^{2} + {\ell}^{2}\right) - -1 \cdot \left(2 \cdot {t}^{2} + {\ell}^{2}\right)\right) + -1 \cdot \frac{2 \cdot {t}^{2} + {\ell}^{2}}{x}\right) - \left(2 \cdot \frac{{t}^{2}}{x} + \frac{{\ell}^{2}}{x}\right)}{x} + 2 \cdot {t}^{2}}}} \]
        3. Step-by-step derivation
          1. lower-fma.f64N/A

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

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

        if 2.3e64 < t

        1. Initial program 32.8%

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

          \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
          2. lower-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
          3. lower-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          5. lower-/.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          6. lower-+.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          7. lower--.f6438.6%

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
        4. Applied rewrites38.6%

          \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
        5. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
          2. lift-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
          3. lift-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          4. sqrt-undivN/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          5. lower-sqrt.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          6. lift-*.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          7. lift-/.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          8. lift-+.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          9. +-commutativeN/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{x + 1}{x - 1}}} \]
          10. lift--.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{x + 1}{x - 1}}} \]
          11. associate-/r*N/A

            \[\leadsto \sqrt{\frac{\frac{2}{2}}{\frac{x + 1}{x - 1}}} \]
          12. metadata-evalN/A

            \[\leadsto \sqrt{\frac{1}{\frac{x + 1}{x - 1}}} \]
          13. metadata-evalN/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x + 1}{x - 1}}} \]
          14. add-flipN/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x - \left(\mathsf{neg}\left(1\right)\right)}{x - 1}}} \]
          15. metadata-evalN/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x - -1}{x - 1}}} \]
          16. sub-negate-revN/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
          17. lift--.f64N/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
          18. lift--.f64N/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
        6. Applied rewrites38.6%

          \[\leadsto \color{blue}{\sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}}} \]
      7. Recombined 4 regimes into one program.
      8. Add Preprocessing

      Alternative 3: 85.0% accurate, 0.3× speedup?

      \[\begin{array}{l} t_1 := {\left(\left|\ell\right|\right)}^{2}\\ t_2 := {\left(\left|t\right|\right)}^{2}\\ t_3 := \sqrt{2} \cdot \left|t\right|\\ \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 7.5 \cdot 10^{-181}:\\ \;\;\;\;\frac{t\_3}{\left|\ell\right| \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}}\\ \mathbf{elif}\;\left|t\right| \leq 5.2 \cdot 10^{-159}:\\ \;\;\;\;\frac{1.4142135623730951}{\sqrt{2}}\\ \mathbf{elif}\;\left|t\right| \leq 2.3 \cdot 10^{+64}:\\ \;\;\;\;\frac{t\_3}{\sqrt{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, t\_1, 2 \cdot \left(-1 \cdot t\_2 - t\_2\right)\right) - t\_1}{x}, 2 \cdot t\_2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}}\\ \end{array} \end{array} \]
      (FPCore (x l t)
       :precision binary64
       (let* ((t_1 (pow (fabs l) 2.0))
              (t_2 (pow (fabs t) 2.0))
              (t_3 (* (sqrt 2.0) (fabs t))))
         (*
          (copysign 1.0 t)
          (if (<= (fabs t) 7.5e-181)
            (/ t_3 (* (fabs l) (sqrt (/ (+ 2.0 (* 2.0 (/ 1.0 x))) x))))
            (if (<= (fabs t) 5.2e-159)
              (/ 1.4142135623730951 (sqrt 2.0))
              (if (<= (fabs t) 2.3e+64)
                (/
                 t_3
                 (sqrt
                  (fma
                   -1.0
                   (/ (- (fma -1.0 t_1 (* 2.0 (- (* -1.0 t_2) t_2))) t_1) x)
                   (* 2.0 t_2))))
                (sqrt (/ -1.0 (/ (- -1.0 x) (- x 1.0))))))))))
      double code(double x, double l, double t) {
      	double t_1 = pow(fabs(l), 2.0);
      	double t_2 = pow(fabs(t), 2.0);
      	double t_3 = sqrt(2.0) * fabs(t);
      	double tmp;
      	if (fabs(t) <= 7.5e-181) {
      		tmp = t_3 / (fabs(l) * sqrt(((2.0 + (2.0 * (1.0 / x))) / x)));
      	} else if (fabs(t) <= 5.2e-159) {
      		tmp = 1.4142135623730951 / sqrt(2.0);
      	} else if (fabs(t) <= 2.3e+64) {
      		tmp = t_3 / sqrt(fma(-1.0, ((fma(-1.0, t_1, (2.0 * ((-1.0 * t_2) - t_2))) - t_1) / x), (2.0 * t_2)));
      	} else {
      		tmp = sqrt((-1.0 / ((-1.0 - x) / (x - 1.0))));
      	}
      	return copysign(1.0, t) * tmp;
      }
      
      function code(x, l, t)
      	t_1 = abs(l) ^ 2.0
      	t_2 = abs(t) ^ 2.0
      	t_3 = Float64(sqrt(2.0) * abs(t))
      	tmp = 0.0
      	if (abs(t) <= 7.5e-181)
      		tmp = Float64(t_3 / Float64(abs(l) * sqrt(Float64(Float64(2.0 + Float64(2.0 * Float64(1.0 / x))) / x))));
      	elseif (abs(t) <= 5.2e-159)
      		tmp = Float64(1.4142135623730951 / sqrt(2.0));
      	elseif (abs(t) <= 2.3e+64)
      		tmp = Float64(t_3 / sqrt(fma(-1.0, Float64(Float64(fma(-1.0, t_1, Float64(2.0 * Float64(Float64(-1.0 * t_2) - t_2))) - t_1) / x), Float64(2.0 * t_2))));
      	else
      		tmp = sqrt(Float64(-1.0 / Float64(Float64(-1.0 - x) / Float64(x - 1.0))));
      	end
      	return Float64(copysign(1.0, t) * tmp)
      end
      
      code[x_, l_, t_] := Block[{t$95$1 = N[Power[N[Abs[l], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Abs[t], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 7.5e-181], N[(t$95$3 / N[(N[Abs[l], $MachinePrecision] * N[Sqrt[N[(N[(2.0 + N[(2.0 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 5.2e-159], N[(1.4142135623730951 / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 2.3e+64], N[(t$95$3 / N[Sqrt[N[(-1.0 * N[(N[(N[(-1.0 * t$95$1 + N[(2.0 * N[(N[(-1.0 * t$95$2), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(-1.0 / N[(N[(-1.0 - x), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]), $MachinePrecision]]]]
      
      \begin{array}{l}
      t_1 := {\left(\left|\ell\right|\right)}^{2}\\
      t_2 := {\left(\left|t\right|\right)}^{2}\\
      t_3 := \sqrt{2} \cdot \left|t\right|\\
      \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
      \mathbf{if}\;\left|t\right| \leq 7.5 \cdot 10^{-181}:\\
      \;\;\;\;\frac{t\_3}{\left|\ell\right| \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}}\\
      
      \mathbf{elif}\;\left|t\right| \leq 5.2 \cdot 10^{-159}:\\
      \;\;\;\;\frac{1.4142135623730951}{\sqrt{2}}\\
      
      \mathbf{elif}\;\left|t\right| \leq 2.3 \cdot 10^{+64}:\\
      \;\;\;\;\frac{t\_3}{\sqrt{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, t\_1, 2 \cdot \left(-1 \cdot t\_2 - t\_2\right)\right) - t\_1}{x}, 2 \cdot t\_2\right)}}\\
      
      \mathbf{else}:\\
      \;\;\;\;\sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if t < 7.5000000000000002e-181

        1. Initial program 32.8%

          \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
        2. Step-by-step derivation
          1. lift--.f64N/A

            \[\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}}} \]
          2. sub-negate-revN/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{neg}\left(\left(\ell \cdot \ell - \frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)\right)\right)}}} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}\right)\right)}} \]
          4. lift-/.f64N/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{x + 1}{x - 1}} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)\right)\right)}} \]
          5. associate-*l/N/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{\left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{x - 1}}\right)\right)}} \]
          6. sub-to-fractionN/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\color{blue}{\frac{\left(\ell \cdot \ell\right) \cdot \left(x - 1\right) - \left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{x - 1}}\right)}} \]
          7. distribute-neg-frac2N/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\frac{\left(\ell \cdot \ell\right) \cdot \left(x - 1\right) - \left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{\mathsf{neg}\left(\left(x - 1\right)\right)}}}} \]
          8. lower-/.f64N/A

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

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

          \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}}} \]
        5. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \color{blue}{\sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}}} \]
          2. lower-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
          3. lower-/.f64N/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
          4. lower--.f64N/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
          5. lower-+.f64N/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
          7. lower-+.f64N/A

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

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

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

          \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
        8. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
          2. lower-+.f64N/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
          4. lower-/.f6415.5%

            \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
        9. Applied rewrites15.5%

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

        if 7.5000000000000002e-181 < t < 5.1999999999999997e-159

        1. Initial program 32.8%

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

          \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
          2. lower-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
          3. lower-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          5. lower-/.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          6. lower-+.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          7. lower--.f6438.6%

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
        4. Applied rewrites38.6%

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

          \[\leadsto \frac{\sqrt{2}}{\sqrt{2}} \]
        6. Step-by-step derivation
          1. Applied rewrites38.0%

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2}} \]
          2. Evaluated real constant38.0%

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

          if 5.1999999999999997e-159 < t < 2.3e64

          1. Initial program 32.8%

            \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
          2. Step-by-step derivation
            1. lift--.f64N/A

              \[\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}}} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \color{blue}{\ell \cdot \ell}}} \]
            3. fp-cancel-sub-sign-invN/A

              \[\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) + \left(\mathsf{neg}\left(\ell\right)\right) \cdot \ell}}} \]
            4. lift-*.f64N/A

              \[\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)} + \left(\mathsf{neg}\left(\ell\right)\right) \cdot \ell}} \]
            5. lift-+.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \color{blue}{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)} + \left(\mathsf{neg}\left(\ell\right)\right) \cdot \ell}} \]
            6. distribute-lft-inN/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell\right) + \frac{x + 1}{x - 1} \cdot \left(2 \cdot \left(t \cdot t\right)\right)\right)} + \left(\mathsf{neg}\left(\ell\right)\right) \cdot \ell}} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell\right) + \left(\frac{x + 1}{x - 1} \cdot \left(2 \cdot \left(t \cdot t\right)\right) + \left(\mathsf{neg}\left(\ell\right)\right) \cdot \ell\right)}}} \]
            8. lift-*.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \color{blue}{\left(\ell \cdot \ell\right)} + \left(\frac{x + 1}{x - 1} \cdot \left(2 \cdot \left(t \cdot t\right)\right) + \left(\mathsf{neg}\left(\ell\right)\right) \cdot \ell\right)}} \]
            9. sqr-neg-revN/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\ell\right)\right) \cdot \left(\mathsf{neg}\left(\ell\right)\right)\right)} + \left(\frac{x + 1}{x - 1} \cdot \left(2 \cdot \left(t \cdot t\right)\right) + \left(\mathsf{neg}\left(\ell\right)\right) \cdot \ell\right)}} \]
            10. associate-*r*N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(\frac{x + 1}{x - 1} \cdot \left(\mathsf{neg}\left(\ell\right)\right)\right) \cdot \left(\mathsf{neg}\left(\ell\right)\right)} + \left(\frac{x + 1}{x - 1} \cdot \left(2 \cdot \left(t \cdot t\right)\right) + \left(\mathsf{neg}\left(\ell\right)\right) \cdot \ell\right)}} \]
            11. fp-cancel-sub-sign-invN/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\left(\frac{x + 1}{x - 1} \cdot \left(\mathsf{neg}\left(\ell\right)\right)\right) \cdot \left(\mathsf{neg}\left(\ell\right)\right) + \color{blue}{\left(\frac{x + 1}{x - 1} \cdot \left(2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell\right)}}} \]
            12. lift-*.f64N/A

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

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

            \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{-1 \cdot \frac{\left(-1 \cdot {\ell}^{2} + 2 \cdot \left(-1 \cdot {t}^{2} - {t}^{2}\right)\right) - {\ell}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
          5. Step-by-step derivation
            1. lower-fma.f64N/A

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

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

          if 2.3e64 < t

          1. Initial program 32.8%

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

            \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
            2. lower-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            6. lower-+.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            7. lower--.f6438.6%

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          4. Applied rewrites38.6%

            \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
          5. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
            2. lift-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
            3. lift-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            4. sqrt-undivN/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            5. lower-sqrt.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            6. lift-*.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            7. lift-/.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            8. lift-+.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            9. +-commutativeN/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{x + 1}{x - 1}}} \]
            10. lift--.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{x + 1}{x - 1}}} \]
            11. associate-/r*N/A

              \[\leadsto \sqrt{\frac{\frac{2}{2}}{\frac{x + 1}{x - 1}}} \]
            12. metadata-evalN/A

              \[\leadsto \sqrt{\frac{1}{\frac{x + 1}{x - 1}}} \]
            13. metadata-evalN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x + 1}{x - 1}}} \]
            14. add-flipN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x - \left(\mathsf{neg}\left(1\right)\right)}{x - 1}}} \]
            15. metadata-evalN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x - -1}{x - 1}}} \]
            16. sub-negate-revN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
            17. lift--.f64N/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
            18. lift--.f64N/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
          6. Applied rewrites38.6%

            \[\leadsto \color{blue}{\sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}}} \]
        7. Recombined 4 regimes into one program.
        8. Add Preprocessing

        Alternative 4: 80.8% accurate, 1.0× speedup?

        \[\mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 7.5 \cdot 10^{-181}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \left|t\right|}{\left|\ell\right| \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{x - -1}}\\ \end{array} \]
        (FPCore (x l t)
         :precision binary64
         (*
          (copysign 1.0 t)
          (if (<= (fabs t) 7.5e-181)
            (/
             (* (sqrt 2.0) (fabs t))
             (* (fabs l) (sqrt (/ (+ 2.0 (* 2.0 (/ 1.0 x))) x))))
            (sqrt (/ (- x 1.0) (- x -1.0))))))
        double code(double x, double l, double t) {
        	double tmp;
        	if (fabs(t) <= 7.5e-181) {
        		tmp = (sqrt(2.0) * fabs(t)) / (fabs(l) * sqrt(((2.0 + (2.0 * (1.0 / x))) / x)));
        	} else {
        		tmp = sqrt(((x - 1.0) / (x - -1.0)));
        	}
        	return copysign(1.0, t) * tmp;
        }
        
        public static double code(double x, double l, double t) {
        	double tmp;
        	if (Math.abs(t) <= 7.5e-181) {
        		tmp = (Math.sqrt(2.0) * Math.abs(t)) / (Math.abs(l) * Math.sqrt(((2.0 + (2.0 * (1.0 / x))) / x)));
        	} else {
        		tmp = Math.sqrt(((x - 1.0) / (x - -1.0)));
        	}
        	return Math.copySign(1.0, t) * tmp;
        }
        
        def code(x, l, t):
        	tmp = 0
        	if math.fabs(t) <= 7.5e-181:
        		tmp = (math.sqrt(2.0) * math.fabs(t)) / (math.fabs(l) * math.sqrt(((2.0 + (2.0 * (1.0 / x))) / x)))
        	else:
        		tmp = math.sqrt(((x - 1.0) / (x - -1.0)))
        	return math.copysign(1.0, t) * tmp
        
        function code(x, l, t)
        	tmp = 0.0
        	if (abs(t) <= 7.5e-181)
        		tmp = Float64(Float64(sqrt(2.0) * abs(t)) / Float64(abs(l) * sqrt(Float64(Float64(2.0 + Float64(2.0 * Float64(1.0 / x))) / x))));
        	else
        		tmp = sqrt(Float64(Float64(x - 1.0) / Float64(x - -1.0)));
        	end
        	return Float64(copysign(1.0, t) * tmp)
        end
        
        function tmp_2 = code(x, l, t)
        	tmp = 0.0;
        	if (abs(t) <= 7.5e-181)
        		tmp = (sqrt(2.0) * abs(t)) / (abs(l) * sqrt(((2.0 + (2.0 * (1.0 / x))) / x)));
        	else
        		tmp = sqrt(((x - 1.0) / (x - -1.0)));
        	end
        	tmp_2 = (sign(t) * abs(1.0)) * tmp;
        end
        
        code[x_, l_, t_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 7.5e-181], N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision] / N[(N[Abs[l], $MachinePrecision] * N[Sqrt[N[(N[(2.0 + N[(2.0 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x - 1.0), $MachinePrecision] / N[(x - -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]), $MachinePrecision]
        
        \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
        \mathbf{if}\;\left|t\right| \leq 7.5 \cdot 10^{-181}:\\
        \;\;\;\;\frac{\sqrt{2} \cdot \left|t\right|}{\left|\ell\right| \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}}\\
        
        \mathbf{else}:\\
        \;\;\;\;\sqrt{\frac{x - 1}{x - -1}}\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < 7.5000000000000002e-181

          1. Initial program 32.8%

            \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
          2. Step-by-step derivation
            1. lift--.f64N/A

              \[\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}}} \]
            2. sub-negate-revN/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{neg}\left(\left(\ell \cdot \ell - \frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)\right)\right)}}} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}\right)\right)}} \]
            4. lift-/.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{x + 1}{x - 1}} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)\right)\right)}} \]
            5. associate-*l/N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{\left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{x - 1}}\right)\right)}} \]
            6. sub-to-fractionN/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\color{blue}{\frac{\left(\ell \cdot \ell\right) \cdot \left(x - 1\right) - \left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{x - 1}}\right)}} \]
            7. distribute-neg-frac2N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\frac{\left(\ell \cdot \ell\right) \cdot \left(x - 1\right) - \left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{\mathsf{neg}\left(\left(x - 1\right)\right)}}}} \]
            8. lower-/.f64N/A

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

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

            \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}}} \]
          5. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \color{blue}{\sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}}} \]
            2. lower-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
            3. lower-/.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
            4. lower--.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
            5. lower-+.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
            6. lower-*.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
            7. lower-+.f64N/A

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

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

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

            \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
          8. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
            2. lower-+.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
            3. lower-*.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
            4. lower-/.f6415.5%

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2 + 2 \cdot \frac{1}{x}}{x}}} \]
          9. Applied rewrites15.5%

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

          if 7.5000000000000002e-181 < t

          1. Initial program 32.8%

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

            \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
            2. lower-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            6. lower-+.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            7. lower--.f6438.6%

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          4. Applied rewrites38.6%

            \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
          5. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
            2. lift-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
            3. lift-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            4. sqrt-undivN/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            5. lower-sqrt.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            6. lift-*.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            7. lift-/.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            8. lift-+.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            9. +-commutativeN/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{x + 1}{x - 1}}} \]
            10. lift--.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{x + 1}{x - 1}}} \]
            11. associate-/r*N/A

              \[\leadsto \sqrt{\frac{\frac{2}{2}}{\frac{x + 1}{x - 1}}} \]
            12. metadata-evalN/A

              \[\leadsto \sqrt{\frac{1}{\frac{x + 1}{x - 1}}} \]
            13. metadata-evalN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x + 1}{x - 1}}} \]
            14. add-flipN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x - \left(\mathsf{neg}\left(1\right)\right)}{x - 1}}} \]
            15. metadata-evalN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x - -1}{x - 1}}} \]
            16. sub-negate-revN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
            17. lift--.f64N/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
            18. lift--.f64N/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
          6. Applied rewrites38.6%

            \[\leadsto \color{blue}{\sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}}} \]
          7. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}} \]
            2. metadata-evalN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(1\right)}{\frac{-1 - x}{x - 1}}} \]
            3. distribute-frac-negN/A

              \[\leadsto \sqrt{\mathsf{neg}\left(\frac{1}{\frac{-1 - x}{x - 1}}\right)} \]
            4. lower-neg.f64N/A

              \[\leadsto \sqrt{-\frac{1}{\frac{-1 - x}{x - 1}}} \]
            5. lift--.f64N/A

              \[\leadsto \sqrt{-\frac{1}{\frac{-1 - x}{x - 1}}} \]
            6. lift-/.f64N/A

              \[\leadsto \sqrt{-\frac{1}{\frac{-1 - x}{x - 1}}} \]
            7. frac-2negN/A

              \[\leadsto \sqrt{-\frac{1}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{\mathsf{neg}\left(\left(x - 1\right)\right)}}} \]
            8. sub-negate-revN/A

              \[\leadsto \sqrt{-\frac{1}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{1 - x}}} \]
            9. lift--.f64N/A

              \[\leadsto \sqrt{-\frac{1}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{1 - x}}} \]
            10. div-flip-revN/A

              \[\leadsto \sqrt{-\frac{1 - x}{\mathsf{neg}\left(\left(-1 - x\right)\right)}} \]
            11. lift--.f64N/A

              \[\leadsto \sqrt{-\frac{1 - x}{\mathsf{neg}\left(\left(-1 - x\right)\right)}} \]
            12. sub-negate-revN/A

              \[\leadsto \sqrt{-\frac{1 - x}{x - -1}} \]
            13. metadata-evalN/A

              \[\leadsto \sqrt{-\frac{1 - x}{x - \left(\mathsf{neg}\left(1\right)\right)}} \]
            14. add-flipN/A

              \[\leadsto \sqrt{-\frac{1 - x}{x + 1}} \]
            15. +-commutativeN/A

              \[\leadsto \sqrt{-\frac{1 - x}{1 + x}} \]
            16. lift-+.f64N/A

              \[\leadsto \sqrt{-\frac{1 - x}{1 + x}} \]
            17. lower-/.f6438.6%

              \[\leadsto \sqrt{-\frac{1 - x}{1 + x}} \]
            18. lift-+.f64N/A

              \[\leadsto \sqrt{-\frac{1 - x}{1 + x}} \]
            19. +-commutativeN/A

              \[\leadsto \sqrt{-\frac{1 - x}{x + 1}} \]
            20. add-flipN/A

              \[\leadsto \sqrt{-\frac{1 - x}{x - \left(\mathsf{neg}\left(1\right)\right)}} \]
            21. metadata-evalN/A

              \[\leadsto \sqrt{-\frac{1 - x}{x - -1}} \]
            22. lower--.f6438.6%

              \[\leadsto \sqrt{-\frac{1 - x}{x - -1}} \]
          8. Applied rewrites38.6%

            \[\leadsto \sqrt{-\frac{1 - x}{x - -1}} \]
          9. Step-by-step derivation
            1. lift-neg.f64N/A

              \[\leadsto \sqrt{\mathsf{neg}\left(\frac{1 - x}{x - -1}\right)} \]
            2. lift-/.f64N/A

              \[\leadsto \sqrt{\mathsf{neg}\left(\frac{1 - x}{x - -1}\right)} \]
            3. distribute-neg-fracN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(\left(1 - x\right)\right)}{x - -1}} \]
            4. lift--.f64N/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(\left(1 - x\right)\right)}{x - -1}} \]
            5. sub-negate-revN/A

              \[\leadsto \sqrt{\frac{x - 1}{x - -1}} \]
            6. lower-/.f64N/A

              \[\leadsto \sqrt{\frac{x - 1}{x - -1}} \]
            7. lower--.f6438.6%

              \[\leadsto \sqrt{\frac{x - 1}{x - -1}} \]
          10. Applied rewrites38.6%

            \[\leadsto \sqrt{\frac{x - 1}{x - -1}} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 5: 80.8% accurate, 1.3× speedup?

        \[\mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 7.5 \cdot 10^{-181}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \left|t\right|}{\left|\ell\right| \cdot \sqrt{\frac{2}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{x - -1}}\\ \end{array} \]
        (FPCore (x l t)
         :precision binary64
         (*
          (copysign 1.0 t)
          (if (<= (fabs t) 7.5e-181)
            (/ (* (sqrt 2.0) (fabs t)) (* (fabs l) (sqrt (/ 2.0 x))))
            (sqrt (/ (- x 1.0) (- x -1.0))))))
        double code(double x, double l, double t) {
        	double tmp;
        	if (fabs(t) <= 7.5e-181) {
        		tmp = (sqrt(2.0) * fabs(t)) / (fabs(l) * sqrt((2.0 / x)));
        	} else {
        		tmp = sqrt(((x - 1.0) / (x - -1.0)));
        	}
        	return copysign(1.0, t) * tmp;
        }
        
        public static double code(double x, double l, double t) {
        	double tmp;
        	if (Math.abs(t) <= 7.5e-181) {
        		tmp = (Math.sqrt(2.0) * Math.abs(t)) / (Math.abs(l) * Math.sqrt((2.0 / x)));
        	} else {
        		tmp = Math.sqrt(((x - 1.0) / (x - -1.0)));
        	}
        	return Math.copySign(1.0, t) * tmp;
        }
        
        def code(x, l, t):
        	tmp = 0
        	if math.fabs(t) <= 7.5e-181:
        		tmp = (math.sqrt(2.0) * math.fabs(t)) / (math.fabs(l) * math.sqrt((2.0 / x)))
        	else:
        		tmp = math.sqrt(((x - 1.0) / (x - -1.0)))
        	return math.copysign(1.0, t) * tmp
        
        function code(x, l, t)
        	tmp = 0.0
        	if (abs(t) <= 7.5e-181)
        		tmp = Float64(Float64(sqrt(2.0) * abs(t)) / Float64(abs(l) * sqrt(Float64(2.0 / x))));
        	else
        		tmp = sqrt(Float64(Float64(x - 1.0) / Float64(x - -1.0)));
        	end
        	return Float64(copysign(1.0, t) * tmp)
        end
        
        function tmp_2 = code(x, l, t)
        	tmp = 0.0;
        	if (abs(t) <= 7.5e-181)
        		tmp = (sqrt(2.0) * abs(t)) / (abs(l) * sqrt((2.0 / x)));
        	else
        		tmp = sqrt(((x - 1.0) / (x - -1.0)));
        	end
        	tmp_2 = (sign(t) * abs(1.0)) * tmp;
        end
        
        code[x_, l_, t_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 7.5e-181], N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision] / N[(N[Abs[l], $MachinePrecision] * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x - 1.0), $MachinePrecision] / N[(x - -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]), $MachinePrecision]
        
        \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
        \mathbf{if}\;\left|t\right| \leq 7.5 \cdot 10^{-181}:\\
        \;\;\;\;\frac{\sqrt{2} \cdot \left|t\right|}{\left|\ell\right| \cdot \sqrt{\frac{2}{x}}}\\
        
        \mathbf{else}:\\
        \;\;\;\;\sqrt{\frac{x - 1}{x - -1}}\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < 7.5000000000000002e-181

          1. Initial program 32.8%

            \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}} \]
          2. Step-by-step derivation
            1. lift--.f64N/A

              \[\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}}} \]
            2. sub-negate-revN/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{neg}\left(\left(\ell \cdot \ell - \frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)\right)\right)}}} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}\right)\right)}} \]
            4. lift-/.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{x + 1}{x - 1}} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)\right)\right)}} \]
            5. associate-*l/N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\left(\ell \cdot \ell - \color{blue}{\frac{\left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{x - 1}}\right)\right)}} \]
            6. sub-to-fractionN/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{neg}\left(\color{blue}{\frac{\left(\ell \cdot \ell\right) \cdot \left(x - 1\right) - \left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{x - 1}}\right)}} \]
            7. distribute-neg-frac2N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\frac{\left(\ell \cdot \ell\right) \cdot \left(x - 1\right) - \left(x + 1\right) \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right)}{\mathsf{neg}\left(\left(x - 1\right)\right)}}}} \]
            8. lower-/.f64N/A

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

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

            \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}}} \]
          5. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \color{blue}{\sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}}} \]
            2. lower-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
            3. lower-/.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
            4. lower--.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
            5. lower-+.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
            6. lower-*.f64N/A

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{\left(x + -1 \cdot \left(1 + x\right)\right) - 1}{1 - x}}} \]
            7. lower-+.f64N/A

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

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

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

            \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2}{x}}} \]
          8. Step-by-step derivation
            1. lower-/.f6415.4%

              \[\leadsto \frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2}{x}}} \]
          9. Applied rewrites15.4%

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

          if 7.5000000000000002e-181 < t

          1. Initial program 32.8%

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

            \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
            2. lower-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            6. lower-+.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            7. lower--.f6438.6%

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          4. Applied rewrites38.6%

            \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
          5. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
            2. lift-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
            3. lift-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
            4. sqrt-undivN/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            5. lower-sqrt.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            6. lift-*.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            7. lift-/.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            8. lift-+.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
            9. +-commutativeN/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{x + 1}{x - 1}}} \]
            10. lift--.f64N/A

              \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{x + 1}{x - 1}}} \]
            11. associate-/r*N/A

              \[\leadsto \sqrt{\frac{\frac{2}{2}}{\frac{x + 1}{x - 1}}} \]
            12. metadata-evalN/A

              \[\leadsto \sqrt{\frac{1}{\frac{x + 1}{x - 1}}} \]
            13. metadata-evalN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x + 1}{x - 1}}} \]
            14. add-flipN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x - \left(\mathsf{neg}\left(1\right)\right)}{x - 1}}} \]
            15. metadata-evalN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x - -1}{x - 1}}} \]
            16. sub-negate-revN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
            17. lift--.f64N/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
            18. lift--.f64N/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
          6. Applied rewrites38.6%

            \[\leadsto \color{blue}{\sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}}} \]
          7. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}} \]
            2. metadata-evalN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(1\right)}{\frac{-1 - x}{x - 1}}} \]
            3. distribute-frac-negN/A

              \[\leadsto \sqrt{\mathsf{neg}\left(\frac{1}{\frac{-1 - x}{x - 1}}\right)} \]
            4. lower-neg.f64N/A

              \[\leadsto \sqrt{-\frac{1}{\frac{-1 - x}{x - 1}}} \]
            5. lift--.f64N/A

              \[\leadsto \sqrt{-\frac{1}{\frac{-1 - x}{x - 1}}} \]
            6. lift-/.f64N/A

              \[\leadsto \sqrt{-\frac{1}{\frac{-1 - x}{x - 1}}} \]
            7. frac-2negN/A

              \[\leadsto \sqrt{-\frac{1}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{\mathsf{neg}\left(\left(x - 1\right)\right)}}} \]
            8. sub-negate-revN/A

              \[\leadsto \sqrt{-\frac{1}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{1 - x}}} \]
            9. lift--.f64N/A

              \[\leadsto \sqrt{-\frac{1}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{1 - x}}} \]
            10. div-flip-revN/A

              \[\leadsto \sqrt{-\frac{1 - x}{\mathsf{neg}\left(\left(-1 - x\right)\right)}} \]
            11. lift--.f64N/A

              \[\leadsto \sqrt{-\frac{1 - x}{\mathsf{neg}\left(\left(-1 - x\right)\right)}} \]
            12. sub-negate-revN/A

              \[\leadsto \sqrt{-\frac{1 - x}{x - -1}} \]
            13. metadata-evalN/A

              \[\leadsto \sqrt{-\frac{1 - x}{x - \left(\mathsf{neg}\left(1\right)\right)}} \]
            14. add-flipN/A

              \[\leadsto \sqrt{-\frac{1 - x}{x + 1}} \]
            15. +-commutativeN/A

              \[\leadsto \sqrt{-\frac{1 - x}{1 + x}} \]
            16. lift-+.f64N/A

              \[\leadsto \sqrt{-\frac{1 - x}{1 + x}} \]
            17. lower-/.f6438.6%

              \[\leadsto \sqrt{-\frac{1 - x}{1 + x}} \]
            18. lift-+.f64N/A

              \[\leadsto \sqrt{-\frac{1 - x}{1 + x}} \]
            19. +-commutativeN/A

              \[\leadsto \sqrt{-\frac{1 - x}{x + 1}} \]
            20. add-flipN/A

              \[\leadsto \sqrt{-\frac{1 - x}{x - \left(\mathsf{neg}\left(1\right)\right)}} \]
            21. metadata-evalN/A

              \[\leadsto \sqrt{-\frac{1 - x}{x - -1}} \]
            22. lower--.f6438.6%

              \[\leadsto \sqrt{-\frac{1 - x}{x - -1}} \]
          8. Applied rewrites38.6%

            \[\leadsto \sqrt{-\frac{1 - x}{x - -1}} \]
          9. Step-by-step derivation
            1. lift-neg.f64N/A

              \[\leadsto \sqrt{\mathsf{neg}\left(\frac{1 - x}{x - -1}\right)} \]
            2. lift-/.f64N/A

              \[\leadsto \sqrt{\mathsf{neg}\left(\frac{1 - x}{x - -1}\right)} \]
            3. distribute-neg-fracN/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(\left(1 - x\right)\right)}{x - -1}} \]
            4. lift--.f64N/A

              \[\leadsto \sqrt{\frac{\mathsf{neg}\left(\left(1 - x\right)\right)}{x - -1}} \]
            5. sub-negate-revN/A

              \[\leadsto \sqrt{\frac{x - 1}{x - -1}} \]
            6. lower-/.f64N/A

              \[\leadsto \sqrt{\frac{x - 1}{x - -1}} \]
            7. lower--.f6438.6%

              \[\leadsto \sqrt{\frac{x - 1}{x - -1}} \]
          10. Applied rewrites38.6%

            \[\leadsto \sqrt{\frac{x - 1}{x - -1}} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 6: 76.4% accurate, 2.3× speedup?

        \[\mathsf{copysign}\left(1, t\right) \cdot \sqrt{\frac{x - 1}{x - -1}} \]
        (FPCore (x l t)
         :precision binary64
         (* (copysign 1.0 t) (sqrt (/ (- x 1.0) (- x -1.0)))))
        double code(double x, double l, double t) {
        	return copysign(1.0, t) * sqrt(((x - 1.0) / (x - -1.0)));
        }
        
        public static double code(double x, double l, double t) {
        	return Math.copySign(1.0, t) * Math.sqrt(((x - 1.0) / (x - -1.0)));
        }
        
        def code(x, l, t):
        	return math.copysign(1.0, t) * math.sqrt(((x - 1.0) / (x - -1.0)))
        
        function code(x, l, t)
        	return Float64(copysign(1.0, t) * sqrt(Float64(Float64(x - 1.0) / Float64(x - -1.0))))
        end
        
        function tmp = code(x, l, t)
        	tmp = (sign(t) * abs(1.0)) * sqrt(((x - 1.0) / (x - -1.0)));
        end
        
        code[x_, l_, t_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[Sqrt[N[(N[(x - 1.0), $MachinePrecision] / N[(x - -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
        
        \mathsf{copysign}\left(1, t\right) \cdot \sqrt{\frac{x - 1}{x - -1}}
        
        Derivation
        1. Initial program 32.8%

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

          \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
          2. lower-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
          3. lower-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          5. lower-/.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          6. lower-+.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          7. lower--.f6438.6%

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
        4. Applied rewrites38.6%

          \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
        5. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
          2. lift-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
          3. lift-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          4. sqrt-undivN/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          5. lower-sqrt.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          6. lift-*.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          7. lift-/.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          8. lift-+.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          9. +-commutativeN/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{x + 1}{x - 1}}} \]
          10. lift--.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{x + 1}{x - 1}}} \]
          11. associate-/r*N/A

            \[\leadsto \sqrt{\frac{\frac{2}{2}}{\frac{x + 1}{x - 1}}} \]
          12. metadata-evalN/A

            \[\leadsto \sqrt{\frac{1}{\frac{x + 1}{x - 1}}} \]
          13. metadata-evalN/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x + 1}{x - 1}}} \]
          14. add-flipN/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x - \left(\mathsf{neg}\left(1\right)\right)}{x - 1}}} \]
          15. metadata-evalN/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x - -1}{x - 1}}} \]
          16. sub-negate-revN/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
          17. lift--.f64N/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
          18. lift--.f64N/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
        6. Applied rewrites38.6%

          \[\leadsto \color{blue}{\sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}}} \]
        7. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}} \]
          2. metadata-evalN/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(1\right)}{\frac{-1 - x}{x - 1}}} \]
          3. distribute-frac-negN/A

            \[\leadsto \sqrt{\mathsf{neg}\left(\frac{1}{\frac{-1 - x}{x - 1}}\right)} \]
          4. lower-neg.f64N/A

            \[\leadsto \sqrt{-\frac{1}{\frac{-1 - x}{x - 1}}} \]
          5. lift--.f64N/A

            \[\leadsto \sqrt{-\frac{1}{\frac{-1 - x}{x - 1}}} \]
          6. lift-/.f64N/A

            \[\leadsto \sqrt{-\frac{1}{\frac{-1 - x}{x - 1}}} \]
          7. frac-2negN/A

            \[\leadsto \sqrt{-\frac{1}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{\mathsf{neg}\left(\left(x - 1\right)\right)}}} \]
          8. sub-negate-revN/A

            \[\leadsto \sqrt{-\frac{1}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{1 - x}}} \]
          9. lift--.f64N/A

            \[\leadsto \sqrt{-\frac{1}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{1 - x}}} \]
          10. div-flip-revN/A

            \[\leadsto \sqrt{-\frac{1 - x}{\mathsf{neg}\left(\left(-1 - x\right)\right)}} \]
          11. lift--.f64N/A

            \[\leadsto \sqrt{-\frac{1 - x}{\mathsf{neg}\left(\left(-1 - x\right)\right)}} \]
          12. sub-negate-revN/A

            \[\leadsto \sqrt{-\frac{1 - x}{x - -1}} \]
          13. metadata-evalN/A

            \[\leadsto \sqrt{-\frac{1 - x}{x - \left(\mathsf{neg}\left(1\right)\right)}} \]
          14. add-flipN/A

            \[\leadsto \sqrt{-\frac{1 - x}{x + 1}} \]
          15. +-commutativeN/A

            \[\leadsto \sqrt{-\frac{1 - x}{1 + x}} \]
          16. lift-+.f64N/A

            \[\leadsto \sqrt{-\frac{1 - x}{1 + x}} \]
          17. lower-/.f6438.6%

            \[\leadsto \sqrt{-\frac{1 - x}{1 + x}} \]
          18. lift-+.f64N/A

            \[\leadsto \sqrt{-\frac{1 - x}{1 + x}} \]
          19. +-commutativeN/A

            \[\leadsto \sqrt{-\frac{1 - x}{x + 1}} \]
          20. add-flipN/A

            \[\leadsto \sqrt{-\frac{1 - x}{x - \left(\mathsf{neg}\left(1\right)\right)}} \]
          21. metadata-evalN/A

            \[\leadsto \sqrt{-\frac{1 - x}{x - -1}} \]
          22. lower--.f6438.6%

            \[\leadsto \sqrt{-\frac{1 - x}{x - -1}} \]
        8. Applied rewrites38.6%

          \[\leadsto \sqrt{-\frac{1 - x}{x - -1}} \]
        9. Step-by-step derivation
          1. lift-neg.f64N/A

            \[\leadsto \sqrt{\mathsf{neg}\left(\frac{1 - x}{x - -1}\right)} \]
          2. lift-/.f64N/A

            \[\leadsto \sqrt{\mathsf{neg}\left(\frac{1 - x}{x - -1}\right)} \]
          3. distribute-neg-fracN/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(\left(1 - x\right)\right)}{x - -1}} \]
          4. lift--.f64N/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(\left(1 - x\right)\right)}{x - -1}} \]
          5. sub-negate-revN/A

            \[\leadsto \sqrt{\frac{x - 1}{x - -1}} \]
          6. lower-/.f64N/A

            \[\leadsto \sqrt{\frac{x - 1}{x - -1}} \]
          7. lower--.f6438.6%

            \[\leadsto \sqrt{\frac{x - 1}{x - -1}} \]
        10. Applied rewrites38.6%

          \[\leadsto \sqrt{\frac{x - 1}{x - -1}} \]
        11. Add Preprocessing

        Alternative 7: 75.8% accurate, 3.1× speedup?

        \[\mathsf{copysign}\left(1, t\right) \cdot \left(1 - \frac{1}{x}\right) \]
        (FPCore (x l t) :precision binary64 (* (copysign 1.0 t) (- 1.0 (/ 1.0 x))))
        double code(double x, double l, double t) {
        	return copysign(1.0, t) * (1.0 - (1.0 / x));
        }
        
        public static double code(double x, double l, double t) {
        	return Math.copySign(1.0, t) * (1.0 - (1.0 / x));
        }
        
        def code(x, l, t):
        	return math.copysign(1.0, t) * (1.0 - (1.0 / x))
        
        function code(x, l, t)
        	return Float64(copysign(1.0, t) * Float64(1.0 - Float64(1.0 / x)))
        end
        
        function tmp = code(x, l, t)
        	tmp = (sign(t) * abs(1.0)) * (1.0 - (1.0 / x));
        end
        
        code[x_, l_, t_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
        
        \mathsf{copysign}\left(1, t\right) \cdot \left(1 - \frac{1}{x}\right)
        
        Derivation
        1. Initial program 32.8%

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

          \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
          2. lower-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
          3. lower-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          5. lower-/.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          6. lower-+.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          7. lower--.f6438.6%

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
        4. Applied rewrites38.6%

          \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
        5. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
          2. lift-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
          3. lift-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          4. sqrt-undivN/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          5. lower-sqrt.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          6. lift-*.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          7. lift-/.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          8. lift-+.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{1 + x}{x - 1}}} \]
          9. +-commutativeN/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{x + 1}{x - 1}}} \]
          10. lift--.f64N/A

            \[\leadsto \sqrt{\frac{2}{2 \cdot \frac{x + 1}{x - 1}}} \]
          11. associate-/r*N/A

            \[\leadsto \sqrt{\frac{\frac{2}{2}}{\frac{x + 1}{x - 1}}} \]
          12. metadata-evalN/A

            \[\leadsto \sqrt{\frac{1}{\frac{x + 1}{x - 1}}} \]
          13. metadata-evalN/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x + 1}{x - 1}}} \]
          14. add-flipN/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x - \left(\mathsf{neg}\left(1\right)\right)}{x - 1}}} \]
          15. metadata-evalN/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{x - -1}{x - 1}}} \]
          16. sub-negate-revN/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
          17. lift--.f64N/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
          18. lift--.f64N/A

            \[\leadsto \sqrt{\frac{\mathsf{neg}\left(-1\right)}{\frac{\mathsf{neg}\left(\left(-1 - x\right)\right)}{x - 1}}} \]
        6. Applied rewrites38.6%

          \[\leadsto \color{blue}{\sqrt{\frac{-1}{\frac{-1 - x}{x - 1}}}} \]
        7. Taylor expanded in x around inf

          \[\leadsto 1 - \color{blue}{\frac{1}{x}} \]
        8. Step-by-step derivation
          1. lower--.f64N/A

            \[\leadsto 1 - \frac{1}{\color{blue}{x}} \]
          2. lower-/.f6438.3%

            \[\leadsto 1 - \frac{1}{x} \]
        9. Applied rewrites38.3%

          \[\leadsto 1 - \color{blue}{\frac{1}{x}} \]
        10. Add Preprocessing

        Alternative 8: 75.1% accurate, 3.3× speedup?

        \[\mathsf{copysign}\left(1, t\right) \cdot \frac{1.4142135623730951}{\sqrt{2}} \]
        (FPCore (x l t)
         :precision binary64
         (* (copysign 1.0 t) (/ 1.4142135623730951 (sqrt 2.0))))
        double code(double x, double l, double t) {
        	return copysign(1.0, t) * (1.4142135623730951 / sqrt(2.0));
        }
        
        public static double code(double x, double l, double t) {
        	return Math.copySign(1.0, t) * (1.4142135623730951 / Math.sqrt(2.0));
        }
        
        def code(x, l, t):
        	return math.copysign(1.0, t) * (1.4142135623730951 / math.sqrt(2.0))
        
        function code(x, l, t)
        	return Float64(copysign(1.0, t) * Float64(1.4142135623730951 / sqrt(2.0)))
        end
        
        function tmp = code(x, l, t)
        	tmp = (sign(t) * abs(1.0)) * (1.4142135623730951 / sqrt(2.0));
        end
        
        code[x_, l_, t_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(1.4142135623730951 / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
        
        \mathsf{copysign}\left(1, t\right) \cdot \frac{1.4142135623730951}{\sqrt{2}}
        
        Derivation
        1. Initial program 32.8%

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

          \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}}} \]
          2. lower-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{\color{blue}{2 \cdot \frac{1 + x}{x - 1}}}} \]
          3. lower-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          5. lower-/.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          6. lower-+.f64N/A

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
          7. lower--.f6438.6%

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{1 + x}{x - 1}}} \]
        4. Applied rewrites38.6%

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

          \[\leadsto \frac{\sqrt{2}}{\sqrt{2}} \]
        6. Step-by-step derivation
          1. Applied rewrites38.0%

            \[\leadsto \frac{\sqrt{2}}{\sqrt{2}} \]
          2. Evaluated real constant38.0%

            \[\leadsto \frac{1.4142135623730951}{\sqrt{\color{blue}{2}}} \]
          3. Add Preprocessing

          Reproduce

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