Average Error: 0.1 → 0.2
Time: 23.4s
Precision: 64
\[\left(\left(x \cdot \log y - y\right) - z\right) + \log t\]
\[\mathsf{fma}\left(x, \log y, \mathsf{fma}\left(\sqrt[3]{\log t} \cdot \sqrt[3]{\log t}, \sqrt[3]{\log t}, -z\right) - y\right)\]
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\mathsf{fma}\left(x, \log y, \mathsf{fma}\left(\sqrt[3]{\log t} \cdot \sqrt[3]{\log t}, \sqrt[3]{\log t}, -z\right) - y\right)
double f(double x, double y, double z, double t) {
        double r4081083 = x;
        double r4081084 = y;
        double r4081085 = log(r4081084);
        double r4081086 = r4081083 * r4081085;
        double r4081087 = r4081086 - r4081084;
        double r4081088 = z;
        double r4081089 = r4081087 - r4081088;
        double r4081090 = t;
        double r4081091 = log(r4081090);
        double r4081092 = r4081089 + r4081091;
        return r4081092;
}

double f(double x, double y, double z, double t) {
        double r4081093 = x;
        double r4081094 = y;
        double r4081095 = log(r4081094);
        double r4081096 = t;
        double r4081097 = log(r4081096);
        double r4081098 = cbrt(r4081097);
        double r4081099 = r4081098 * r4081098;
        double r4081100 = z;
        double r4081101 = -r4081100;
        double r4081102 = fma(r4081099, r4081098, r4081101);
        double r4081103 = r4081102 - r4081094;
        double r4081104 = fma(r4081093, r4081095, r4081103);
        return r4081104;
}

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}{\mathsf{fma}\left(x, \log y, \log t - \left(y + z\right)\right)}\]
  3. Taylor expanded around -inf 64.0

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

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

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

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

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

Reproduce

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