Toniolo and Linder, Equation (7)

?

Percentage Accurate: 34.1% → 82.9%
Time: 32.1s
Precision: binary64
Cost: 28240

?

\[\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}} \]
\[\begin{array}{l} t_1 := \frac{\ell \cdot \ell}{x}\\ t_2 := \sqrt{\frac{-1 + x}{x + 1}}\\ t_3 := -t_2\\ t_4 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\ t_5 := 2 + \left(\frac{2}{x} + \frac{2}{x}\right)\\ \mathbf{if}\;t \leq -8.5 \cdot 10^{-37}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-167}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{t_1 + \left(t_4 + \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \frac{1}{x}\right)}{2}}}\\ \mathbf{elif}\;t \leq -5.9 \cdot 10^{-282}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-164}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(t, \sqrt{t_5}, \sqrt{\frac{1}{t_5}} \cdot \left(\frac{\ell}{x} \cdot \frac{\ell}{t}\right)\right)}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+16}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{t_1 + \left(t_1 + t_4\right)}{2}}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
(FPCore (x l t)
 :precision binary64
 (/
  (* (sqrt 2.0) t)
  (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (/ (* l l) x))
        (t_2 (sqrt (/ (+ -1.0 x) (+ x 1.0))))
        (t_3 (- t_2))
        (t_4 (* 2.0 (+ (* t t) (/ (* t t) x))))
        (t_5 (+ 2.0 (+ (/ 2.0 x) (/ 2.0 x)))))
   (if (<= t -8.5e-37)
     t_3
     (if (<= t -1.8e-167)
       (/
        t
        (sqrt (/ (+ t_1 (+ t_4 (* (fma 2.0 (* t t) (* l l)) (/ 1.0 x)))) 2.0)))
       (if (<= t -5.9e-282)
         t_3
         (if (<= t 5.5e-164)
           (*
            t
            (/
             (sqrt 2.0)
             (fma t (sqrt t_5) (* (sqrt (/ 1.0 t_5)) (* (/ l x) (/ l t))))))
           (if (<= t 2e+16) (/ t (sqrt (/ (+ t_1 (+ t_1 t_4)) 2.0))) t_2)))))))
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)));
}
double code(double x, double l, double t) {
	double t_1 = (l * l) / x;
	double t_2 = sqrt(((-1.0 + x) / (x + 1.0)));
	double t_3 = -t_2;
	double t_4 = 2.0 * ((t * t) + ((t * t) / x));
	double t_5 = 2.0 + ((2.0 / x) + (2.0 / x));
	double tmp;
	if (t <= -8.5e-37) {
		tmp = t_3;
	} else if (t <= -1.8e-167) {
		tmp = t / sqrt(((t_1 + (t_4 + (fma(2.0, (t * t), (l * l)) * (1.0 / x)))) / 2.0));
	} else if (t <= -5.9e-282) {
		tmp = t_3;
	} else if (t <= 5.5e-164) {
		tmp = t * (sqrt(2.0) / fma(t, sqrt(t_5), (sqrt((1.0 / t_5)) * ((l / x) * (l / t)))));
	} else if (t <= 2e+16) {
		tmp = t / sqrt(((t_1 + (t_1 + t_4)) / 2.0));
	} else {
		tmp = t_2;
	}
	return tmp;
}
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 code(x, l, t)
	t_1 = Float64(Float64(l * l) / x)
	t_2 = sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0)))
	t_3 = Float64(-t_2)
	t_4 = Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x)))
	t_5 = Float64(2.0 + Float64(Float64(2.0 / x) + Float64(2.0 / x)))
	tmp = 0.0
	if (t <= -8.5e-37)
		tmp = t_3;
	elseif (t <= -1.8e-167)
		tmp = Float64(t / sqrt(Float64(Float64(t_1 + Float64(t_4 + Float64(fma(2.0, Float64(t * t), Float64(l * l)) * Float64(1.0 / x)))) / 2.0)));
	elseif (t <= -5.9e-282)
		tmp = t_3;
	elseif (t <= 5.5e-164)
		tmp = Float64(t * Float64(sqrt(2.0) / fma(t, sqrt(t_5), Float64(sqrt(Float64(1.0 / t_5)) * Float64(Float64(l / x) * Float64(l / t))))));
	elseif (t <= 2e+16)
		tmp = Float64(t / sqrt(Float64(Float64(t_1 + Float64(t_1 + t_4)) / 2.0)));
	else
		tmp = t_2;
	end
	return tmp
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]
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = (-t$95$2)}, Block[{t$95$4 = N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(2.0 + N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e-37], t$95$3, If[LessEqual[t, -1.8e-167], N[(t / N[Sqrt[N[(N[(t$95$1 + N[(t$95$4 + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.9e-282], t$95$3, If[LessEqual[t, 5.5e-164], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(t * N[Sqrt[t$95$5], $MachinePrecision] + N[(N[Sqrt[N[(1.0 / t$95$5), $MachinePrecision]], $MachinePrecision] * N[(N[(l / x), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e+16], N[(t / N[Sqrt[N[(N[(t$95$1 + N[(t$95$1 + t$95$4), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{x}\\
t_2 := \sqrt{\frac{-1 + x}{x + 1}}\\
t_3 := -t_2\\
t_4 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\
t_5 := 2 + \left(\frac{2}{x} + \frac{2}{x}\right)\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{-37}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -1.8 \cdot 10^{-167}:\\
\;\;\;\;\frac{t}{\sqrt{\frac{t_1 + \left(t_4 + \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \frac{1}{x}\right)}{2}}}\\

\mathbf{elif}\;t \leq -5.9 \cdot 10^{-282}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;t \leq 2 \cdot 10^{+16}:\\
\;\;\;\;\frac{t}{\sqrt{\frac{t_1 + \left(t_1 + t_4\right)}{2}}}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}

Local Percentage Accuracy?

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.

Herbie found 13 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

The accuracy (vertical axis) and speed (horizontal axis) of each of Herbie's proposed alternatives. Up and to the right is better. Each dot represents an alternative program; the red square represents the initial program.

Bogosity?

Bogosity

Derivation?

  1. Split input into 5 regimes
  2. if t < -8.5000000000000007e-37 or -1.8e-167 < t < -5.8999999999999997e-282

    1. Initial program 40.0%

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

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

      [Start]40.0

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

      associate-*l/ [<=]39.9

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

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

      [Start]39.9

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

      *-commutative [=>]39.9

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

      clear-num [=>]39.9

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

      un-div-inv [=>]39.9

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

      sqrt-undiv [=>]40.1

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

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

      \[\leadsto \color{blue}{-\sqrt{\frac{-1 + x}{x + 1}}} \]
      Step-by-step derivation

      [Start]88.2

      \[ -1 \cdot \sqrt{\frac{x - 1}{1 + x}} \]

      mul-1-neg [=>]88.2

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

      +-commutative [<=]88.2

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

      sub-neg [=>]88.2

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

      metadata-eval [=>]88.2

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

      +-commutative [=>]88.2

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

    if -8.5000000000000007e-37 < t < -1.8e-167

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

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

      [Start]52.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}} \]

      associate-*l/ [<=]52.9

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

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

      [Start]52.9

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

      *-commutative [=>]52.9

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

      clear-num [=>]52.8

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

      un-div-inv [=>]52.9

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

      sqrt-undiv [=>]53.1

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

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

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

      [Start]86.3

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

      associate--l+ [=>]86.3

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

      unpow2 [=>]86.3

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

      distribute-lft-out [=>]86.3

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

      unpow2 [=>]86.3

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

      unpow2 [=>]86.3

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

      mul-1-neg [=>]86.3

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

      unpow2 [=>]86.3

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

      +-commutative [=>]86.3

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

      unpow2 [=>]86.3

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

      fma-udef [<=]86.3

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

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

      [Start]86.3

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

      div-inv [=>]86.4

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

    if -5.8999999999999997e-282 < t < 5.50000000000000027e-164

    1. Initial program 6.5%

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

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

      [Start]6.5

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

      associate-*l/ [<=]6.5

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

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

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

      [Start]26.3

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

      associate--l+ [=>]26.3

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

      unpow2 [=>]26.3

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

      distribute-lft-out [=>]26.3

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

      unpow2 [=>]26.3

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

      unpow2 [=>]26.3

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

      mul-1-neg [=>]26.3

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

      unpow2 [=>]26.3

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

      +-commutative [=>]26.3

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

      unpow2 [=>]26.3

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

      fma-udef [<=]26.3

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

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

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

      [Start]69.8

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

      *-commutative [<=]69.8

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

      fma-def [=>]69.8

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

      distribute-lft-in [=>]69.8

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

      metadata-eval [=>]69.8

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

      associate-+l+ [=>]69.8

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

      associate-*r/ [=>]69.8

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

      metadata-eval [=>]69.8

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

      associate-*r/ [=>]69.8

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

      metadata-eval [=>]69.8

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

    if 5.50000000000000027e-164 < t < 2e16

    1. Initial program 42.4%

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

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

      [Start]42.4

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

      associate-*l/ [<=]42.6

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

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

      [Start]42.6

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

      *-commutative [=>]42.6

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

      clear-num [=>]42.6

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

      un-div-inv [=>]42.5

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

      sqrt-undiv [=>]42.7

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

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

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

      [Start]81.4

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

      associate--l+ [=>]81.4

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

      unpow2 [=>]81.4

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

      distribute-lft-out [=>]81.4

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

      unpow2 [=>]81.4

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

      unpow2 [=>]81.4

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

      mul-1-neg [=>]81.4

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

      unpow2 [=>]81.4

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

      +-commutative [=>]81.4

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

      unpow2 [=>]81.4

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

      fma-udef [<=]81.4

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

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

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

      [Start]81.4

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

      unpow2 [=>]81.4

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

    if 2e16 < t

    1. Initial program 26.4%

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

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

      [Start]26.4

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

      associate-*l/ [<=]26.5

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

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

      [Start]26.5

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

      *-commutative [=>]26.5

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

      clear-num [=>]26.5

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

      un-div-inv [=>]26.5

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

      sqrt-undiv [=>]26.7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.5 \cdot 10^{-37}:\\ \;\;\;\;-\sqrt{\frac{-1 + x}{x + 1}}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-167}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \frac{1}{x}\right)}{2}}}\\ \mathbf{elif}\;t \leq -5.9 \cdot 10^{-282}:\\ \;\;\;\;-\sqrt{\frac{-1 + x}{x + 1}}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-164}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(t, \sqrt{2 + \left(\frac{2}{x} + \frac{2}{x}\right)}, \sqrt{\frac{1}{2 + \left(\frac{2}{x} + \frac{2}{x}\right)}} \cdot \left(\frac{\ell}{x} \cdot \frac{\ell}{t}\right)\right)}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+16}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{\frac{\ell \cdot \ell}{x} + \left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}{2}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{x + 1}}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy81.3%
Cost15176
\[\begin{array}{l} t_1 := \frac{\ell \cdot \ell}{x}\\ t_2 := \sqrt{\frac{-1 + x}{x + 1}}\\ t_3 := -t_2\\ t_4 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\ \mathbf{if}\;t \leq -1 \cdot 10^{-36}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-167}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{t_1 + \left(t_4 + \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right) \cdot \frac{1}{x}\right)}{2}}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-166}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+14}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{t_1 + \left(t_1 + t_4\right)}{2}}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Accuracy81.3%
Cost15048
\[\begin{array}{l} t_1 := \frac{\ell \cdot \ell}{x}\\ t_2 := \sqrt{\frac{-1 + x}{x + 1}}\\ t_3 := -t_2\\ t_4 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\ \mathbf{if}\;t \leq -1 \cdot 10^{-36}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-167}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{t_1 + \left(t_4 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}{2}}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-164}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+20}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{t_1 + \left(t_1 + t_4\right)}{2}}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Accuracy81.2%
Cost8788
\[\begin{array}{l} t_1 := \frac{t}{\sqrt{\frac{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \ell \cdot \frac{\ell}{x}\right)}{2}}}\\ t_2 := \sqrt{\frac{-1 + x}{x + 1}}\\ t_3 := -t_2\\ \mathbf{if}\;t \leq -1 \cdot 10^{-36}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-167}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-164}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+16}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Accuracy81.2%
Cost8788
\[\begin{array}{l} t_1 := \frac{\ell \cdot \ell}{x}\\ t_2 := \sqrt{\frac{-1 + x}{x + 1}}\\ t_3 := -t_2\\ t_4 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\ \mathbf{if}\;t \leq -1 \cdot 10^{-36}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-167}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{t_1 + \left(t_4 + \ell \cdot \frac{\ell}{x}\right)}{2}}}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-164}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+21}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{t_1 + \left(t_1 + t_4\right)}{2}}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Accuracy77.1%
Cost7044
\[\begin{array}{l} t_1 := \sqrt{\frac{-1 + x}{x + 1}}\\ \mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;-t_1\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Accuracy76.9%
Cost6980
\[\begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;-1 + \left(\frac{1}{x} + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{x + 1}}\\ \end{array} \]
Alternative 7
Accuracy76.5%
Cost836
\[\begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;-1 + \left(\frac{1}{x} + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]
Alternative 8
Accuracy76.6%
Cost836
\[\begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;-1 + \left(\frac{1}{x} + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{x \cdot x} + \left(1 + \frac{-1}{x}\right)\\ \end{array} \]
Alternative 9
Accuracy76.1%
Cost452
\[\begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 10
Accuracy76.4%
Cost452
\[\begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]
Alternative 11
Accuracy75.8%
Cost196
\[\begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 12
Accuracy38.8%
Cost64
\[-1 \]

Reproduce?

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