Average Error: 0.1 → 0.1
Time: 5.1s
Precision: 64
\[\left(x \cdot \log y - z\right) - y\]
\[\left(\log \left(\sqrt{y}\right) \cdot x + \left(\log \left(\sqrt{y}\right) \cdot x - z\right)\right) - y\]
\left(x \cdot \log y - z\right) - y
\left(\log \left(\sqrt{y}\right) \cdot x + \left(\log \left(\sqrt{y}\right) \cdot x - z\right)\right) - y
double f(double x, double y, double z) {
        double r23338 = x;
        double r23339 = y;
        double r23340 = log(r23339);
        double r23341 = r23338 * r23340;
        double r23342 = z;
        double r23343 = r23341 - r23342;
        double r23344 = r23343 - r23339;
        return r23344;
}

double f(double x, double y, double z) {
        double r23345 = y;
        double r23346 = sqrt(r23345);
        double r23347 = log(r23346);
        double r23348 = x;
        double r23349 = r23347 * r23348;
        double r23350 = z;
        double r23351 = r23349 - r23350;
        double r23352 = r23349 + r23351;
        double r23353 = r23352 - r23345;
        return r23353;
}

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 add-sqr-sqrt0.1

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

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

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

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

    \[\leadsto \left(\log \left(\sqrt{y}\right) \cdot x + \left(\log \left(\sqrt{y}\right) \cdot x - z\right)\right) - y\]

Reproduce

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