Average Error: 0.1 → 0.1
Time: 30.7s
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 r105359 = x;
        double r105360 = y;
        double r105361 = log(r105360);
        double r105362 = r105359 * r105361;
        double r105363 = r105362 - r105360;
        double r105364 = z;
        double r105365 = r105363 - r105364;
        double r105366 = t;
        double r105367 = log(r105366);
        double r105368 = r105365 + r105367;
        return r105368;
}

double f(double x, double y, double z, double t) {
        double r105369 = x;
        double r105370 = y;
        double r105371 = log(r105370);
        double r105372 = t;
        double r105373 = log(r105372);
        double r105374 = z;
        double r105375 = r105373 - r105374;
        double r105376 = fma(r105369, r105371, r105375);
        double r105377 = r105376 - r105370;
        return r105377;
}

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