Average Error: 0.1 → 0.1
Time: 13.2s
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 r128571 = x;
        double r128572 = y;
        double r128573 = log(r128572);
        double r128574 = r128571 * r128573;
        double r128575 = r128574 - r128572;
        double r128576 = z;
        double r128577 = r128575 - r128576;
        double r128578 = t;
        double r128579 = log(r128578);
        double r128580 = r128577 + r128579;
        return r128580;
}

double f(double x, double y, double z, double t) {
        double r128581 = y;
        double r128582 = log(r128581);
        double r128583 = x;
        double r128584 = t;
        double r128585 = log(r128584);
        double r128586 = fma(r128582, r128583, r128585);
        double r128587 = z;
        double r128588 = r128581 + r128587;
        double r128589 = r128586 - r128588;
        return r128589;
}

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