Average Error: 0.1 → 0.1
Time: 26.2s
Precision: 64
\[\left(\left(x \cdot \log y - y\right) - z\right) + \log t\]
\[\mathsf{fma}\left(x, \log y, \log t - z\right) - y\]
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\mathsf{fma}\left(x, \log y, \log t - z\right) - y
double f(double x, double y, double z, double t) {
        double r93243 = x;
        double r93244 = y;
        double r93245 = log(r93244);
        double r93246 = r93243 * r93245;
        double r93247 = r93246 - r93244;
        double r93248 = z;
        double r93249 = r93247 - r93248;
        double r93250 = t;
        double r93251 = log(r93250);
        double r93252 = r93249 + r93251;
        return r93252;
}

double f(double x, double y, double z, double t) {
        double r93253 = x;
        double r93254 = y;
        double r93255 = log(r93254);
        double r93256 = t;
        double r93257 = log(r93256);
        double r93258 = z;
        double r93259 = r93257 - r93258;
        double r93260 = fma(r93253, r93255, r93259);
        double r93261 = r93260 - r93254;
        return r93261;
}

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

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

Reproduce

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