Average Error: 0.1 → 0.1
Time: 27.4s
Precision: 64
\[\left(\left(x \cdot \log y - y\right) - z\right) + \log t\]
\[\mathsf{fma}\left(\log y, x, \log t - \left(y + z\right)\right)\]
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\mathsf{fma}\left(\log y, x, \log t - \left(y + z\right)\right)
double f(double x, double y, double z, double t) {
        double r3722829 = x;
        double r3722830 = y;
        double r3722831 = log(r3722830);
        double r3722832 = r3722829 * r3722831;
        double r3722833 = r3722832 - r3722830;
        double r3722834 = z;
        double r3722835 = r3722833 - r3722834;
        double r3722836 = t;
        double r3722837 = log(r3722836);
        double r3722838 = r3722835 + r3722837;
        return r3722838;
}

double f(double x, double y, double z, double t) {
        double r3722839 = y;
        double r3722840 = log(r3722839);
        double r3722841 = x;
        double r3722842 = t;
        double r3722843 = log(r3722842);
        double r3722844 = z;
        double r3722845 = r3722839 + r3722844;
        double r3722846 = r3722843 - r3722845;
        double r3722847 = fma(r3722840, r3722841, r3722846);
        return r3722847;
}

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. Using strategy rm
  3. Applied pow10.1

    \[\leadsto \left(\left(x \cdot \log y - y\right) - z\right) + \log \color{blue}{\left({t}^{1}\right)}\]
  4. Applied log-pow0.1

    \[\leadsto \left(\left(x \cdot \log y - y\right) - z\right) + \color{blue}{1 \cdot \log t}\]
  5. Applied *-un-lft-identity0.1

    \[\leadsto \color{blue}{1 \cdot \left(\left(x \cdot \log y - y\right) - z\right)} + 1 \cdot \log t\]
  6. Applied distribute-lft-out0.1

    \[\leadsto \color{blue}{1 \cdot \left(\left(\left(x \cdot \log y - y\right) - z\right) + \log t\right)}\]
  7. Simplified0.1

    \[\leadsto 1 \cdot \color{blue}{\mathsf{fma}\left(\log y, x, \log t - \left(y + z\right)\right)}\]
  8. Final simplification0.1

    \[\leadsto \mathsf{fma}\left(\log y, x, \log t - \left(y + z\right)\right)\]

Reproduce

herbie shell --seed 2019170 +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)))