Average Error: 7.0 → 0.4
Time: 39.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(x - 1\right) \cdot \log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) + \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\]
\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(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) + \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
double f(double x, double y, double z, double t) {
        double r49278 = x;
        double r49279 = 1.0;
        double r49280 = r49278 - r49279;
        double r49281 = y;
        double r49282 = log(r49281);
        double r49283 = r49280 * r49282;
        double r49284 = z;
        double r49285 = r49284 - r49279;
        double r49286 = r49279 - r49281;
        double r49287 = log(r49286);
        double r49288 = r49285 * r49287;
        double r49289 = r49283 + r49288;
        double r49290 = t;
        double r49291 = r49289 - r49290;
        return r49291;
}

double f(double x, double y, double z, double t) {
        double r49292 = x;
        double r49293 = 1.0;
        double r49294 = r49292 - r49293;
        double r49295 = y;
        double r49296 = cbrt(r49295);
        double r49297 = r49296 * r49296;
        double r49298 = log(r49297);
        double r49299 = r49294 * r49298;
        double r49300 = log(r49296);
        double r49301 = z;
        double r49302 = r49301 - r49293;
        double r49303 = log(r49293);
        double r49304 = 0.5;
        double r49305 = 2.0;
        double r49306 = pow(r49295, r49305);
        double r49307 = pow(r49293, r49305);
        double r49308 = r49306 / r49307;
        double r49309 = r49304 * r49308;
        double r49310 = fma(r49293, r49295, r49309);
        double r49311 = r49303 - r49310;
        double r49312 = r49302 * r49311;
        double r49313 = fma(r49300, r49294, r49312);
        double r49314 = r49299 + r49313;
        double r49315 = t;
        double r49316 = r49314 - r49315;
        return r49316;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Derivation

  1. Initial program 7.0

    \[\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-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. Applied associate-+l+0.4

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

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

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

Reproduce

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