Average Error: 0.1 → 0.1
Time: 9.2s
Precision: 64
\[\left(x \cdot \log y - z\right) - y\]
\[\log 1 \cdot x + \left(\left(x \cdot \log y - y\right) - z\right)\]
\left(x \cdot \log y - z\right) - y
\log 1 \cdot x + \left(\left(x \cdot \log y - y\right) - z\right)
double f(double x, double y, double z) {
        double r21987 = x;
        double r21988 = y;
        double r21989 = log(r21988);
        double r21990 = r21987 * r21989;
        double r21991 = z;
        double r21992 = r21990 - r21991;
        double r21993 = r21992 - r21988;
        return r21993;
}

double f(double x, double y, double z) {
        double r21994 = 1.0;
        double r21995 = log(r21994);
        double r21996 = x;
        double r21997 = r21995 * r21996;
        double r21998 = y;
        double r21999 = log(r21998);
        double r22000 = r21996 * r21999;
        double r22001 = r22000 - r21998;
        double r22002 = z;
        double r22003 = r22001 - r22002;
        double r22004 = r21997 + r22003;
        return r22004;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\left(x \cdot \log y - z\right) - y\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.1

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

    \[\leadsto \left(x \cdot \color{blue}{\left(\log 1 + \log y\right)} - z\right) - y\]
  5. Applied distribute-rgt-in0.1

    \[\leadsto \left(\color{blue}{\left(\log 1 \cdot x + \log y \cdot x\right)} - z\right) - y\]
  6. Applied associate--l+0.1

    \[\leadsto \color{blue}{\left(\log 1 \cdot x + \left(\log y \cdot x - z\right)\right)} - y\]
  7. Applied associate--l+0.1

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

    \[\leadsto \log 1 \cdot x + \color{blue}{\left(\left(x \cdot \log y - y\right) - z\right)}\]
  9. Final simplification0.1

    \[\leadsto \log 1 \cdot x + \left(\left(x \cdot \log y - y\right) - z\right)\]

Reproduce

herbie shell --seed 2020046 
(FPCore (x y z)
  :name "Statistics.Distribution.Poisson:$clogProbability from math-functions-0.1.5.2"
  :precision binary64
  (- (- (* x (log y)) z) y))