Average Error: 0.1 → 0.1
Time: 39.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(y, i, \left(\left(b - 0.5\right) \cdot \left(2 \cdot \log \left(\sqrt[3]{c}\right)\right) + \left(\left(\left(b - 0.5\right) \cdot 2\right) \cdot \log \left(\sqrt[3]{\sqrt[3]{c}}\right) + \log \left(\sqrt[3]{\sqrt[3]{c}}\right) \cdot \left(b - 0.5\right)\right)\right) + \left(\left(\mathsf{fma}\left(x, \log y, z\right) + t\right) + \mathsf{fma}\left(\log c, \left(-0.5\right) + 0.5, a\right)\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(y, i, \left(\left(b - 0.5\right) \cdot \left(2 \cdot \log \left(\sqrt[3]{c}\right)\right) + \left(\left(\left(b - 0.5\right) \cdot 2\right) \cdot \log \left(\sqrt[3]{\sqrt[3]{c}}\right) + \log \left(\sqrt[3]{\sqrt[3]{c}}\right) \cdot \left(b - 0.5\right)\right)\right) + \left(\left(\mathsf{fma}\left(x, \log y, z\right) + t\right) + \mathsf{fma}\left(\log c, \left(-0.5\right) + 0.5, a\right)\right)\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r77544 = x;
        double r77545 = y;
        double r77546 = log(r77545);
        double r77547 = r77544 * r77546;
        double r77548 = z;
        double r77549 = r77547 + r77548;
        double r77550 = t;
        double r77551 = r77549 + r77550;
        double r77552 = a;
        double r77553 = r77551 + r77552;
        double r77554 = b;
        double r77555 = 0.5;
        double r77556 = r77554 - r77555;
        double r77557 = c;
        double r77558 = log(r77557);
        double r77559 = r77556 * r77558;
        double r77560 = r77553 + r77559;
        double r77561 = i;
        double r77562 = r77545 * r77561;
        double r77563 = r77560 + r77562;
        return r77563;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r77564 = y;
        double r77565 = i;
        double r77566 = b;
        double r77567 = 0.5;
        double r77568 = r77566 - r77567;
        double r77569 = 2.0;
        double r77570 = c;
        double r77571 = cbrt(r77570);
        double r77572 = log(r77571);
        double r77573 = r77569 * r77572;
        double r77574 = r77568 * r77573;
        double r77575 = r77568 * r77569;
        double r77576 = cbrt(r77571);
        double r77577 = log(r77576);
        double r77578 = r77575 * r77577;
        double r77579 = r77577 * r77568;
        double r77580 = r77578 + r77579;
        double r77581 = r77574 + r77580;
        double r77582 = x;
        double r77583 = log(r77564);
        double r77584 = z;
        double r77585 = fma(r77582, r77583, r77584);
        double r77586 = t;
        double r77587 = r77585 + r77586;
        double r77588 = log(r77570);
        double r77589 = -r77567;
        double r77590 = r77589 + r77567;
        double r77591 = a;
        double r77592 = fma(r77588, r77590, r77591);
        double r77593 = r77587 + r77592;
        double r77594 = r77581 + r77593;
        double r77595 = fma(r77564, r77565, r77594);
        return r77595;
}

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(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \left(\mathsf{fma}\left(x, \log y, z\right) + t\right)\right)\right)}\]
  3. Using strategy rm
  4. Applied fma-udef0.1

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

    \[\leadsto \mathsf{fma}\left(y, i, \log c \cdot \left(b - \color{blue}{\sqrt{0.5} \cdot \sqrt{0.5}}\right) + \left(a + \left(\mathsf{fma}\left(x, \log y, z\right) + t\right)\right)\right)\]
  7. Applied *-un-lft-identity0.1

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

    \[\leadsto \mathsf{fma}\left(y, i, \log c \cdot \color{blue}{\left(\mathsf{fma}\left(1, b, -\sqrt{0.5} \cdot \sqrt{0.5}\right) + \mathsf{fma}\left(-\sqrt{0.5}, \sqrt{0.5}, \sqrt{0.5} \cdot \sqrt{0.5}\right)\right)} + \left(a + \left(\mathsf{fma}\left(x, \log y, z\right) + t\right)\right)\right)\]
  9. Applied distribute-rgt-in0.1

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

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

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

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

    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(1, b, -\sqrt{0.5} \cdot \sqrt{0.5}\right) \cdot \color{blue}{\left(\log \left(\sqrt[3]{c} \cdot \sqrt[3]{c}\right) + \log \left(\sqrt[3]{c}\right)\right)} + \left(\left(\mathsf{fma}\left(x, \log y, z\right) + t\right) + \mathsf{fma}\left(\log c, \left(-0.5\right) + 0.5, a\right)\right)\right)\]
  15. Applied distribute-lft-in0.1

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

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

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

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

    \[\leadsto \mathsf{fma}\left(y, i, \left(\left(b - 0.5\right) \cdot \left(2 \cdot \log \left(\sqrt[3]{c}\right)\right) + \left(b - 0.5\right) \cdot \color{blue}{\left(\log \left(\sqrt[3]{\sqrt[3]{c}} \cdot \sqrt[3]{\sqrt[3]{c}}\right) + \log \left(\sqrt[3]{\sqrt[3]{c}}\right)\right)}\right) + \left(\left(\mathsf{fma}\left(x, \log y, z\right) + t\right) + \mathsf{fma}\left(\log c, \left(-0.5\right) + 0.5, a\right)\right)\right)\]
  21. Applied distribute-lft-in0.1

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

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

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

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

Reproduce

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