Average Error: 0.1 → 0.1
Time: 30.3s
Precision: 64
\[\left(\left(x \cdot \log y - y\right) - z\right) + \log t\]
\[\left(\mathsf{fma}\left(\log y, x, \log t\right) - z\right) - y\]
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\left(\mathsf{fma}\left(\log y, x, \log t\right) - z\right) - y
double f(double x, double y, double z, double t) {
        double r5833311 = x;
        double r5833312 = y;
        double r5833313 = log(r5833312);
        double r5833314 = r5833311 * r5833313;
        double r5833315 = r5833314 - r5833312;
        double r5833316 = z;
        double r5833317 = r5833315 - r5833316;
        double r5833318 = t;
        double r5833319 = log(r5833318);
        double r5833320 = r5833317 + r5833319;
        return r5833320;
}

double f(double x, double y, double z, double t) {
        double r5833321 = y;
        double r5833322 = log(r5833321);
        double r5833323 = x;
        double r5833324 = t;
        double r5833325 = log(r5833324);
        double r5833326 = fma(r5833322, r5833323, r5833325);
        double r5833327 = z;
        double r5833328 = r5833326 - r5833327;
        double r5833329 = r5833328 - r5833321;
        return r5833329;
}

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(\log y, x, \log t\right) - z\right) - y}\]
  3. Final simplification0.1

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

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)))