Average Error: 0.1 → 0.1
Time: 12.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 r123083 = x;
        double r123084 = y;
        double r123085 = log(r123084);
        double r123086 = r123083 * r123085;
        double r123087 = r123086 - r123084;
        double r123088 = z;
        double r123089 = r123087 - r123088;
        double r123090 = t;
        double r123091 = log(r123090);
        double r123092 = r123089 + r123091;
        return r123092;
}

double f(double x, double y, double z, double t) {
        double r123093 = y;
        double r123094 = log(r123093);
        double r123095 = x;
        double r123096 = t;
        double r123097 = log(r123096);
        double r123098 = fma(r123094, r123095, r123097);
        double r123099 = z;
        double r123100 = r123093 + r123099;
        double r123101 = r123098 - r123100;
        return r123101;
}

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