Average Error: 42.6 → 9.5
Time: 22.6s
Precision: binary64
Cost: 28108
\[\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 := t \cdot \sqrt{\frac{1}{\mathsf{fma}\left(t, t + \frac{t}{x}, \ell \cdot \frac{\ell}{x}\right)}}\\ t_2 := t \cdot \sqrt{2}\\ \mathbf{if}\;t \leq -6.4 \cdot 10^{+44}:\\ \;\;\;\;\frac{t_2}{t_2 \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-259}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-155}:\\ \;\;\;\;\frac{t_2}{\mathsf{fma}\left(0.5, \frac{\ell \cdot \ell + \left(2 \cdot \left(t \cdot t\right) - \left(\left(t \cdot t\right) \cdot -2 - \ell \cdot \ell\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t_2\right)}\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1\\ \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 (* t (sqrt (/ 1.0 (fma t (+ t (/ t x)) (* l (/ l x)))))))
        (t_2 (* t (sqrt 2.0))))
   (if (<= t -6.4e+44)
     (/ t_2 (* t_2 (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
     (if (<= t -2.6e-259)
       t_1
       (if (<= t 7.5e-155)
         (/
          t_2
          (fma
           0.5
           (/
            (+ (* l l) (- (* 2.0 (* t t)) (- (* (* t t) -2.0) (* l l))))
            (* (sqrt 2.0) (* t x)))
           t_2))
         (if (<= t 1.08e+76) t_1 1.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 = t * sqrt((1.0 / fma(t, (t + (t / x)), (l * (l / x)))));
	double t_2 = t * sqrt(2.0);
	double tmp;
	if (t <= -6.4e+44) {
		tmp = t_2 / (t_2 * -sqrt(((x + 1.0) / (x + -1.0))));
	} else if (t <= -2.6e-259) {
		tmp = t_1;
	} else if (t <= 7.5e-155) {
		tmp = t_2 / fma(0.5, (((l * l) + ((2.0 * (t * t)) - (((t * t) * -2.0) - (l * l)))) / (sqrt(2.0) * (t * x))), t_2);
	} else if (t <= 1.08e+76) {
		tmp = t_1;
	} else {
		tmp = 1.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 = Float64(t * sqrt(Float64(1.0 / fma(t, Float64(t + Float64(t / x)), Float64(l * Float64(l / x))))))
	t_2 = Float64(t * sqrt(2.0))
	tmp = 0.0
	if (t <= -6.4e+44)
		tmp = Float64(t_2 / Float64(t_2 * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))));
	elseif (t <= -2.6e-259)
		tmp = t_1;
	elseif (t <= 7.5e-155)
		tmp = Float64(t_2 / fma(0.5, Float64(Float64(Float64(l * l) + Float64(Float64(2.0 * Float64(t * t)) - Float64(Float64(Float64(t * t) * -2.0) - Float64(l * l)))) / Float64(sqrt(2.0) * Float64(t * x))), t_2));
	elseif (t <= 1.08e+76)
		tmp = t_1;
	else
		tmp = 1.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[(t * N[Sqrt[N[(1.0 / N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision] + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.4e+44], N[(t$95$2 / N[(t$95$2 * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.6e-259], t$95$1, If[LessEqual[t, 7.5e-155], N[(t$95$2 / N[(0.5 * N[(N[(N[(l * l), $MachinePrecision] + N[(N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * t), $MachinePrecision] * -2.0), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.08e+76], t$95$1, 1.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}}
\begin{array}{l}
t_1 := t \cdot \sqrt{\frac{1}{\mathsf{fma}\left(t, t + \frac{t}{x}, \ell \cdot \frac{\ell}{x}\right)}}\\
t_2 := t \cdot \sqrt{2}\\
\mathbf{if}\;t \leq -6.4 \cdot 10^{+44}:\\
\;\;\;\;\frac{t_2}{t_2 \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\

\mathbf{elif}\;t \leq -2.6 \cdot 10^{-259}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.08 \cdot 10^{+76}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}

Error

Derivation

  1. Split input into 4 regimes
  2. if t < -6.40000000000000009e44

    1. Initial program 43.3

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

      \[\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. Simplified3.6

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\sqrt{\frac{x + 1}{-1 + x}} \cdot \left(\sqrt{2} \cdot \left(-t\right)\right)}} \]
      Proof
      (*.f64 (sqrt.f64 (/.f64 (+.f64 x 1) (+.f64 -1 x))) (*.f64 (sqrt.f64 2) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sqrt.f64 (/.f64 (+.f64 x 1) (Rewrite<= +-commutative_binary64 (+.f64 x -1)))) (*.f64 (sqrt.f64 2) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sqrt.f64 (/.f64 (+.f64 x 1) (+.f64 x (Rewrite<= metadata-eval (neg.f64 1))))) (*.f64 (sqrt.f64 2) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sqrt.f64 (/.f64 (+.f64 x 1) (Rewrite<= sub-neg_binary64 (-.f64 x 1)))) (*.f64 (sqrt.f64 2) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sqrt.f64 (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 1 x)) (-.f64 x 1))) (*.f64 (sqrt.f64 2) (neg.f64 t))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sqrt.f64 (/.f64 (+.f64 1 x) (-.f64 x 1))) (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 (sqrt.f64 2) t)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 (sqrt.f64 (/.f64 (+.f64 1 x) (-.f64 x 1))) (*.f64 (sqrt.f64 2) t)))): 0 points increase in error, 0 points decrease in error
      (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (/.f64 (+.f64 1 x) (-.f64 x 1)))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (*.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (/.f64 (+.f64 1 x) (-.f64 x 1)))))): 0 points increase in error, 0 points decrease in error

    if -6.40000000000000009e44 < t < -2.60000000000000001e-259 or 7.5000000000000006e-155 < t < 1.07999999999999999e76

    1. Initial program 33.3

      \[\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. Simplified35.2

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\sqrt{\frac{\left(x + 1\right) \cdot \mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x + -1} - \ell \cdot \ell}} \cdot t} \]
      Proof
      (*.f64 (/.f64 (sqrt.f64 2) (sqrt.f64 (-.f64 (/.f64 (*.f64 (+.f64 x 1) (fma.f64 (*.f64 2 t) t (*.f64 l l))) (+.f64 x -1)) (*.f64 l l)))) t): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (sqrt.f64 2) (sqrt.f64 (-.f64 (/.f64 (*.f64 (+.f64 x 1) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (*.f64 2 t) t) (*.f64 l l)))) (+.f64 x -1)) (*.f64 l l)))) t): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (sqrt.f64 2) (sqrt.f64 (-.f64 (/.f64 (*.f64 (+.f64 x 1) (+.f64 (Rewrite<= associate-*r*_binary64 (*.f64 2 (*.f64 t t))) (*.f64 l l))) (+.f64 x -1)) (*.f64 l l)))) t): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (sqrt.f64 2) (sqrt.f64 (-.f64 (/.f64 (*.f64 (+.f64 x 1) (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t))))) (+.f64 x -1)) (*.f64 l l)))) t): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (sqrt.f64 2) (sqrt.f64 (-.f64 (/.f64 (*.f64 (+.f64 x 1) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (+.f64 x (Rewrite<= metadata-eval (neg.f64 1)))) (*.f64 l l)))) t): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (sqrt.f64 2) (sqrt.f64 (-.f64 (/.f64 (*.f64 (+.f64 x 1) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (Rewrite<= sub-neg_binary64 (-.f64 x 1))) (*.f64 l l)))) t): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (sqrt.f64 2) (sqrt.f64 (-.f64 (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t))))) (*.f64 l l)))) t): 22 points increase in error, 32 points decrease in error
      (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l))))): 19 points increase in error, 4 points decrease in error
    3. Taylor expanded in x around inf 13.7

      \[\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. Simplified13.7

      \[\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, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}} \cdot t \]
      Proof
      (+.f64 (/.f64 (*.f64 l l) x) (-.f64 (*.f64 2 (+.f64 (/.f64 (*.f64 t t) x) (*.f64 t t))) (/.f64 (neg.f64 (fma.f64 2 (*.f64 t t) (*.f64 l l))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 l 2)) x) (-.f64 (*.f64 2 (+.f64 (/.f64 (*.f64 t t) x) (*.f64 t t))) (/.f64 (neg.f64 (fma.f64 2 (*.f64 t t) (*.f64 l l))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (pow.f64 l 2) x) (-.f64 (*.f64 2 (+.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 t 2)) x) (*.f64 t t))) (/.f64 (neg.f64 (fma.f64 2 (*.f64 t t) (*.f64 l l))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (pow.f64 l 2) x) (-.f64 (*.f64 2 (+.f64 (/.f64 (pow.f64 t 2) x) (Rewrite<= unpow2_binary64 (pow.f64 t 2)))) (/.f64 (neg.f64 (fma.f64 2 (*.f64 t t) (*.f64 l l))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (pow.f64 l 2) x) (-.f64 (Rewrite<= distribute-lft-out_binary64 (+.f64 (*.f64 2 (/.f64 (pow.f64 t 2) x)) (*.f64 2 (pow.f64 t 2)))) (/.f64 (neg.f64 (fma.f64 2 (*.f64 t t) (*.f64 l l))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (pow.f64 l 2) x) (-.f64 (+.f64 (*.f64 2 (/.f64 (pow.f64 t 2) x)) (*.f64 2 (pow.f64 t 2))) (/.f64 (neg.f64 (Rewrite=> fma-udef_binary64 (+.f64 (*.f64 2 (*.f64 t t)) (*.f64 l l)))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (pow.f64 l 2) x) (-.f64 (+.f64 (*.f64 2 (/.f64 (pow.f64 t 2) x)) (*.f64 2 (pow.f64 t 2))) (/.f64 (neg.f64 (+.f64 (*.f64 2 (Rewrite<= unpow2_binary64 (pow.f64 t 2))) (*.f64 l l))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (pow.f64 l 2) x) (-.f64 (+.f64 (*.f64 2 (/.f64 (pow.f64 t 2) x)) (*.f64 2 (pow.f64 t 2))) (/.f64 (neg.f64 (+.f64 (*.f64 2 (pow.f64 t 2)) (Rewrite<= unpow2_binary64 (pow.f64 l 2)))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (pow.f64 l 2) x) (-.f64 (+.f64 (*.f64 2 (/.f64 (pow.f64 t 2) x)) (*.f64 2 (pow.f64 t 2))) (/.f64 (neg.f64 (Rewrite<= +-commutative_binary64 (+.f64 (pow.f64 l 2) (*.f64 2 (pow.f64 t 2))))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (pow.f64 l 2) x) (-.f64 (+.f64 (*.f64 2 (/.f64 (pow.f64 t 2) x)) (*.f64 2 (pow.f64 t 2))) (/.f64 (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (+.f64 (pow.f64 l 2) (*.f64 2 (pow.f64 t 2))))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (pow.f64 l 2) x) (-.f64 (+.f64 (*.f64 2 (/.f64 (pow.f64 t 2) x)) (*.f64 2 (pow.f64 t 2))) (Rewrite<= associate-*r/_binary64 (*.f64 -1 (/.f64 (+.f64 (pow.f64 l 2) (*.f64 2 (pow.f64 t 2))) x))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (/.f64 (pow.f64 l 2) x) (+.f64 (*.f64 2 (/.f64 (pow.f64 t 2) x)) (*.f64 2 (pow.f64 t 2)))) (*.f64 -1 (/.f64 (+.f64 (pow.f64 l 2) (*.f64 2 (pow.f64 t 2))) x)))): 0 points increase in error, 0 points decrease in error
    5. Taylor expanded in t around 0 14.1

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

      \[\leadsto \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(\frac{t \cdot t}{x} + t \cdot t\right) - \color{blue}{\ell \cdot \frac{-\ell}{x}}\right)}} \cdot t \]
      Proof
      (*.f64 l (/.f64 (neg.f64 l) x)): 0 points increase in error, 0 points decrease in error
      (*.f64 l (Rewrite<= distribute-neg-frac_binary64 (neg.f64 (/.f64 l x)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 l (/.f64 l x)))): 0 points increase in error, 0 points decrease in error
      (neg.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 l l) x))): 47 points increase in error, 15 points decrease in error
      (neg.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 l 2)) x)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (pow.f64 l 2) x))): 0 points increase in error, 0 points decrease in error
    7. Applied egg-rr9.5

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

      \[\leadsto \frac{\sqrt{2}}{\color{blue}{\sqrt{2 \cdot \left(t \cdot \left(\frac{t}{x} + t\right) + \frac{\ell}{\frac{x}{\ell}}\right)}}} \cdot t \]
      Proof
      (sqrt.f64 (*.f64 2 (+.f64 (*.f64 t (+.f64 (/.f64 t x) t)) (/.f64 l (/.f64 x l))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 2 (+.f64 (Rewrite<= distribute-rgt-out_binary64 (+.f64 (*.f64 (/.f64 t x) t) (*.f64 t t))) (/.f64 l (/.f64 x l))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 2 (+.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 t t) (*.f64 (/.f64 t x) t))) (/.f64 l (/.f64 x l))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 2 (+.f64 (Rewrite<= fma-udef_binary64 (fma.f64 t t (*.f64 (/.f64 t x) t))) (/.f64 l (/.f64 x l))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 2 (+.f64 (fma.f64 t t (*.f64 (/.f64 t x) t)) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 l l) x))))): 15 points increase in error, 2 points decrease in error
      (sqrt.f64 (*.f64 2 (+.f64 (fma.f64 t t (*.f64 (/.f64 t x) t)) (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 l 2)) x)))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (Rewrite<= distribute-lft-out_binary64 (+.f64 (*.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t))) (*.f64 2 (/.f64 (pow.f64 l 2) x))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (+.f64 (*.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t))) (*.f64 (Rewrite<= metadata-eval (+.f64 1 1)) (/.f64 (pow.f64 l 2) x)))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (+.f64 (*.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t))) (Rewrite<= distribute-lft1-in_binary64 (+.f64 (*.f64 1 (/.f64 (pow.f64 l 2) x)) (/.f64 (pow.f64 l 2) x))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (+.f64 (*.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t))) (+.f64 (Rewrite=> *-lft-identity_binary64 (/.f64 (pow.f64 l 2) x)) (/.f64 (pow.f64 l 2) x)))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (*.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t))) (/.f64 (pow.f64 l 2) x)) (/.f64 (pow.f64 l 2) x)))): 1 points increase in error, 0 points decrease in error
      (sqrt.f64 (+.f64 (+.f64 (*.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t))) (/.f64 (Rewrite=> unpow2_binary64 (*.f64 l l)) x)) (/.f64 (pow.f64 l 2) x))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (+.f64 (+.f64 (*.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t))) (Rewrite=> associate-/l*_binary64 (/.f64 l (/.f64 x l)))) (/.f64 (pow.f64 l 2) x))): 1 points increase in error, 1 points decrease in error
      (sqrt.f64 (+.f64 (Rewrite<= fma-udef_binary64 (fma.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t)) (/.f64 l (/.f64 x l)))) (/.f64 (pow.f64 l 2) x))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (pow.f64 l 2) x) (fma.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t)) (/.f64 l (/.f64 x l)))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (+.f64 (/.f64 (Rewrite=> unpow2_binary64 (*.f64 l l)) x) (fma.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t)) (/.f64 l (/.f64 x l))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (+.f64 (Rewrite=> associate-/l*_binary64 (/.f64 l (/.f64 x l))) (fma.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t)) (/.f64 l (/.f64 x l))))): 1 points increase in error, 14 points decrease in error
      (Rewrite<= unpow1/2_binary64 (pow.f64 (+.f64 (/.f64 l (/.f64 x l)) (fma.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t)) (/.f64 l (/.f64 x l)))) 1/2)): 0 points increase in error, 0 points decrease in error
      (pow.f64 (+.f64 (/.f64 l (/.f64 x l)) (fma.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t)) (/.f64 l (/.f64 x l)))) (Rewrite<= metadata-eval (*.f64 2 1/4))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= pow-sqr_binary64 (*.f64 (pow.f64 (+.f64 (/.f64 l (/.f64 x l)) (fma.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t)) (/.f64 l (/.f64 x l)))) 1/4) (pow.f64 (+.f64 (/.f64 l (/.f64 x l)) (fma.f64 2 (fma.f64 t t (*.f64 (/.f64 t x) t)) (/.f64 l (/.f64 x l)))) 1/4))): 36 points increase in error, 39 points decrease in error
    9. Applied egg-rr30.8

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\frac{1}{\mathsf{fma}\left(t, t + \frac{t}{x}, \ell \cdot \frac{\ell}{x}\right)}}\right)} - 1\right)} \cdot t \]
    10. Simplified9.6

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(t, t + \frac{t}{x}, \ell \cdot \frac{\ell}{x}\right)}}} \cdot t \]
      Proof
      (sqrt.f64 (/.f64 1 (fma.f64 t (+.f64 t (/.f64 t x)) (*.f64 l (/.f64 l x))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= expm1-log1p_binary64 (expm1.f64 (log1p.f64 (sqrt.f64 (/.f64 1 (fma.f64 t (+.f64 t (/.f64 t x)) (*.f64 l (/.f64 l x)))))))): 28 points increase in error, 22 points decrease in error
      (Rewrite<= expm1-def_binary64 (-.f64 (exp.f64 (log1p.f64 (sqrt.f64 (/.f64 1 (fma.f64 t (+.f64 t (/.f64 t x)) (*.f64 l (/.f64 l x))))))) 1)): 28 points increase in error, 61 points decrease in error

    if -2.60000000000000001e-259 < t < 7.5000000000000006e-155

    1. Initial program 62.6

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\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}} \]
    3. Simplified29.1

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\mathsf{fma}\left(0.5, \frac{\ell \cdot \ell + \left(2 \cdot \left(t \cdot t\right) - \left(-\left(2 \cdot \left(t \cdot t\right) + \ell \cdot \ell\right)\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}} \]
      Proof
      (fma.f64 1/2 (/.f64 (+.f64 (*.f64 l l) (-.f64 (*.f64 2 (*.f64 t t)) (neg.f64 (+.f64 (*.f64 2 (*.f64 t t)) (*.f64 l l))))) (*.f64 (sqrt.f64 2) (*.f64 t x))) (*.f64 t (sqrt.f64 2))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/2 (/.f64 (+.f64 (*.f64 l l) (-.f64 (*.f64 2 (Rewrite<= unpow2_binary64 (pow.f64 t 2))) (neg.f64 (+.f64 (*.f64 2 (*.f64 t t)) (*.f64 l l))))) (*.f64 (sqrt.f64 2) (*.f64 t x))) (*.f64 t (sqrt.f64 2))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/2 (/.f64 (+.f64 (*.f64 l l) (-.f64 (*.f64 2 (pow.f64 t 2)) (neg.f64 (+.f64 (*.f64 2 (Rewrite<= unpow2_binary64 (pow.f64 t 2))) (*.f64 l l))))) (*.f64 (sqrt.f64 2) (*.f64 t x))) (*.f64 t (sqrt.f64 2))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/2 (/.f64 (+.f64 (*.f64 l l) (-.f64 (*.f64 2 (pow.f64 t 2)) (neg.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 l l) (*.f64 2 (pow.f64 t 2))))))) (*.f64 (sqrt.f64 2) (*.f64 t x))) (*.f64 t (sqrt.f64 2))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/2 (/.f64 (+.f64 (*.f64 l l) (-.f64 (*.f64 2 (pow.f64 t 2)) (neg.f64 (+.f64 (Rewrite<= unpow2_binary64 (pow.f64 l 2)) (*.f64 2 (pow.f64 t 2)))))) (*.f64 (sqrt.f64 2) (*.f64 t x))) (*.f64 t (sqrt.f64 2))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/2 (/.f64 (+.f64 (*.f64 l l) (-.f64 (*.f64 2 (pow.f64 t 2)) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (+.f64 (pow.f64 l 2) (*.f64 2 (pow.f64 t 2))))))) (*.f64 (sqrt.f64 2) (*.f64 t x))) (*.f64 t (sqrt.f64 2))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/2 (/.f64 (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (*.f64 l l) (*.f64 2 (pow.f64 t 2))) (*.f64 -1 (+.f64 (pow.f64 l 2) (*.f64 2 (pow.f64 t 2)))))) (*.f64 (sqrt.f64 2) (*.f64 t x))) (*.f64 t (sqrt.f64 2))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/2 (/.f64 (-.f64 (+.f64 (Rewrite<= unpow2_binary64 (pow.f64 l 2)) (*.f64 2 (pow.f64 t 2))) (*.f64 -1 (+.f64 (pow.f64 l 2) (*.f64 2 (pow.f64 t 2))))) (*.f64 (sqrt.f64 2) (*.f64 t x))) (*.f64 t (sqrt.f64 2))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/2 (/.f64 (-.f64 (+.f64 (pow.f64 l 2) (*.f64 2 (pow.f64 t 2))) (*.f64 -1 (+.f64 (pow.f64 l 2) (*.f64 2 (pow.f64 t 2))))) (*.f64 (sqrt.f64 2) (*.f64 t x))) (Rewrite=> *-commutative_binary64 (*.f64 (sqrt.f64 2) t))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 1/2 (/.f64 (-.f64 (+.f64 (pow.f64 l 2) (*.f64 2 (pow.f64 t 2))) (*.f64 -1 (+.f64 (pow.f64 l 2) (*.f64 2 (pow.f64 t 2))))) (*.f64 (sqrt.f64 2) (*.f64 t x)))) (*.f64 (sqrt.f64 2) t))): 0 points increase in error, 0 points decrease in error

    if 1.07999999999999999e76 < t

    1. Initial program 47.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. Taylor expanded in x around inf 5.4

      \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{0.5}} \]
    3. Applied egg-rr4.5

      \[\leadsto \color{blue}{1} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification9.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.4 \cdot 10^{+44}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-259}:\\ \;\;\;\;t \cdot \sqrt{\frac{1}{\mathsf{fma}\left(t, t + \frac{t}{x}, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-155}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\ell \cdot \ell + \left(2 \cdot \left(t \cdot t\right) - \left(\left(t \cdot t\right) \cdot -2 - \ell \cdot \ell\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{+76}:\\ \;\;\;\;t \cdot \sqrt{\frac{1}{\mathsf{fma}\left(t, t + \frac{t}{x}, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternatives

Alternative 1
Error9.8
Cost20356
\[\begin{array}{l} t_1 := t \cdot \sqrt{\frac{1}{\mathsf{fma}\left(t, t + \frac{t}{x}, \ell \cdot \frac{\ell}{x}\right)}}\\ t_2 := t \cdot \sqrt{2}\\ \mathbf{if}\;t \leq -7.8 \cdot 10^{+45}:\\ \;\;\;\;\frac{t_2}{t_2 \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-225}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-155}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 6.1 \cdot 10^{+85}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 2
Error9.9
Cost14288
\[\begin{array}{l} t_1 := t \cdot \sqrt{\frac{1}{\mathsf{fma}\left(t, t + \frac{t}{x}, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{if}\;t \leq -7.8 \cdot 10^{+45}:\\ \;\;\;\;\frac{1}{x} + \left(-1 + \frac{-1}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{-225}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-157}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 6.1 \cdot 10^{+85}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 3
Error9.8
Cost14288
\[\begin{array}{l} t_1 := t \cdot \sqrt{\frac{1}{\mathsf{fma}\left(t, t + \frac{t}{x}, \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{if}\;t \leq -7.8 \cdot 10^{+45}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \left(-\sqrt{2 \cdot \frac{x + 1}{x + -1}}\right)}\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-225}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.9 \cdot 10^{-155}:\\ \;\;\;\;1\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+85}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 4
Error14.5
Cost13768
\[\begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{-126}:\\ \;\;\;\;\frac{1}{x} + \left(-1 + \frac{-1}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-225}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \frac{\ell}{\frac{x}{\ell}}}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 5
Error14.4
Cost13448
\[\begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{-175}:\\ \;\;\;\;\frac{1}{x} + \left(-1 + \frac{-1}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-227}:\\ \;\;\;\;t \cdot \sqrt{x \cdot {\ell}^{-2}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 6
Error14.9
Cost7048
\[\begin{array}{l} \mathbf{if}\;t \leq -2.75 \cdot 10^{-170}:\\ \;\;\;\;\frac{1}{x} + \left(-1 + \frac{-1}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-227}:\\ \;\;\;\;\frac{t}{\ell \cdot {x}^{-0.5}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 7
Error15.1
Cost6984
\[\begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{-175}:\\ \;\;\;\;\frac{1}{x} + \left(-1 + \frac{-1}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{-236}:\\ \;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 8
Error14.9
Cost6984
\[\begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{-175}:\\ \;\;\;\;\frac{1}{x} + \left(-1 + \frac{-1}{x \cdot x}\right)\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-233}:\\ \;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 9
Error15.2
Cost836
\[\begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{-307}:\\ \;\;\;\;\frac{1}{x} + \left(-1 + \frac{-1}{x \cdot x}\right)\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 10
Error15.2
Cost452
\[\begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{-307}:\\ \;\;\;\;-1 + \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 11
Error15.5
Cost196
\[\begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{-307}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 12
Error39.0
Cost64
\[-1 \]

Error

Reproduce

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