Average Error: 0.1 → 0.2
Time: 36.6s
Precision: 64
\[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\]
\[\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \left({\left(\log y \cdot \log y\right)}^{\frac{1}{3}} \cdot \left(x \cdot \sqrt[3]{\log y}\right) + \left(t + z\right)\right)\]
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \left({\left(\log y \cdot \log y\right)}^{\frac{1}{3}} \cdot \left(x \cdot \sqrt[3]{\log y}\right) + \left(t + z\right)\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r4119453 = x;
        double r4119454 = y;
        double r4119455 = log(r4119454);
        double r4119456 = r4119453 * r4119455;
        double r4119457 = z;
        double r4119458 = r4119456 + r4119457;
        double r4119459 = t;
        double r4119460 = r4119458 + r4119459;
        double r4119461 = a;
        double r4119462 = r4119460 + r4119461;
        double r4119463 = b;
        double r4119464 = 0.5;
        double r4119465 = r4119463 - r4119464;
        double r4119466 = c;
        double r4119467 = log(r4119466);
        double r4119468 = r4119465 * r4119467;
        double r4119469 = r4119462 + r4119468;
        double r4119470 = i;
        double r4119471 = r4119454 * r4119470;
        double r4119472 = r4119469 + r4119471;
        return r4119472;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r4119473 = b;
        double r4119474 = 0.5;
        double r4119475 = r4119473 - r4119474;
        double r4119476 = c;
        double r4119477 = log(r4119476);
        double r4119478 = y;
        double r4119479 = i;
        double r4119480 = a;
        double r4119481 = fma(r4119478, r4119479, r4119480);
        double r4119482 = fma(r4119475, r4119477, r4119481);
        double r4119483 = log(r4119478);
        double r4119484 = r4119483 * r4119483;
        double r4119485 = 0.3333333333333333;
        double r4119486 = pow(r4119484, r4119485);
        double r4119487 = x;
        double r4119488 = cbrt(r4119483);
        double r4119489 = r4119487 * r4119488;
        double r4119490 = r4119486 * r4119489;
        double r4119491 = t;
        double r4119492 = z;
        double r4119493 = r4119491 + r4119492;
        double r4119494 = r4119490 + r4119493;
        double r4119495 = r4119482 + r4119494;
        return r4119495;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus i

Derivation

  1. Initial program 0.1

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\]
  2. Simplified0.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \left(\mathsf{fma}\left(\log y, x, z\right) + t\right)}\]
  3. Using strategy rm
  4. Applied fma-udef0.1

    \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \left(\color{blue}{\left(\log y \cdot x + z\right)} + t\right)\]
  5. Applied associate-+l+0.1

    \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \color{blue}{\left(\log y \cdot x + \left(z + t\right)\right)}\]
  6. Using strategy rm
  7. Applied add-cube-cbrt0.3

    \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \left(\color{blue}{\left(\left(\sqrt[3]{\log y} \cdot \sqrt[3]{\log y}\right) \cdot \sqrt[3]{\log y}\right)} \cdot x + \left(z + t\right)\right)\]
  8. Applied associate-*l*0.3

    \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \left(\color{blue}{\left(\sqrt[3]{\log y} \cdot \sqrt[3]{\log y}\right) \cdot \left(\sqrt[3]{\log y} \cdot x\right)} + \left(z + t\right)\right)\]
  9. Using strategy rm
  10. Applied pow1/336.9

    \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \left(\left(\sqrt[3]{\log y} \cdot \color{blue}{{\left(\log y\right)}^{\frac{1}{3}}}\right) \cdot \left(\sqrt[3]{\log y} \cdot x\right) + \left(z + t\right)\right)\]
  11. Applied pow1/336.9

    \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \left(\left(\color{blue}{{\left(\log y\right)}^{\frac{1}{3}}} \cdot {\left(\log y\right)}^{\frac{1}{3}}\right) \cdot \left(\sqrt[3]{\log y} \cdot x\right) + \left(z + t\right)\right)\]
  12. Applied pow-prod-down0.2

    \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \left(\color{blue}{{\left(\log y \cdot \log y\right)}^{\frac{1}{3}}} \cdot \left(\sqrt[3]{\log y} \cdot x\right) + \left(z + t\right)\right)\]
  13. Final simplification0.2

    \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \left({\left(\log y \cdot \log y\right)}^{\frac{1}{3}} \cdot \left(x \cdot \sqrt[3]{\log y}\right) + \left(t + z\right)\right)\]

Reproduce

herbie shell --seed 2019170 +o rules:numerics
(FPCore (x y z t a b c i)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
  (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))