Average Error: 32.9 → 28.3
Time: 53.1s
Precision: 64
\[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\]
\[\begin{array}{l} \mathbf{if}\;t \le 4.03661145651659 \cdot 10^{-251}:\\ \;\;\;\;\sqrt{\left(\left(U \cdot 2\right) \cdot n\right) \cdot \mathsf{fma}\left(U* - U, \frac{\frac{n}{\frac{Om}{\ell}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)}\\ \mathbf{elif}\;t \le 1.141827696680125 \cdot 10^{+46}:\\ \;\;\;\;\sqrt{\left(n \cdot \mathsf{fma}\left(U* - U, \frac{\frac{\frac{n}{\frac{\sqrt[3]{Om}}{\sqrt[3]{\ell}} \cdot \frac{\sqrt[3]{Om}}{\sqrt[3]{\ell}}}}{\frac{\sqrt[3]{Om}}{\sqrt[3]{\ell}}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)\right) \cdot \left(U \cdot 2\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(U* - U, \frac{\frac{n}{\frac{Om}{\ell}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)} \cdot \sqrt{\left(U \cdot 2\right) \cdot n}\\ \end{array}\]
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\begin{array}{l}
\mathbf{if}\;t \le 4.03661145651659 \cdot 10^{-251}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot 2\right) \cdot n\right) \cdot \mathsf{fma}\left(U* - U, \frac{\frac{n}{\frac{Om}{\ell}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)}\\

\mathbf{elif}\;t \le 1.141827696680125 \cdot 10^{+46}:\\
\;\;\;\;\sqrt{\left(n \cdot \mathsf{fma}\left(U* - U, \frac{\frac{\frac{n}{\frac{\sqrt[3]{Om}}{\sqrt[3]{\ell}} \cdot \frac{\sqrt[3]{Om}}{\sqrt[3]{\ell}}}}{\frac{\sqrt[3]{Om}}{\sqrt[3]{\ell}}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)\right) \cdot \left(U \cdot 2\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(U* - U, \frac{\frac{n}{\frac{Om}{\ell}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)} \cdot \sqrt{\left(U \cdot 2\right) \cdot n}\\

\end{array}
double f(double n, double U, double t, double l, double Om, double U_) {
        double r2521742 = 2.0;
        double r2521743 = n;
        double r2521744 = r2521742 * r2521743;
        double r2521745 = U;
        double r2521746 = r2521744 * r2521745;
        double r2521747 = t;
        double r2521748 = l;
        double r2521749 = r2521748 * r2521748;
        double r2521750 = Om;
        double r2521751 = r2521749 / r2521750;
        double r2521752 = r2521742 * r2521751;
        double r2521753 = r2521747 - r2521752;
        double r2521754 = r2521748 / r2521750;
        double r2521755 = pow(r2521754, r2521742);
        double r2521756 = r2521743 * r2521755;
        double r2521757 = U_;
        double r2521758 = r2521745 - r2521757;
        double r2521759 = r2521756 * r2521758;
        double r2521760 = r2521753 - r2521759;
        double r2521761 = r2521746 * r2521760;
        double r2521762 = sqrt(r2521761);
        return r2521762;
}

double f(double n, double U, double t, double l, double Om, double U_) {
        double r2521763 = t;
        double r2521764 = 4.03661145651659e-251;
        bool r2521765 = r2521763 <= r2521764;
        double r2521766 = U;
        double r2521767 = 2.0;
        double r2521768 = r2521766 * r2521767;
        double r2521769 = n;
        double r2521770 = r2521768 * r2521769;
        double r2521771 = U_;
        double r2521772 = r2521771 - r2521766;
        double r2521773 = Om;
        double r2521774 = l;
        double r2521775 = r2521773 / r2521774;
        double r2521776 = r2521769 / r2521775;
        double r2521777 = r2521776 / r2521775;
        double r2521778 = -2.0;
        double r2521779 = r2521774 / r2521775;
        double r2521780 = fma(r2521778, r2521779, r2521763);
        double r2521781 = fma(r2521772, r2521777, r2521780);
        double r2521782 = r2521770 * r2521781;
        double r2521783 = sqrt(r2521782);
        double r2521784 = 1.141827696680125e+46;
        bool r2521785 = r2521763 <= r2521784;
        double r2521786 = cbrt(r2521773);
        double r2521787 = cbrt(r2521774);
        double r2521788 = r2521786 / r2521787;
        double r2521789 = r2521788 * r2521788;
        double r2521790 = r2521769 / r2521789;
        double r2521791 = r2521790 / r2521788;
        double r2521792 = r2521791 / r2521775;
        double r2521793 = fma(r2521772, r2521792, r2521780);
        double r2521794 = r2521769 * r2521793;
        double r2521795 = r2521794 * r2521768;
        double r2521796 = sqrt(r2521795);
        double r2521797 = sqrt(r2521781);
        double r2521798 = sqrt(r2521770);
        double r2521799 = r2521797 * r2521798;
        double r2521800 = r2521785 ? r2521796 : r2521799;
        double r2521801 = r2521765 ? r2521783 : r2521800;
        return r2521801;
}

Error

Bits error versus n

Bits error versus U

Bits error versus t

Bits error versus l

Bits error versus Om

Bits error versus U*

Derivation

  1. Split input into 3 regimes
  2. if t < 4.03661145651659e-251

    1. Initial program 33.1

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\]
    2. Simplified29.5

      \[\leadsto \color{blue}{\sqrt{\left(U \cdot 2\right) \cdot \left(n \cdot \mathsf{fma}\left(U* - U, \frac{\frac{n}{\frac{Om}{\ell}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)\right)}}\]
    3. Using strategy rm
    4. Applied associate-*r*29.5

      \[\leadsto \sqrt{\color{blue}{\left(\left(U \cdot 2\right) \cdot n\right) \cdot \mathsf{fma}\left(U* - U, \frac{\frac{n}{\frac{Om}{\ell}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)}}\]

    if 4.03661145651659e-251 < t < 1.141827696680125e+46

    1. Initial program 31.3

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\]
    2. Simplified28.7

      \[\leadsto \color{blue}{\sqrt{\left(U \cdot 2\right) \cdot \left(n \cdot \mathsf{fma}\left(U* - U, \frac{\frac{n}{\frac{Om}{\ell}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)\right)}}\]
    3. Using strategy rm
    4. Applied add-cube-cbrt28.7

      \[\leadsto \sqrt{\left(U \cdot 2\right) \cdot \left(n \cdot \mathsf{fma}\left(U* - U, \frac{\frac{n}{\frac{Om}{\color{blue}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)\right)}\]
    5. Applied add-cube-cbrt28.7

      \[\leadsto \sqrt{\left(U \cdot 2\right) \cdot \left(n \cdot \mathsf{fma}\left(U* - U, \frac{\frac{n}{\frac{\color{blue}{\left(\sqrt[3]{Om} \cdot \sqrt[3]{Om}\right) \cdot \sqrt[3]{Om}}}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)\right)}\]
    6. Applied times-frac28.7

      \[\leadsto \sqrt{\left(U \cdot 2\right) \cdot \left(n \cdot \mathsf{fma}\left(U* - U, \frac{\frac{n}{\color{blue}{\frac{\sqrt[3]{Om} \cdot \sqrt[3]{Om}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \frac{\sqrt[3]{Om}}{\sqrt[3]{\ell}}}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)\right)}\]
    7. Applied associate-/r*28.7

      \[\leadsto \sqrt{\left(U \cdot 2\right) \cdot \left(n \cdot \mathsf{fma}\left(U* - U, \frac{\color{blue}{\frac{\frac{n}{\frac{\sqrt[3]{Om} \cdot \sqrt[3]{Om}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}{\frac{\sqrt[3]{Om}}{\sqrt[3]{\ell}}}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)\right)}\]
    8. Simplified28.7

      \[\leadsto \sqrt{\left(U \cdot 2\right) \cdot \left(n \cdot \mathsf{fma}\left(U* - U, \frac{\frac{\color{blue}{\frac{n}{\frac{\sqrt[3]{Om}}{\sqrt[3]{\ell}} \cdot \frac{\sqrt[3]{Om}}{\sqrt[3]{\ell}}}}}{\frac{\sqrt[3]{Om}}{\sqrt[3]{\ell}}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)\right)}\]

    if 1.141827696680125e+46 < t

    1. Initial program 34.4

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\]
    2. Simplified29.9

      \[\leadsto \color{blue}{\sqrt{\left(U \cdot 2\right) \cdot \left(n \cdot \mathsf{fma}\left(U* - U, \frac{\frac{n}{\frac{Om}{\ell}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)\right)}}\]
    3. Using strategy rm
    4. Applied associate-*r*31.1

      \[\leadsto \sqrt{\color{blue}{\left(\left(U \cdot 2\right) \cdot n\right) \cdot \mathsf{fma}\left(U* - U, \frac{\frac{n}{\frac{Om}{\ell}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)}}\]
    5. Using strategy rm
    6. Applied sqrt-prod24.9

      \[\leadsto \color{blue}{\sqrt{\left(U \cdot 2\right) \cdot n} \cdot \sqrt{\mathsf{fma}\left(U* - U, \frac{\frac{n}{\frac{Om}{\ell}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification28.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le 4.03661145651659 \cdot 10^{-251}:\\ \;\;\;\;\sqrt{\left(\left(U \cdot 2\right) \cdot n\right) \cdot \mathsf{fma}\left(U* - U, \frac{\frac{n}{\frac{Om}{\ell}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)}\\ \mathbf{elif}\;t \le 1.141827696680125 \cdot 10^{+46}:\\ \;\;\;\;\sqrt{\left(n \cdot \mathsf{fma}\left(U* - U, \frac{\frac{\frac{n}{\frac{\sqrt[3]{Om}}{\sqrt[3]{\ell}} \cdot \frac{\sqrt[3]{Om}}{\sqrt[3]{\ell}}}}{\frac{\sqrt[3]{Om}}{\sqrt[3]{\ell}}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)\right) \cdot \left(U \cdot 2\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(U* - U, \frac{\frac{n}{\frac{Om}{\ell}}}{\frac{Om}{\ell}}, \mathsf{fma}\left(-2, \frac{\ell}{\frac{Om}{\ell}}, t\right)\right)} \cdot \sqrt{\left(U \cdot 2\right) \cdot n}\\ \end{array}\]

Reproduce

herbie shell --seed 2019139 +o rules:numerics
(FPCore (n U t l Om U*)
  :name "Toniolo and Linder, Equation (13)"
  (sqrt (* (* (* 2 n) U) (- (- t (* 2 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2)) (- U U*))))))