Average Error: 7.1 → 0.4
Time: 24.3s
Precision: 64
\[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t\]
\[\left(\mathsf{fma}\left(z - 1, \log 1 - \mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right), \left(x - 1\right) \cdot \log y\right) + \left(z - 1\right) \cdot \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}, \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}, \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}\right)\right)\right) - t\]
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\left(\mathsf{fma}\left(z - 1, \log 1 - \mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right), \left(x - 1\right) \cdot \log y\right) + \left(z - 1\right) \cdot \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}, \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}, \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}\right)\right)\right) - t
double f(double x, double y, double z, double t) {
        double r49522 = x;
        double r49523 = 1.0;
        double r49524 = r49522 - r49523;
        double r49525 = y;
        double r49526 = log(r49525);
        double r49527 = r49524 * r49526;
        double r49528 = z;
        double r49529 = r49528 - r49523;
        double r49530 = r49523 - r49525;
        double r49531 = log(r49530);
        double r49532 = r49529 * r49531;
        double r49533 = r49527 + r49532;
        double r49534 = t;
        double r49535 = r49533 - r49534;
        return r49535;
}

double f(double x, double y, double z, double t) {
        double r49536 = z;
        double r49537 = 1.0;
        double r49538 = r49536 - r49537;
        double r49539 = log(r49537);
        double r49540 = y;
        double r49541 = 0.5;
        double r49542 = 2.0;
        double r49543 = pow(r49540, r49542);
        double r49544 = pow(r49537, r49542);
        double r49545 = r49543 / r49544;
        double r49546 = r49541 * r49545;
        double r49547 = fma(r49537, r49540, r49546);
        double r49548 = r49539 - r49547;
        double r49549 = x;
        double r49550 = r49549 - r49537;
        double r49551 = log(r49540);
        double r49552 = r49550 * r49551;
        double r49553 = fma(r49538, r49548, r49552);
        double r49554 = cbrt(r49547);
        double r49555 = -r49554;
        double r49556 = r49554 * r49554;
        double r49557 = r49554 * r49556;
        double r49558 = fma(r49555, r49556, r49557);
        double r49559 = r49538 * r49558;
        double r49560 = r49553 + r49559;
        double r49561 = t;
        double r49562 = r49560 - r49561;
        return r49562;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Derivation

  1. Initial program 7.1

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t\]
  2. Simplified7.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t}\]
  3. Taylor expanded around 0 0.4

    \[\leadsto \mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \color{blue}{\left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)}\right) - t\]
  4. Simplified0.4

    \[\leadsto \mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \color{blue}{\left(\log 1 - \mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)}\right) - t\]
  5. Using strategy rm
  6. Applied fma-udef0.4

    \[\leadsto \color{blue}{\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \left(\log 1 - \mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right)} - t\]
  7. Using strategy rm
  8. Applied add-cube-cbrt0.5

    \[\leadsto \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \left(\log 1 - \color{blue}{\left(\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}}\right)\right) - t\]
  9. Applied pow10.5

    \[\leadsto \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \left(\log \color{blue}{\left({1}^{1}\right)} - \left(\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}\right)\right) - t\]
  10. Applied log-pow0.5

    \[\leadsto \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \left(\color{blue}{1 \cdot \log 1} - \left(\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}\right)\right) - t\]
  11. Applied prod-diff0.5

    \[\leadsto \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \color{blue}{\left(\mathsf{fma}\left(1, \log 1, -\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}\right)\right) + \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}, \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}, \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}\right)\right)\right)}\right) - t\]
  12. Applied distribute-lft-in0.5

    \[\leadsto \left(\left(x - 1\right) \cdot \log y + \color{blue}{\left(\left(z - 1\right) \cdot \mathsf{fma}\left(1, \log 1, -\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}\right)\right) + \left(z - 1\right) \cdot \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}, \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}, \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}\right)\right)\right)}\right) - t\]
  13. Applied associate-+r+0.5

    \[\leadsto \color{blue}{\left(\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \mathsf{fma}\left(1, \log 1, -\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}\right)\right)\right) + \left(z - 1\right) \cdot \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}, \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}, \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)}\right)\right)\right)} - t\]
  14. Simplified0.4

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

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

Reproduce

herbie shell --seed 2019209 +o rules:numerics
(FPCore (x y z t)
  :name "Statistics.Distribution.Beta:$cdensity from math-functions-0.1.5.2"
  :precision binary64
  (- (+ (* (- x 1) (log y)) (* (- z 1) (log (- 1 y)))) t))