Average Error: 0.1 → 0.1
Time: 4.6s
Precision: 64
\[\left(x \cdot \log y - z\right) - y\]
\[\left(\mathsf{fma}\left(x, 2 \cdot \log \left({\left(\frac{1}{y}\right)}^{\frac{-1}{3}}\right), x \cdot \log \left(\sqrt[3]{y}\right)\right) - z\right) - y\]
\left(x \cdot \log y - z\right) - y
\left(\mathsf{fma}\left(x, 2 \cdot \log \left({\left(\frac{1}{y}\right)}^{\frac{-1}{3}}\right), x \cdot \log \left(\sqrt[3]{y}\right)\right) - z\right) - y
double f(double x, double y, double z) {
        double r21572 = x;
        double r21573 = y;
        double r21574 = log(r21573);
        double r21575 = r21572 * r21574;
        double r21576 = z;
        double r21577 = r21575 - r21576;
        double r21578 = r21577 - r21573;
        return r21578;
}

double f(double x, double y, double z) {
        double r21579 = x;
        double r21580 = 2.0;
        double r21581 = 1.0;
        double r21582 = y;
        double r21583 = r21581 / r21582;
        double r21584 = -0.3333333333333333;
        double r21585 = pow(r21583, r21584);
        double r21586 = log(r21585);
        double r21587 = r21580 * r21586;
        double r21588 = cbrt(r21582);
        double r21589 = log(r21588);
        double r21590 = r21579 * r21589;
        double r21591 = fma(r21579, r21587, r21590);
        double r21592 = z;
        double r21593 = r21591 - r21592;
        double r21594 = r21593 - r21582;
        return r21594;
}

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 add-cube-cbrt0.1

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

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

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

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

    \[\leadsto \left(\color{blue}{\mathsf{fma}\left(x, 2 \cdot \log \left(\sqrt[3]{y}\right), x \cdot \log \left(\sqrt[3]{y}\right)\right)} - z\right) - y\]
  9. Taylor expanded around inf 0.1

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

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

Reproduce

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