Average Error: 0.1 → 0.1
Time: 13.5s
Precision: 64
\[\left(\left(x \cdot \log y - y\right) - z\right) + \log t\]
\[\mathsf{fma}\left(\log y, x, \log t\right) - \left(y + z\right)\]
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\mathsf{fma}\left(\log y, x, \log t\right) - \left(y + z\right)
double f(double x, double y, double z, double t) {
        double r121382 = x;
        double r121383 = y;
        double r121384 = log(r121383);
        double r121385 = r121382 * r121384;
        double r121386 = r121385 - r121383;
        double r121387 = z;
        double r121388 = r121386 - r121387;
        double r121389 = t;
        double r121390 = log(r121389);
        double r121391 = r121388 + r121390;
        return r121391;
}

double f(double x, double y, double z, double t) {
        double r121392 = y;
        double r121393 = log(r121392);
        double r121394 = x;
        double r121395 = t;
        double r121396 = log(r121395);
        double r121397 = fma(r121393, r121394, r121396);
        double r121398 = z;
        double r121399 = r121392 + r121398;
        double r121400 = r121397 - r121399;
        return r121400;
}

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

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

Reproduce

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