Average Error: 0.1 → 0.1
Time: 56.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 r9594781 = x;
        double r9594782 = y;
        double r9594783 = log(r9594782);
        double r9594784 = r9594781 * r9594783;
        double r9594785 = r9594784 - r9594782;
        double r9594786 = z;
        double r9594787 = r9594785 - r9594786;
        double r9594788 = t;
        double r9594789 = log(r9594788);
        double r9594790 = r9594787 + r9594789;
        return r9594790;
}

double f(double x, double y, double z, double t) {
        double r9594791 = y;
        double r9594792 = log(r9594791);
        double r9594793 = x;
        double r9594794 = t;
        double r9594795 = log(r9594794);
        double r9594796 = fma(r9594792, r9594793, r9594795);
        double r9594797 = z;
        double r9594798 = r9594796 - r9594797;
        double r9594799 = r9594798 - r9594791;
        return r9594799;
}

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