Average Error: 6.7 → 0.4
Time: 26.9s
Precision: 64
\[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t\]
\[\left(\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \left(x - 1\right) \cdot \log \left(e^{\log y \cdot \frac{1}{3}}\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\]
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\left(\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \left(x - 1\right) \cdot \log \left(e^{\log y \cdot \frac{1}{3}}\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
double f(double x, double y, double z, double t) {
        double r52291 = x;
        double r52292 = 1.0;
        double r52293 = r52291 - r52292;
        double r52294 = y;
        double r52295 = log(r52294);
        double r52296 = r52293 * r52295;
        double r52297 = z;
        double r52298 = r52297 - r52292;
        double r52299 = r52292 - r52294;
        double r52300 = log(r52299);
        double r52301 = r52298 * r52300;
        double r52302 = r52296 + r52301;
        double r52303 = t;
        double r52304 = r52302 - r52303;
        return r52304;
}

double f(double x, double y, double z, double t) {
        double r52305 = y;
        double r52306 = cbrt(r52305);
        double r52307 = r52306 * r52306;
        double r52308 = log(r52307);
        double r52309 = x;
        double r52310 = 1.0;
        double r52311 = r52309 - r52310;
        double r52312 = r52308 * r52311;
        double r52313 = log(r52305);
        double r52314 = 0.3333333333333333;
        double r52315 = r52313 * r52314;
        double r52316 = exp(r52315);
        double r52317 = log(r52316);
        double r52318 = r52311 * r52317;
        double r52319 = r52312 + r52318;
        double r52320 = z;
        double r52321 = r52320 - r52310;
        double r52322 = log(r52310);
        double r52323 = 0.5;
        double r52324 = 2.0;
        double r52325 = pow(r52305, r52324);
        double r52326 = pow(r52310, r52324);
        double r52327 = r52325 / r52326;
        double r52328 = r52323 * r52327;
        double r52329 = fma(r52310, r52305, r52328);
        double r52330 = r52322 - r52329;
        double r52331 = r52321 * r52330;
        double r52332 = r52319 + r52331;
        double r52333 = t;
        double r52334 = r52332 - r52333;
        return r52334;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Derivation

  1. Initial program 6.7

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

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

    \[\leadsto \left(\left(\color{blue}{\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\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\]
  9. Taylor expanded around inf 0.4

    \[\leadsto \left(\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \left(x - 1\right) \cdot \log \color{blue}{\left({\left(\frac{1}{y}\right)}^{\frac{-1}{3}}\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\]
  10. Using strategy rm
  11. Applied add-exp-log0.4

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

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

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

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

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

Reproduce

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