Toniolo and Linder, Equation (7)

?

Percentage Accurate: 33.1% → 82.5%
Time: 32.5s
Precision: binary64
Cost: 40652

?

\[\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 := \mathsf{fma}\left(t \cdot 2, t, \ell \cdot \ell\right)\\ t_2 := t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{t_1}{x}\right)}}\\ \mathbf{if}\;t \leq -1.05 \cdot 10^{+14}:\\ \;\;\;\;\frac{\sqrt{2}}{\left(-\sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-215}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-164}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\ell \cdot \ell + \mathsf{fma}\left(2, t \cdot t, t_1\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+85}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{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 (fma (* t 2.0) t (* l l)))
        (t_2
         (*
          t
          (/
           (sqrt 2.0)
           (sqrt
            (+
             (/ (* l l) x)
             (+ (* 2.0 (+ (* t t) (/ (* t t) x))) (/ t_1 x))))))))
   (if (<= t -1.05e+14)
     (/ (sqrt 2.0) (* (- (sqrt 2.0)) (sqrt (/ (+ x 1.0) (+ x -1.0)))))
     (if (<= t 7.8e-215)
       t_2
       (if (<= t 3.1e-164)
         (*
          t
          (/
           (sqrt 2.0)
           (fma
            0.5
            (/ (+ (* l l) (fma 2.0 (* t t) t_1)) (* (sqrt 2.0) (* t x)))
            (* t (sqrt 2.0)))))
         (if (<= t 1.8e+85) t_2 (/ (sqrt 2.0) (sqrt 2.0))))))))
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 = fma((t * 2.0), t, (l * l));
	double t_2 = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (t_1 / x)))));
	double tmp;
	if (t <= -1.05e+14) {
		tmp = sqrt(2.0) / (-sqrt(2.0) * sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= 7.8e-215) {
		tmp = t_2;
	} else if (t <= 3.1e-164) {
		tmp = t * (sqrt(2.0) / fma(0.5, (((l * l) + fma(2.0, (t * t), t_1)) / (sqrt(2.0) * (t * x))), (t * sqrt(2.0))));
	} else if (t <= 1.8e+85) {
		tmp = t_2;
	} else {
		tmp = sqrt(2.0) / sqrt(2.0);
	}
	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 = fma(Float64(t * 2.0), t, Float64(l * l))
	t_2 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(t_1 / x))))))
	tmp = 0.0
	if (t <= -1.05e+14)
		tmp = Float64(sqrt(2.0) / Float64(Float64(-sqrt(2.0)) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))));
	elseif (t <= 7.8e-215)
		tmp = t_2;
	elseif (t <= 3.1e-164)
		tmp = Float64(t * Float64(sqrt(2.0) / fma(0.5, Float64(Float64(Float64(l * l) + fma(2.0, Float64(t * t), t_1)) / Float64(sqrt(2.0) * Float64(t * x))), Float64(t * sqrt(2.0)))));
	elseif (t <= 1.8e+85)
		tmp = t_2;
	else
		tmp = Float64(sqrt(2.0) / sqrt(2.0));
	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[(t * 2.0), $MachinePrecision] * t + N[(l * l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e+14], N[(N[Sqrt[2.0], $MachinePrecision] / N[((-N[Sqrt[2.0], $MachinePrecision]) * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-215], t$95$2, If[LessEqual[t, 3.1e-164], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.5 * N[(N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+85], t$95$2, N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[2.0], $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}}
\begin{array}{l}
t_1 := \mathsf{fma}\left(t \cdot 2, t, \ell \cdot \ell\right)\\
t_2 := t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{t_1}{x}\right)}}\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{+14}:\\
\;\;\;\;\frac{\sqrt{2}}{\left(-\sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\

\mathbf{elif}\;t \leq 7.8 \cdot 10^{-215}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 1.8 \cdot 10^{+85}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2}}\\


\end{array}

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.

Herbie found 5 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

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.

Bogosity?

Bogosity

Derivation?

  1. Split input into 4 regimes
  2. if t < -1.05e14

    1. Initial program 41.9%

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

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

      [Start]41.9%

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

      associate-/l* [=>]41.9%

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

      fma-neg [=>]41.9%

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

      remove-double-neg [<=]41.9%

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

      fma-neg [<=]41.9%

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

      sub-neg [=>]41.9%

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

      metadata-eval [=>]41.9%

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

      remove-double-neg [=>]41.9%

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

      fma-def [=>]41.9%

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

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

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

      [Start]95.0%

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

      associate-*r* [=>]95.0%

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

      neg-mul-1 [<=]95.0%

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

      +-commutative [<=]95.0%

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

      sub-neg [=>]95.0%

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

      metadata-eval [=>]95.0%

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

      +-commutative [=>]95.0%

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

    if -1.05e14 < t < 7.7999999999999999e-215 or 3.1000000000000001e-164 < t < 1.7999999999999999e85

    1. Initial program 37.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. Simplified37.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]37.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/ [<=]37.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 79.6%

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

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

      [Start]79.6%

      \[ \frac{\sqrt{2}}{\sqrt{\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 \]

      associate--l+ [=>]79.6%

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

      unpow2 [=>]79.6%

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

      distribute-lft-out [=>]79.6%

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

      unpow2 [=>]79.6%

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

      unpow2 [=>]79.6%

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

      associate-*r/ [=>]79.6%

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

      mul-1-neg [=>]79.6%

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

      +-commutative [=>]79.6%

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

      unpow2 [=>]79.6%

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

      associate-*l* [<=]79.6%

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

      unpow2 [=>]79.6%

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

      fma-udef [<=]79.6%

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

    if 7.7999999999999999e-215 < t < 3.1000000000000001e-164

    1. Initial program 2.8%

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

      \[\leadsto \color{blue}{\frac{\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]2.8%

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

      associate-*l/ [<=]2.8%

      \[ \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 66.0%

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

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

      [Start]66.0%

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

      fma-def [=>]66.0%

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

    if 1.7999999999999999e85 < 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.4%

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

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

      fma-neg [=>]26.4%

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

      remove-double-neg [<=]26.4%

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

      fma-neg [<=]26.4%

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

      sub-neg [=>]26.4%

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

      metadata-eval [=>]26.4%

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

      remove-double-neg [=>]26.4%

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

      fma-def [=>]26.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+14}:\\ \;\;\;\;\frac{\sqrt{2}}{\left(-\sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-215}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(t \cdot 2, t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-164}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\ell \cdot \ell + \mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(t \cdot 2, t, \ell \cdot \ell\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(t \cdot 2, t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{2}}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy82.5%
Cost40652
\[\begin{array}{l} t_1 := \mathsf{fma}\left(t \cdot 2, t, \ell \cdot \ell\right)\\ t_2 := t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{t_1}{x}\right)}}\\ \mathbf{if}\;t \leq -1.05 \cdot 10^{+14}:\\ \;\;\;\;\frac{\sqrt{2}}{\left(-\sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-215}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-164}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\ell \cdot \ell + \mathsf{fma}\left(2, t \cdot t, t_1\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+85}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{2}}\\ \end{array} \]
Alternative 2
Accuracy82.0%
Cost21713
\[\begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+14}:\\ \;\;\;\;\frac{\sqrt{2}}{\left(-\sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{-214} \lor \neg \left(t \leq 3.4 \cdot 10^{-164}\right) \land t \leq 4.4 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(t \cdot 2, t, \ell \cdot \ell\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{2}}\\ \end{array} \]
Alternative 3
Accuracy75.7%
Cost20100
\[\begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{\sqrt{2}}{\left(-\sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{2}}\\ \end{array} \]
Alternative 4
Accuracy56.6%
Cost13508
\[\begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-308}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{2}}\\ \end{array} \]
Alternative 5
Accuracy37.6%
Cost12992
\[\frac{\sqrt{2}}{\sqrt{2}} \]

Reproduce?

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