Average Error: 0.1 → 0.1
Time: 40.0s
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 r6764050 = x;
        double r6764051 = y;
        double r6764052 = log(r6764051);
        double r6764053 = r6764050 * r6764052;
        double r6764054 = r6764053 - r6764051;
        double r6764055 = z;
        double r6764056 = r6764054 - r6764055;
        double r6764057 = t;
        double r6764058 = log(r6764057);
        double r6764059 = r6764056 + r6764058;
        return r6764059;
}

double f(double x, double y, double z, double t) {
        double r6764060 = y;
        double r6764061 = log(r6764060);
        double r6764062 = x;
        double r6764063 = t;
        double r6764064 = log(r6764063);
        double r6764065 = fma(r6764061, r6764062, r6764064);
        double r6764066 = z;
        double r6764067 = r6764065 - r6764066;
        double r6764068 = r6764067 - r6764060;
        return r6764068;
}

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