Average Error: 6.7 → 0.5
Time: 18.2s
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(\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\]
\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(\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
double f(double x, double y, double z, double t) {
        double r52826 = x;
        double r52827 = 1.0;
        double r52828 = r52826 - r52827;
        double r52829 = y;
        double r52830 = log(r52829);
        double r52831 = r52828 * r52830;
        double r52832 = z;
        double r52833 = r52832 - r52827;
        double r52834 = r52827 - r52829;
        double r52835 = log(r52834);
        double r52836 = r52833 * r52835;
        double r52837 = r52831 + r52836;
        double r52838 = t;
        double r52839 = r52837 - r52838;
        return r52839;
}

double f(double x, double y, double z, double t) {
        double r52840 = y;
        double r52841 = cbrt(r52840);
        double r52842 = r52841 * r52841;
        double r52843 = log(r52842);
        double r52844 = x;
        double r52845 = 1.0;
        double r52846 = r52844 - r52845;
        double r52847 = r52843 * r52846;
        double r52848 = log(r52841);
        double r52849 = log(r52845);
        double r52850 = 0.5;
        double r52851 = 2.0;
        double r52852 = pow(r52840, r52851);
        double r52853 = pow(r52845, r52851);
        double r52854 = r52852 / r52853;
        double r52855 = r52850 * r52854;
        double r52856 = fma(r52845, r52840, r52855);
        double r52857 = r52849 - r52856;
        double r52858 = z;
        double r52859 = r52858 - r52845;
        double r52860 = r52857 * r52859;
        double r52861 = fma(r52848, r52846, r52860);
        double r52862 = r52847 + r52861;
        double r52863 = t;
        double r52864 = r52862 - r52863;
        return r52864;
}

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.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-rgt-in0.5

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

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

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

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

Reproduce

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