Average Error: 0.1 → 0.1
Time: 18.8s
Precision: 64
\[\left(x \cdot \log y - z\right) - y\]
\[\mathsf{fma}\left(x, 2 \cdot \log \left(\sqrt[3]{y}\right), x \cdot \log \left(\sqrt[3]{y}\right)\right) + \left(\left(-z\right) - y\right)\]
\left(x \cdot \log y - z\right) - y
\mathsf{fma}\left(x, 2 \cdot \log \left(\sqrt[3]{y}\right), x \cdot \log \left(\sqrt[3]{y}\right)\right) + \left(\left(-z\right) - y\right)
double f(double x, double y, double z) {
        double r27398 = x;
        double r27399 = y;
        double r27400 = log(r27399);
        double r27401 = r27398 * r27400;
        double r27402 = z;
        double r27403 = r27401 - r27402;
        double r27404 = r27403 - r27399;
        return r27404;
}

double f(double x, double y, double z) {
        double r27405 = x;
        double r27406 = 2.0;
        double r27407 = y;
        double r27408 = cbrt(r27407);
        double r27409 = log(r27408);
        double r27410 = r27406 * r27409;
        double r27411 = r27405 * r27409;
        double r27412 = fma(r27405, r27410, r27411);
        double r27413 = z;
        double r27414 = -r27413;
        double r27415 = r27414 - r27407;
        double r27416 = r27412 + r27415;
        return r27416;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Derivation

  1. Initial program 0.1

    \[\left(x \cdot \log y - z\right) - y\]
  2. Using strategy rm
  3. Applied sub-neg0.1

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

    \[\leadsto \color{blue}{x \cdot \log y + \left(\left(-z\right) - y\right)}\]
  5. Using strategy rm
  6. Applied add-cube-cbrt0.1

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

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

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

    \[\leadsto \left(\color{blue}{x \cdot \left(2 \cdot \log \left(\sqrt[3]{y}\right)\right)} + x \cdot \log \left(\sqrt[3]{y}\right)\right) + \left(\left(-z\right) - y\right)\]
  10. Using strategy rm
  11. Applied fma-def0.1

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

    \[\leadsto \mathsf{fma}\left(x, 2 \cdot \log \left(\sqrt[3]{y}\right), x \cdot \log \left(\sqrt[3]{y}\right)\right) + \left(\left(-z\right) - y\right)\]

Reproduce

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