Average Error: 6.9 → 0.4
Time: 43.0s
Precision: 64
\[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t\]
\[\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \mathsf{fma}\left(\log \left({\left({y}^{\left(\sqrt{\frac{1}{3}}\right)}\right)}^{\left(\sqrt{\frac{1}{3}}\right)}\right), x - 1, \left(\log 1 - \mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right) \cdot \left(z - 1\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(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \mathsf{fma}\left(\log \left({\left({y}^{\left(\sqrt{\frac{1}{3}}\right)}\right)}^{\left(\sqrt{\frac{1}{3}}\right)}\right), x - 1, \left(\log 1 - \mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right) \cdot \left(z - 1\right)\right)\right) - t
double f(double x, double y, double z, double t) {
        double r45426 = x;
        double r45427 = 1.0;
        double r45428 = r45426 - r45427;
        double r45429 = y;
        double r45430 = log(r45429);
        double r45431 = r45428 * r45430;
        double r45432 = z;
        double r45433 = r45432 - r45427;
        double r45434 = r45427 - r45429;
        double r45435 = log(r45434);
        double r45436 = r45433 * r45435;
        double r45437 = r45431 + r45436;
        double r45438 = t;
        double r45439 = r45437 - r45438;
        return r45439;
}

double f(double x, double y, double z, double t) {
        double r45440 = y;
        double r45441 = cbrt(r45440);
        double r45442 = r45441 * r45441;
        double r45443 = log(r45442);
        double r45444 = x;
        double r45445 = 1.0;
        double r45446 = r45444 - r45445;
        double r45447 = r45443 * r45446;
        double r45448 = 0.3333333333333333;
        double r45449 = sqrt(r45448);
        double r45450 = pow(r45440, r45449);
        double r45451 = pow(r45450, r45449);
        double r45452 = log(r45451);
        double r45453 = log(r45445);
        double r45454 = 0.5;
        double r45455 = 2.0;
        double r45456 = pow(r45440, r45455);
        double r45457 = pow(r45445, r45455);
        double r45458 = r45456 / r45457;
        double r45459 = r45454 * r45458;
        double r45460 = fma(r45445, r45440, r45459);
        double r45461 = r45453 - r45460;
        double r45462 = z;
        double r45463 = r45462 - r45445;
        double r45464 = r45461 * r45463;
        double r45465 = fma(r45452, r45446, r45464);
        double r45466 = r45447 + r45465;
        double r45467 = t;
        double r45468 = r45466 - r45467;
        return r45468;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Derivation

  1. Initial program 6.9

    \[\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.3

    \[\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.3

    \[\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.3

    \[\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.4

    \[\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-rgt-in0.4

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

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

    \[\leadsto \left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \color{blue}{\mathsf{fma}\left(\log \left(\sqrt[3]{y}\right), x - 1, \left(\log 1 - \mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right) \cdot \left(z - 1\right)\right)}\right) - t\]
  10. Using strategy rm
  11. Applied pow1/30.4

    \[\leadsto \left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \mathsf{fma}\left(\log \color{blue}{\left({y}^{\frac{1}{3}}\right)}, x - 1, \left(\log 1 - \mathsf{fma}\left(1, y, \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right) \cdot \left(z - 1\right)\right)\right) - t\]
  12. Using strategy rm
  13. Applied add-sqr-sqrt0.4

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

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

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

Reproduce

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