?

Average Error: 43.1 → 5.0
Time: 27.9s
Precision: binary64
Cost: 20364

?

\[\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 := \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \left(1 + \frac{2}{x}\right) + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{if}\;t \leq -9 \cdot 10^{+149}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-139}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-144}:\\ \;\;\;\;\frac{t}{\mathsf{hypot}\left(t, \sqrt{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}\right)}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+134}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \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
         (*
          (sqrt 2.0)
          (/
           t
           (sqrt (* 2.0 (+ (* (* t t) (+ 1.0 (/ 2.0 x))) (/ l (/ x l)))))))))
   (if (<= t -9e+149)
     -1.0
     (if (<= t -7e-139)
       t_1
       (if (<= t 1.9e-144)
         (/ t (hypot t (sqrt (/ (fma 2.0 (* t t) (* l l)) x))))
         (if (<= t 2e+134) t_1 (+ 1.0 (/ -1.0 x))))))))
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 = sqrt(2.0) * (t / sqrt((2.0 * (((t * t) * (1.0 + (2.0 / x))) + (l / (x / l))))));
	double tmp;
	if (t <= -9e+149) {
		tmp = -1.0;
	} else if (t <= -7e-139) {
		tmp = t_1;
	} else if (t <= 1.9e-144) {
		tmp = t / hypot(t, sqrt((fma(2.0, (t * t), (l * l)) / x)));
	} else if (t <= 2e+134) {
		tmp = t_1;
	} else {
		tmp = 1.0 + (-1.0 / x);
	}
	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(sqrt(2.0) * Float64(t / sqrt(Float64(2.0 * Float64(Float64(Float64(t * t) * Float64(1.0 + Float64(2.0 / x))) + Float64(l / Float64(x / l)))))))
	tmp = 0.0
	if (t <= -9e+149)
		tmp = -1.0;
	elseif (t <= -7e-139)
		tmp = t_1;
	elseif (t <= 1.9e-144)
		tmp = Float64(t / hypot(t, sqrt(Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x))));
	elseif (t <= 2e+134)
		tmp = t_1;
	else
		tmp = Float64(1.0 + Float64(-1.0 / x));
	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[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(2.0 * N[(N[(N[(t * t), $MachinePrecision] * N[(1.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+149], -1.0, If[LessEqual[t, -7e-139], t$95$1, If[LessEqual[t, 1.9e-144], N[(t / N[Sqrt[t ^ 2 + N[Sqrt[N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e+134], t$95$1, N[(1.0 + N[(-1.0 / x), $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 := \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \left(1 + \frac{2}{x}\right) + \frac{\ell}{\frac{x}{\ell}}\right)}}\\
\mathbf{if}\;t \leq -9 \cdot 10^{+149}:\\
\;\;\;\;-1\\

\mathbf{elif}\;t \leq -7 \cdot 10^{-139}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2 \cdot 10^{+134}:\\
\;\;\;\;t_1\\

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


\end{array}

Error?

Derivation?

  1. Split input into 4 regimes
  2. if t < -8.99999999999999965e149

    1. Initial program 61.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. Simplified61.0

      \[\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} \]
      Proof

      [Start]61.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/ [<=]61.0

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

      +-commutative [=>]61.0

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

      fma-def [=>]61.0

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

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

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{2}}{\frac{t}{\sqrt{0.5}}}} \cdot t \]
      Proof

      [Start]63.0

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

      *-commutative [=>]63.0

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

      associate-/l* [=>]63.0

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

      associate-*r/ [=>]63.0

      \[ \color{blue}{\frac{\sqrt{\frac{x - 1}{1 + x}} \cdot \sqrt{2}}{\frac{t}{\sqrt{0.5}}}} \cdot t \]

      sub-neg [=>]63.0

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

      metadata-eval [=>]63.0

      \[ \frac{\sqrt{\frac{x + \color{blue}{-1}}{1 + x}} \cdot \sqrt{2}}{\frac{t}{\sqrt{0.5}}} \cdot t \]

      +-commutative [=>]63.0

      \[ \frac{\sqrt{\frac{\color{blue}{-1 + x}}{1 + x}} \cdot \sqrt{2}}{\frac{t}{\sqrt{0.5}}} \cdot t \]

      +-commutative [=>]63.0

      \[ \frac{\sqrt{\frac{-1 + x}{\color{blue}{x + 1}}} \cdot \sqrt{2}}{\frac{t}{\sqrt{0.5}}} \cdot t \]
    5. Applied egg-rr61.9

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

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

      [Start]61.9

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

      associate-/l* [=>]61.9

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

      associate-*l/ [=>]61.9

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

      associate-/l/ [=>]61.9

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

      associate-*l* [=>]61.9

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

      metadata-eval [=>]61.9

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

      \[\leadsto \color{blue}{{\left(\sqrt{-1}\right)}^{2}} \]
    8. Simplified2.3

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

      [Start]64.0

      \[ {\left(\sqrt{-1}\right)}^{2} \]

      unpow2 [=>]64.0

      \[ \color{blue}{\sqrt{-1} \cdot \sqrt{-1}} \]

      rem-square-sqrt [=>]2.3

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

    if -8.99999999999999965e149 < t < -7.00000000000000002e-139 or 1.89999999999999996e-144 < t < 1.99999999999999984e134

    1. Initial program 23.7

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

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

      [Start]23.7

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

      associate-*r/ [<=]23.7

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

      associate-*l/ [=>]35.3

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

      associate-*r/ [<=]29.9

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

      *-lft-identity [<=]29.9

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

      associate-*r* [<=]29.9

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

      *-commutative [<=]29.9

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

      associate-*r* [=>]29.9

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

      *-commutative [<=]29.9

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

      fma-neg [=>]29.4

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    4. Simplified10.3

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

      [Start]10.3

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

      distribute-lft-out [=>]10.3

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

      +-commutative [=>]10.3

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

      unpow2 [=>]10.3

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

      fma-udef [<=]10.3

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

      unpow2 [=>]10.3

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

      unpow2 [=>]10.3

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

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

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

      [Start]10.3

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

      +-commutative [=>]10.3

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

      unpow2 [=>]10.3

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

      associate-*r/ [=>]10.3

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

      metadata-eval [=>]10.3

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

      unpow2 [=>]10.3

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

      associate-/l* [=>]4.9

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

    if -7.00000000000000002e-139 < t < 1.89999999999999996e-144

    1. Initial program 60.1

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

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

      [Start]60.1

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

      associate-*r/ [<=]60.1

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

      associate-*l/ [=>]58.9

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

      associate-*r/ [<=]62.5

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

      *-lft-identity [<=]62.5

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

      associate-*r* [<=]62.5

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

      *-commutative [<=]62.5

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

      associate-*r* [=>]62.5

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

      *-commutative [<=]62.5

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

      fma-neg [=>]61.4

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

      \[\leadsto \sqrt{2} \cdot \frac{t}{\sqrt{\color{blue}{2 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} + 2 \cdot {t}^{2}}}} \]
    4. Simplified30.9

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

      [Start]30.9

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

      distribute-lft-out [=>]30.9

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

      +-commutative [=>]30.9

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

      unpow2 [=>]30.9

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

      fma-udef [<=]30.9

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

      unpow2 [=>]30.9

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

      unpow2 [=>]30.9

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

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

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

      [Start]9.6

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

      *-inverses [=>]9.6

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

    if 1.99999999999999984e134 < t

    1. Initial program 56.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. Simplified56.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} \]
      Proof

      [Start]56.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/ [<=]56.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} \]

      +-commutative [=>]56.9

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

      fma-def [=>]56.9

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

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

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{-1 + x}{x + 1}} \cdot \sqrt{2}}{\frac{t}{\sqrt{0.5}}}} \cdot t \]
      Proof

      [Start]2.7

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

      *-commutative [=>]2.7

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

      associate-/l* [=>]2.3

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

      associate-*r/ [=>]2.3

      \[ \color{blue}{\frac{\sqrt{\frac{x - 1}{1 + x}} \cdot \sqrt{2}}{\frac{t}{\sqrt{0.5}}}} \cdot t \]

      sub-neg [=>]2.3

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

      metadata-eval [=>]2.3

      \[ \frac{\sqrt{\frac{x + \color{blue}{-1}}{1 + x}} \cdot \sqrt{2}}{\frac{t}{\sqrt{0.5}}} \cdot t \]

      +-commutative [=>]2.3

      \[ \frac{\sqrt{\frac{\color{blue}{-1 + x}}{1 + x}} \cdot \sqrt{2}}{\frac{t}{\sqrt{0.5}}} \cdot t \]

      +-commutative [=>]2.3

      \[ \frac{\sqrt{\frac{-1 + x}{\color{blue}{x + 1}}} \cdot \sqrt{2}}{\frac{t}{\sqrt{0.5}}} \cdot t \]
    5. Applied egg-rr61.6

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

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

      [Start]61.6

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

      associate-/l* [=>]61.6

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

      associate-*l/ [=>]61.6

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

      associate-/l/ [=>]61.6

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

      associate-*l* [=>]61.6

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

      metadata-eval [=>]61.6

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{+149}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-139}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \left(1 + \frac{2}{x}\right) + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-144}:\\ \;\;\;\;\frac{t}{\mathsf{hypot}\left(t, \sqrt{\frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}\right)}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+134}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \left(1 + \frac{2}{x}\right) + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]

Alternatives

Alternative 1
Error8.0
Cost20304
\[\begin{array}{l} t_1 := \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \left(1 + \frac{2}{x}\right) + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{if}\;t \leq -5 \cdot 10^{+149}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-159}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-221}:\\ \;\;\;\;\left(\frac{1}{x} + \frac{0.5}{{x}^{3}}\right) + \left(-1 + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-164}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\left|\ell \cdot \sqrt{\frac{2}{x}}\right|}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+135}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]
Alternative 2
Error9.2
Cost14672
\[\begin{array}{l} t_1 := \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\left(t \cdot t\right) \cdot \left(1 + \frac{2}{x}\right) + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{if}\;t \leq -1.9 \cdot 10^{+149}:\\ \;\;\;\;-1\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-159}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-260}:\\ \;\;\;\;\left(\frac{1}{x} + \frac{0.5}{{x}^{3}}\right) + \left(-1 + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 10^{+135}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]
Alternative 3
Error11.5
Cost14288
\[\begin{array}{l} t_1 := \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{x}\right)}}\\ \mathbf{if}\;t \leq -6.8 \cdot 10^{+48}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{elif}\;t \leq -3.55 \cdot 10^{-159}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-261}:\\ \;\;\;\;\left(\frac{1}{x} + \frac{0.5}{{x}^{3}}\right) + \left(-1 + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-29}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{1 + x}}\\ \end{array} \]
Alternative 4
Error14.5
Cost7556
\[\begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{-260}:\\ \;\;\;\;\left(\frac{1}{x} + \frac{0.5}{{x}^{3}}\right) + \left(-1 + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 2.16 \cdot 10^{-94}:\\ \;\;\;\;t \cdot \sqrt{\frac{\frac{x}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{1 + x}}\\ \end{array} \]
Alternative 5
Error14.2
Cost7112
\[\begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{-260}:\\ \;\;\;\;\frac{1}{x} + \left(-1 + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-301}:\\ \;\;\;\;\frac{t \cdot \sqrt{x}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{1 + x}}\\ \end{array} \]
Alternative 6
Error14.5
Cost7112
\[\begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{-260}:\\ \;\;\;\;\frac{1}{x} + \left(-1 + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{-94}:\\ \;\;\;\;t \cdot \sqrt{\frac{\frac{x}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1 + x}{1 + x}}\\ \end{array} \]
Alternative 7
Error14.4
Cost7112
\[\begin{array}{l} t_1 := \sqrt{\frac{-1 + x}{1 + x}}\\ \mathbf{if}\;t \leq -3.15 \cdot 10^{-260}:\\ \;\;\;\;-t_1\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-94}:\\ \;\;\;\;t \cdot \sqrt{\frac{\frac{x}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error14.5
Cost6984
\[\begin{array}{l} \mathbf{if}\;t \leq -3.9 \cdot 10^{-261}:\\ \;\;\;\;\frac{1}{x} + \left(-1 + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-305}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{0.5}{x \cdot x}\right) + \frac{-1}{x}\\ \end{array} \]
Alternative 9
Error14.4
Cost6984
\[\begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{-260}:\\ \;\;\;\;\frac{1}{x} + \left(-1 + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-301}:\\ \;\;\;\;\frac{t \cdot \sqrt{x}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{0.5}{x \cdot x}\right) + \frac{-1}{x}\\ \end{array} \]
Alternative 10
Error14.8
Cost836
\[\begin{array}{l} \mathbf{if}\;t \leq 5 \cdot 10^{-309}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{0.5}{x \cdot x}\right) + \frac{-1}{x}\\ \end{array} \]
Alternative 11
Error14.8
Cost836
\[\begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{-307}:\\ \;\;\;\;\frac{1}{x} + \left(-1 + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{0.5}{x \cdot x}\right) + \frac{-1}{x}\\ \end{array} \]
Alternative 12
Error15.1
Cost452
\[\begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-306}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]
Alternative 13
Error14.9
Cost452
\[\begin{array}{l} \mathbf{if}\;t \leq 5 \cdot 10^{-309}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]
Alternative 14
Error15.3
Cost196
\[\begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-306}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 15
Error39.5
Cost64
\[-1 \]

Error

Reproduce?

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