Average Error: 7.4 → 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(\left(x - 1\right) \cdot \log \left({\left(\sqrt[3]{y}\right)}^{\frac{5}{3}} \cdot \sqrt[3]{\sqrt[3]{y}}\right) + \mathsf{fma}\left(\log \left({y}^{\frac{1}{3}}\right), x - 1, \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)\right) - t\]
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\left(\left(x - 1\right) \cdot \log \left({\left(\sqrt[3]{y}\right)}^{\frac{5}{3}} \cdot \sqrt[3]{\sqrt[3]{y}}\right) + \mathsf{fma}\left(\log \left({y}^{\frac{1}{3}}\right), x - 1, \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)\right) - t
double f(double x, double y, double z, double t) {
        double r57653 = x;
        double r57654 = 1.0;
        double r57655 = r57653 - r57654;
        double r57656 = y;
        double r57657 = log(r57656);
        double r57658 = r57655 * r57657;
        double r57659 = z;
        double r57660 = r57659 - r57654;
        double r57661 = r57654 - r57656;
        double r57662 = log(r57661);
        double r57663 = r57660 * r57662;
        double r57664 = r57658 + r57663;
        double r57665 = t;
        double r57666 = r57664 - r57665;
        return r57666;
}

double f(double x, double y, double z, double t) {
        double r57667 = x;
        double r57668 = 1.0;
        double r57669 = r57667 - r57668;
        double r57670 = y;
        double r57671 = cbrt(r57670);
        double r57672 = 1.6666666666666667;
        double r57673 = pow(r57671, r57672);
        double r57674 = cbrt(r57671);
        double r57675 = r57673 * r57674;
        double r57676 = log(r57675);
        double r57677 = r57669 * r57676;
        double r57678 = 0.3333333333333333;
        double r57679 = pow(r57670, r57678);
        double r57680 = log(r57679);
        double r57681 = z;
        double r57682 = r57681 - r57668;
        double r57683 = log(r57668);
        double r57684 = 0.5;
        double r57685 = 2.0;
        double r57686 = pow(r57670, r57685);
        double r57687 = pow(r57668, r57685);
        double r57688 = r57686 / r57687;
        double r57689 = r57684 * r57688;
        double r57690 = fma(r57668, r57670, r57689);
        double r57691 = r57683 - r57690;
        double r57692 = r57682 * r57691;
        double r57693 = fma(r57680, r57669, r57692);
        double r57694 = r57677 + r57693;
        double r57695 = t;
        double r57696 = r57694 - r57695;
        return r57696;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Derivation

  1. Initial program 7.4

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t\]
  2. Taylor expanded around 0 0.4

    \[\leadsto \left(\left(x - 1\right) \cdot \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\]
  3. Simplified0.4

    \[\leadsto \left(\left(x - 1\right) \cdot \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\]
  4. Using strategy rm
  5. Applied add-cube-cbrt0.4

    \[\leadsto \left(\left(x - 1\right) \cdot \log \color{blue}{\left(\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}\right)} + \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\]
  6. Applied log-prod0.5

    \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) + \log \left(\sqrt[3]{y}\right)\right)} + \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. Applied distribute-lft-in0.5

    \[\leadsto \left(\color{blue}{\left(\left(x - 1\right) \cdot \log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) + \left(x - 1\right) \cdot \log \left(\sqrt[3]{y}\right)\right)} + \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\]
  8. Applied associate-+l+0.5

    \[\leadsto \color{blue}{\left(\left(x - 1\right) \cdot \log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) + \left(\left(x - 1\right) \cdot \log \left(\sqrt[3]{y}\right) + \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)\right)} - t\]
  9. Simplified0.5

    \[\leadsto \left(\left(x - 1\right) \cdot \log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) + \color{blue}{\mathsf{fma}\left(\log \left(\sqrt[3]{y}\right), x - 1, \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)}\right) - t\]
  10. Using strategy rm
  11. Applied pow1/30.5

    \[\leadsto \left(\left(x - 1\right) \cdot \log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) + \mathsf{fma}\left(\log \color{blue}{\left({y}^{\frac{1}{3}}\right)}, x - 1, \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)\right) - t\]
  12. Using strategy rm
  13. Applied add-cube-cbrt0.5

    \[\leadsto \left(\left(x - 1\right) \cdot \log \left(\sqrt[3]{y} \cdot \color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{y}} \cdot \sqrt[3]{\sqrt[3]{y}}\right) \cdot \sqrt[3]{\sqrt[3]{y}}\right)}\right) + \mathsf{fma}\left(\log \left({y}^{\frac{1}{3}}\right), x - 1, \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)\right) - t\]
  14. Applied associate-*r*0.5

    \[\leadsto \left(\left(x - 1\right) \cdot \log \color{blue}{\left(\left(\sqrt[3]{y} \cdot \left(\sqrt[3]{\sqrt[3]{y}} \cdot \sqrt[3]{\sqrt[3]{y}}\right)\right) \cdot \sqrt[3]{\sqrt[3]{y}}\right)} + \mathsf{fma}\left(\log \left({y}^{\frac{1}{3}}\right), x - 1, \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)\right) - t\]
  15. Simplified0.4

    \[\leadsto \left(\left(x - 1\right) \cdot \log \left(\color{blue}{{\left(\sqrt[3]{y}\right)}^{\frac{5}{3}}} \cdot \sqrt[3]{\sqrt[3]{y}}\right) + \mathsf{fma}\left(\log \left({y}^{\frac{1}{3}}\right), x - 1, \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)\right) - t\]
  16. Final simplification0.4

    \[\leadsto \left(\left(x - 1\right) \cdot \log \left({\left(\sqrt[3]{y}\right)}^{\frac{5}{3}} \cdot \sqrt[3]{\sqrt[3]{y}}\right) + \mathsf{fma}\left(\log \left({y}^{\frac{1}{3}}\right), x - 1, \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)\right) - t\]

Reproduce

herbie shell --seed 2020047 +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))