?

Average Error: 43.1 → 9.2
Time: 28.7s
Precision: binary64
Cost: 27596

?

\[\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(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{if}\;t \leq -1.45 \cdot 10^{-12}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\frac{x + 1}{x + -1}} \cdot \left(t \cdot \left(-\sqrt{2}\right)\right)}\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-297}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.36 \cdot 10^{-173}:\\ \;\;\;\;\sqrt{2 \cdot \frac{t}{\mathsf{fma}\left(2, t, \mathsf{fma}\left(2, \frac{\ell}{\frac{t \cdot x}{\ell}}, \mathsf{fma}\left(4, \frac{t}{x}, \frac{\ell \cdot \ell}{\frac{t}{2}}\right)\right)\right)}}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+97}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \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 (+ (/ l (/ x l)) (* t t))))))))
   (if (<= t -1.45e-12)
     (/
      (* t (sqrt 2.0))
      (* (sqrt (/ (+ x 1.0) (+ x -1.0))) (* t (- (sqrt 2.0)))))
     (if (<= t 4.1e-297)
       t_1
       (if (<= t 1.36e-173)
         (sqrt
          (*
           2.0
           (/
            t
            (fma
             2.0
             t
             (fma
              2.0
              (/ l (/ (* t x) l))
              (fma 4.0 (/ t x) (/ (* l l) (/ t 2.0))))))))
         (if (<= t 1.12e+97) t_1 (+ 1.0 (+ (/ 0.5 (* x x)) (/ -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 * ((l / (x / l)) + (t * t)))));
	double tmp;
	if (t <= -1.45e-12) {
		tmp = (t * sqrt(2.0)) / (sqrt(((x + 1.0) / (x + -1.0))) * (t * -sqrt(2.0)));
	} else if (t <= 4.1e-297) {
		tmp = t_1;
	} else if (t <= 1.36e-173) {
		tmp = sqrt((2.0 * (t / fma(2.0, t, fma(2.0, (l / ((t * x) / l)), fma(4.0, (t / x), ((l * l) / (t / 2.0))))))));
	} else if (t <= 1.12e+97) {
		tmp = t_1;
	} else {
		tmp = 1.0 + ((0.5 / (x * x)) + (-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(l / Float64(x / l)) + Float64(t * t))))))
	tmp = 0.0
	if (t <= -1.45e-12)
		tmp = Float64(Float64(t * sqrt(2.0)) / Float64(sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))) * Float64(t * Float64(-sqrt(2.0)))));
	elseif (t <= 4.1e-297)
		tmp = t_1;
	elseif (t <= 1.36e-173)
		tmp = sqrt(Float64(2.0 * Float64(t / fma(2.0, t, fma(2.0, Float64(l / Float64(Float64(t * x) / l)), fma(4.0, Float64(t / x), Float64(Float64(l * l) / Float64(t / 2.0))))))));
	elseif (t <= 1.12e+97)
		tmp = t_1;
	else
		tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + 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[(l / N[(x / l), $MachinePrecision]), $MachinePrecision] + N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e-12], N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e-297], t$95$1, If[LessEqual[t, 1.36e-173], N[Sqrt[N[(2.0 * N[(t / N[(2.0 * t + N[(2.0 * N[(l / N[(N[(t * x), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(t / x), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] / N[(t / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.12e+97], t$95$1, N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $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}}
\begin{array}{l}
t_1 := \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{-12}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\frac{x + 1}{x + -1}} \cdot \left(t \cdot \left(-\sqrt{2}\right)\right)}\\

\mathbf{elif}\;t \leq 4.1 \cdot 10^{-297}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.12 \cdot 10^{+97}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\


\end{array}

Error?

Derivation?

  1. Split input into 4 regimes
  2. if t < -1.4500000000000001e-12

    1. Initial program 41.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 4.7

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

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

      [Start]4.7

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

      mul-1-neg [=>]4.7

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

      *-commutative [<=]4.7

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

      sub-neg [=>]4.7

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

      metadata-eval [=>]4.7

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

      +-commutative [=>]4.7

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

      +-commutative [=>]4.7

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

    if -1.4500000000000001e-12 < t < 4.1000000000000002e-297 or 1.3600000000000001e-173 < t < 1.12e97

    1. Initial program 37.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. Simplified43.9

      \[\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]37.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/ [<=]37.2

      \[ \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/ [=>]39.8

      \[ \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/ [<=]44.6

      \[ \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 [<=]44.6

      \[ \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* [<=]44.6

      \[ \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 [<=]44.6

      \[ \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* [=>]44.6

      \[ \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 [<=]44.6

      \[ \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 [=>]43.9

      \[ \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 16.5

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

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

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

      distribute-lft-out [=>]16.5

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

      +-commutative [=>]16.5

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

      unpow2 [=>]16.5

      \[ \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 [<=]16.5

      \[ \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 [=>]16.5

      \[ \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 [=>]16.5

      \[ \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 16.9

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

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

      [Start]16.9

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

      unpow2 [=>]16.9

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

      associate-/l* [=>]12.4

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

    if 4.1000000000000002e-297 < t < 1.3600000000000001e-173

    1. Initial program 63.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. Simplified62.2

      \[\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]63.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-*r/ [<=]63.5

      \[ \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/ [=>]61.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/ [<=]63.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 [<=]63.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* [<=]63.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 [<=]63.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* [=>]63.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 [<=]63.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 [=>]62.2

      \[ \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. Applied egg-rr48.7

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

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

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

      [Start]27.2

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

      fma-def [=>]27.2

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

      fma-def [=>]27.2

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

      unpow2 [=>]27.2

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

      associate-/l* [=>]25.2

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

      fma-def [=>]25.2

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

      associate-*r/ [=>]25.2

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

      *-commutative [=>]25.2

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

      associate-/l* [=>]25.2

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

      unpow2 [=>]25.2

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

    if 1.12e97 < t

    1. Initial program 50.2

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

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

      associate-*r/ [<=]50.2

      \[ \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/ [=>]60.0

      \[ \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/ [<=]50.2

      \[ \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 [<=]50.2

      \[ \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* [<=]50.2

      \[ \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 [<=]50.2

      \[ \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* [=>]50.2

      \[ \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 [<=]50.2

      \[ \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 [=>]50.2

      \[ \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 t around inf 3.5

      \[\leadsto \color{blue}{\left(\sqrt{2} \cdot \sqrt{0.5}\right) \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    4. Applied egg-rr2.6

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

      \[\leadsto 1 \cdot \color{blue}{\left(\left(1 + 0.5 \cdot \frac{1}{{x}^{2}}\right) - \frac{1}{x}\right)} \]
    6. Simplified3.0

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

      [Start]3.0

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

      associate--l+ [=>]3.0

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

      associate-*r/ [=>]3.0

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

      metadata-eval [=>]3.0

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

      unpow2 [=>]3.0

      \[ 1 \cdot \left(1 + \left(\frac{0.5}{\color{blue}{x \cdot x}} - \frac{1}{x}\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification9.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-12}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\frac{x + 1}{x + -1}} \cdot \left(t \cdot \left(-\sqrt{2}\right)\right)}\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{elif}\;t \leq 1.36 \cdot 10^{-173}:\\ \;\;\;\;\sqrt{2 \cdot \frac{t}{\mathsf{fma}\left(2, t, \mathsf{fma}\left(2, \frac{\ell}{\frac{t \cdot x}{\ell}}, \mathsf{fma}\left(4, \frac{t}{x}, \frac{\ell \cdot \ell}{\frac{t}{2}}\right)\right)\right)}}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+97}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]

Alternatives

Alternative 1
Error9.9
Cost20356
\[\begin{array}{l} t_1 := \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{-12}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\frac{x + 1}{x + -1}} \cdot \left(t \cdot \left(-\sqrt{2}\right)\right)}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-298}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.18 \cdot 10^{-250}:\\ \;\;\;\;\frac{t}{\ell} \cdot \left(-\sqrt{x}\right)\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+97}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]
Alternative 2
Error9.9
Cost20356
\[\begin{array}{l} t_1 := \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{-12}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\frac{x + 1}{x + -1}} \cdot \left(t \cdot \left(-\sqrt{2}\right)\right)}\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{-297}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-249}:\\ \;\;\;\;\frac{t}{\ell} \cdot \left(-\sqrt{x}\right)\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+97}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]
Alternative 3
Error9.9
Cost14288
\[\begin{array}{l} t_1 := \sqrt{2} \cdot \frac{t}{\sqrt{2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{-12}:\\ \;\;\;\;-1 + \left(\frac{0.5}{{x}^{3}} + \left(\frac{1}{x} + \frac{-0.5}{x \cdot x}\right)\right)\\ \mathbf{elif}\;t \leq 1.24 \cdot 10^{-297}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-249}:\\ \;\;\;\;\frac{t}{\ell} \cdot \left(-\sqrt{x}\right)\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+97}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]
Alternative 4
Error13.8
Cost13768
\[\begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{-204}:\\ \;\;\;\;-1 + \left(\frac{0.5}{{x}^{3}} + \left(\frac{1}{x} + \frac{-0.5}{x \cdot x}\right)\right)\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-183}:\\ \;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{\frac{2 \cdot \left(\ell \cdot \ell\right)}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]
Alternative 5
Error13.5
Cost13768
\[\begin{array}{l} \mathbf{if}\;t \leq -1.95 \cdot 10^{-203}:\\ \;\;\;\;-1 + \left(\frac{0.5}{{x}^{3}} + \left(\frac{1}{x} + \frac{-0.5}{x \cdot x}\right)\right)\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-167}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\frac{\ell}{x} \cdot \left(\ell + \ell\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]
Alternative 6
Error14.4
Cost7556
\[\begin{array}{l} \mathbf{if}\;t \leq -6.1 \cdot 10^{-251}:\\ \;\;\;\;-1 + \left(\frac{0.5}{{x}^{3}} + \left(\frac{1}{x} + \frac{-0.5}{x \cdot x}\right)\right)\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-224}:\\ \;\;\;\;\frac{-\sqrt{x}}{\frac{\ell}{t}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]
Alternative 7
Error14.4
Cost7112
\[\begin{array}{l} \mathbf{if}\;t \leq -6.1 \cdot 10^{-251}:\\ \;\;\;\;-1 + \left(\frac{1}{x} + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-225}:\\ \;\;\;\;\frac{-\sqrt{x}}{\frac{\ell}{t}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\ \end{array} \]
Alternative 8
Error14.6
Cost7048
\[\begin{array}{l} \mathbf{if}\;t \leq -5.6 \cdot 10^{-251}:\\ \;\;\;\;-1 + \left(\frac{1}{x} + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-225}:\\ \;\;\;\;\frac{t}{\ell} \cdot \left(-\sqrt{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{x \cdot x} + \left(1 + \frac{-1}{x}\right)\\ \end{array} \]
Alternative 9
Error14.6
Cost7048
\[\begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-251}:\\ \;\;\;\;-1 + \left(\frac{1}{x} + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{-224}:\\ \;\;\;\;\frac{-\sqrt{x}}{\frac{\ell}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{x \cdot x} + \left(1 + \frac{-1}{x}\right)\\ \end{array} \]
Alternative 10
Error14.1
Cost6984
\[\begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{-193}:\\ \;\;\;\;-1 + \left(\frac{1}{x} + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{-224}:\\ \;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{x \cdot x} + \left(1 + \frac{-1}{x}\right)\\ \end{array} \]
Alternative 11
Error14.9
Cost836
\[\begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\ \;\;\;\;-1 + \left(\frac{1}{x} + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]
Alternative 12
Error14.9
Cost836
\[\begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\ \;\;\;\;-1 + \left(\frac{1}{x} + \frac{-0.5}{x \cdot x}\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\ \end{array} \]
Alternative 13
Error14.9
Cost836
\[\begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\ \;\;\;\;-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 14
Error15.2
Cost452
\[\begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 15
Error15.0
Cost452
\[\begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x}\\ \end{array} \]
Alternative 16
Error15.5
Cost196
\[\begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 17
Error39.4
Cost64
\[-1 \]

Error

Reproduce?

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