Average Error: 43.0 → 11.3
Time: 26.3s
Precision: 64
\[\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} \mathbf{if}\;t \le -2.893044424140443963701519691942199270156 \cdot 10^{127}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\ \mathbf{elif}\;t \le -2.995919227120961814839885101493571420347 \cdot 10^{-155}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{{t}^{2}}{x}, 4, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right) \cdot 2\right)}}\\ \mathbf{elif}\;t \le -3.093321223031470806556114502029428533224 \cdot 10^{-189}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\ \mathbf{elif}\;t \le -4.70293492113274424456901263060240659663 \cdot 10^{-259}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{{t}^{2}}{x}, 4, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right) \cdot 2\right)}}\\ \mathbf{elif}\;t \le -3.973880744580357684887073160770704644204 \cdot 10^{-300}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\ \mathbf{elif}\;t \le 1.283850626874649528456778226273514369985 \cdot 10^{-253} \lor \neg \left(t \le 5.156014301754715816234983111960992171017 \cdot 10^{-183}\right) \land t \le 4.517101072782233046760218130420168379434 \cdot 10^{-119}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{{t}^{2}}{x}, 4, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right) \cdot 2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \left(\frac{t}{\sqrt{2} \cdot x} - \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)\right)}\\ \end{array}\]
\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}
\mathbf{if}\;t \le -2.893044424140443963701519691942199270156 \cdot 10^{127}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\

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

\mathbf{elif}\;t \le -3.093321223031470806556114502029428533224 \cdot 10^{-189}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\

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

\mathbf{elif}\;t \le -3.973880744580357684887073160770704644204 \cdot 10^{-300}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\

\mathbf{elif}\;t \le 1.283850626874649528456778226273514369985 \cdot 10^{-253} \lor \neg \left(t \le 5.156014301754715816234983111960992171017 \cdot 10^{-183}\right) \land t \le 4.517101072782233046760218130420168379434 \cdot 10^{-119}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{{t}^{2}}{x}, 4, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right) \cdot 2\right)}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \left(\frac{t}{\sqrt{2} \cdot x} - \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)\right)}\\

\end{array}
double f(double x, double l, double t) {
        double r37619 = 2.0;
        double r37620 = sqrt(r37619);
        double r37621 = t;
        double r37622 = r37620 * r37621;
        double r37623 = x;
        double r37624 = 1.0;
        double r37625 = r37623 + r37624;
        double r37626 = r37623 - r37624;
        double r37627 = r37625 / r37626;
        double r37628 = l;
        double r37629 = r37628 * r37628;
        double r37630 = r37621 * r37621;
        double r37631 = r37619 * r37630;
        double r37632 = r37629 + r37631;
        double r37633 = r37627 * r37632;
        double r37634 = r37633 - r37629;
        double r37635 = sqrt(r37634);
        double r37636 = r37622 / r37635;
        return r37636;
}

double f(double x, double l, double t) {
        double r37637 = t;
        double r37638 = -2.893044424140444e+127;
        bool r37639 = r37637 <= r37638;
        double r37640 = 2.0;
        double r37641 = sqrt(r37640);
        double r37642 = r37641 * r37637;
        double r37643 = 3.0;
        double r37644 = pow(r37641, r37643);
        double r37645 = x;
        double r37646 = 2.0;
        double r37647 = pow(r37645, r37646);
        double r37648 = r37644 * r37647;
        double r37649 = r37637 / r37648;
        double r37650 = r37641 * r37645;
        double r37651 = r37637 / r37650;
        double r37652 = r37649 - r37651;
        double r37653 = r37640 * r37652;
        double r37654 = r37637 * r37641;
        double r37655 = r37653 - r37654;
        double r37656 = r37642 / r37655;
        double r37657 = -2.995919227120962e-155;
        bool r37658 = r37637 <= r37657;
        double r37659 = pow(r37637, r37646);
        double r37660 = r37659 / r37645;
        double r37661 = 4.0;
        double r37662 = l;
        double r37663 = r37645 / r37662;
        double r37664 = r37662 / r37663;
        double r37665 = fma(r37637, r37637, r37664);
        double r37666 = r37665 * r37640;
        double r37667 = fma(r37660, r37661, r37666);
        double r37668 = sqrt(r37667);
        double r37669 = r37654 / r37668;
        double r37670 = -3.093321223031471e-189;
        bool r37671 = r37637 <= r37670;
        double r37672 = -4.702934921132744e-259;
        bool r37673 = r37637 <= r37672;
        double r37674 = -3.973880744580358e-300;
        bool r37675 = r37637 <= r37674;
        double r37676 = 1.2838506268746495e-253;
        bool r37677 = r37637 <= r37676;
        double r37678 = 5.156014301754716e-183;
        bool r37679 = r37637 <= r37678;
        double r37680 = !r37679;
        double r37681 = 4.517101072782233e-119;
        bool r37682 = r37637 <= r37681;
        bool r37683 = r37680 && r37682;
        bool r37684 = r37677 || r37683;
        double r37685 = r37651 - r37649;
        double r37686 = r37640 * r37685;
        double r37687 = fma(r37637, r37641, r37686);
        double r37688 = r37642 / r37687;
        double r37689 = r37684 ? r37669 : r37688;
        double r37690 = r37675 ? r37656 : r37689;
        double r37691 = r37673 ? r37669 : r37690;
        double r37692 = r37671 ? r37656 : r37691;
        double r37693 = r37658 ? r37669 : r37692;
        double r37694 = r37639 ? r37656 : r37693;
        return r37694;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -2.893044424140444e+127 or -2.995919227120962e-155 < t < -3.093321223031471e-189 or -4.702934921132744e-259 < t < -3.973880744580358e-300

    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} \cdot t}{\sqrt{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x - 1} - \ell \cdot \ell}}}\]
    3. Taylor expanded around inf 51.0

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right)}}\]
    6. Simplified10.0

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

    if -2.893044424140444e+127 < t < -2.995919227120962e-155 or -3.093321223031471e-189 < t < -4.702934921132744e-259 or -3.973880744580358e-300 < t < 1.2838506268746495e-253 or 5.156014301754716e-183 < t < 4.517101072782233e-119

    1. Initial program 36.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. Simplified36.3

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{{t}^{2}}{x}, 4, 2 \cdot \mathsf{fma}\left(t, t, \frac{{\ell}^{2}}{x}\right)\right)}}}\]
    5. Using strategy rm
    6. Applied sqr-pow16.5

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\frac{{t}^{2}}{x}, 4, 2 \cdot \mathsf{fma}\left(t, t, \frac{\color{blue}{{\ell}^{\left(\frac{2}{2}\right)} \cdot {\ell}^{\left(\frac{2}{2}\right)}}}{x}\right)\right)}}\]
    7. Applied associate-/l*11.8

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

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

    if 1.2838506268746495e-253 < t < 5.156014301754716e-183 or 4.517101072782233e-119 < t

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{{t}^{2}}{x}, 4, 2 \cdot \mathsf{fma}\left(t, t, \frac{{\ell}^{2}}{x}\right)\right)}}}\]
    5. Taylor expanded around inf 11.5

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \left(\frac{t}{\sqrt{2} \cdot x} - \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)\right)}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification11.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.893044424140443963701519691942199270156 \cdot 10^{127}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\ \mathbf{elif}\;t \le -2.995919227120961814839885101493571420347 \cdot 10^{-155}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{{t}^{2}}{x}, 4, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right) \cdot 2\right)}}\\ \mathbf{elif}\;t \le -3.093321223031470806556114502029428533224 \cdot 10^{-189}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\ \mathbf{elif}\;t \le -4.70293492113274424456901263060240659663 \cdot 10^{-259}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{{t}^{2}}{x}, 4, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right) \cdot 2\right)}}\\ \mathbf{elif}\;t \le -3.973880744580357684887073160770704644204 \cdot 10^{-300}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\ \mathbf{elif}\;t \le 1.283850626874649528456778226273514369985 \cdot 10^{-253} \lor \neg \left(t \le 5.156014301754715816234983111960992171017 \cdot 10^{-183}\right) \land t \le 4.517101072782233046760218130420168379434 \cdot 10^{-119}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{{t}^{2}}{x}, 4, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right) \cdot 2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \left(\frac{t}{\sqrt{2} \cdot x} - \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2019209 +o rules:numerics
(FPCore (x l t)
  :name "Toniolo and Linder, Equation (7)"
  :precision binary64
  (/ (* (sqrt 2) t) (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l)))))