Average Error: 0.1 → 0.1
Time: 21.6s
Precision: 64
\[\left(\left(x \cdot \log y - y\right) - z\right) + \log t\]
\[\mathsf{fma}\left(y, -1, y\right) + \mathsf{fma}\left(x, \log y, \left(\left(\log \left(\sqrt[3]{t}\right) - z\right) - y\right) + \log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right)\right)\]
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\mathsf{fma}\left(y, -1, y\right) + \mathsf{fma}\left(x, \log y, \left(\left(\log \left(\sqrt[3]{t}\right) - z\right) - y\right) + \log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right)\right)
double f(double x, double y, double z, double t) {
        double r5124892 = x;
        double r5124893 = y;
        double r5124894 = log(r5124893);
        double r5124895 = r5124892 * r5124894;
        double r5124896 = r5124895 - r5124893;
        double r5124897 = z;
        double r5124898 = r5124896 - r5124897;
        double r5124899 = t;
        double r5124900 = log(r5124899);
        double r5124901 = r5124898 + r5124900;
        return r5124901;
}

double f(double x, double y, double z, double t) {
        double r5124902 = y;
        double r5124903 = -1.0;
        double r5124904 = fma(r5124902, r5124903, r5124902);
        double r5124905 = x;
        double r5124906 = log(r5124902);
        double r5124907 = t;
        double r5124908 = cbrt(r5124907);
        double r5124909 = log(r5124908);
        double r5124910 = z;
        double r5124911 = r5124909 - r5124910;
        double r5124912 = r5124911 - r5124902;
        double r5124913 = r5124908 * r5124908;
        double r5124914 = log(r5124913);
        double r5124915 = r5124912 + r5124914;
        double r5124916 = fma(r5124905, r5124906, r5124915);
        double r5124917 = r5124904 + r5124916;
        return r5124917;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Derivation

  1. Initial program 0.1

    \[\left(\left(x \cdot \log y - y\right) - z\right) + \log t\]
  2. Simplified0.1

    \[\leadsto \color{blue}{\left(\mathsf{fma}\left(x, \log y, \log t\right) - z\right) - y}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt0.5

    \[\leadsto \left(\mathsf{fma}\left(x, \log y, \log t\right) - z\right) - \color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}\]
  5. Applied add-sqr-sqrt32.3

    \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(x, \log y, \log t\right) - z} \cdot \sqrt{\mathsf{fma}\left(x, \log y, \log t\right) - z}} - \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}\]
  6. Applied prod-diff32.3

    \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt{\mathsf{fma}\left(x, \log y, \log t\right) - z}, \sqrt{\mathsf{fma}\left(x, \log y, \log t\right) - z}, -\sqrt[3]{y} \cdot \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)\right) + \mathsf{fma}\left(-\sqrt[3]{y}, \sqrt[3]{y} \cdot \sqrt[3]{y}, \sqrt[3]{y} \cdot \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)\right)}\]
  7. Simplified0.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(x, \log y, \left(\log t - z\right) - y\right)} + \mathsf{fma}\left(-\sqrt[3]{y}, \sqrt[3]{y} \cdot \sqrt[3]{y}, \sqrt[3]{y} \cdot \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)\right)\]
  8. Simplified0.1

    \[\leadsto \mathsf{fma}\left(x, \log y, \left(\log t - z\right) - y\right) + \color{blue}{\mathsf{fma}\left(y, -1, y\right)}\]
  9. Using strategy rm
  10. Applied add-cube-cbrt0.1

    \[\leadsto \mathsf{fma}\left(x, \log y, \left(\log \color{blue}{\left(\left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot \sqrt[3]{t}\right)} - z\right) - y\right) + \mathsf{fma}\left(y, -1, y\right)\]
  11. Applied log-prod0.1

    \[\leadsto \mathsf{fma}\left(x, \log y, \left(\color{blue}{\left(\log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) + \log \left(\sqrt[3]{t}\right)\right)} - z\right) - y\right) + \mathsf{fma}\left(y, -1, y\right)\]
  12. Applied associate--l+0.1

    \[\leadsto \mathsf{fma}\left(x, \log y, \color{blue}{\left(\log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) + \left(\log \left(\sqrt[3]{t}\right) - z\right)\right)} - y\right) + \mathsf{fma}\left(y, -1, y\right)\]
  13. Applied associate--l+0.1

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

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

Reproduce

herbie shell --seed 2019163 +o rules:numerics
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, A"
  (+ (- (- (* x (log y)) y) z) (log t)))