Average Error: 0.1 → 0.1
Time: 23.3s
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 r90179 = x;
        double r90180 = y;
        double r90181 = log(r90180);
        double r90182 = r90179 * r90181;
        double r90183 = r90182 - r90180;
        double r90184 = z;
        double r90185 = r90183 - r90184;
        double r90186 = t;
        double r90187 = log(r90186);
        double r90188 = r90185 + r90187;
        return r90188;
}

double f(double x, double y, double z, double t) {
        double r90189 = x;
        double r90190 = y;
        double r90191 = log(r90190);
        double r90192 = t;
        double r90193 = log(r90192);
        double r90194 = z;
        double r90195 = r90193 - r90194;
        double r90196 = fma(r90189, r90191, r90195);
        double r90197 = r90196 - r90190;
        return r90197;
}

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