Average Error: 0.1 → 0.1
Time: 4.8s
Precision: 64
\[\left(x \cdot \log y - z\right) - y\]
\[\left(\mathsf{fma}\left(x, 2 \cdot \log \left(\sqrt[3]{y}\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(\sqrt[3]{y}\right), x \cdot \log \left(\sqrt[3]{y}\right)\right) - z\right) - y
double f(double x, double y, double z) {
        double r31455 = x;
        double r31456 = y;
        double r31457 = log(r31456);
        double r31458 = r31455 * r31457;
        double r31459 = z;
        double r31460 = r31458 - r31459;
        double r31461 = r31460 - r31456;
        return r31461;
}

double f(double x, double y, double z) {
        double r31462 = x;
        double r31463 = 2.0;
        double r31464 = y;
        double r31465 = cbrt(r31464);
        double r31466 = log(r31465);
        double r31467 = r31463 * r31466;
        double r31468 = r31462 * r31466;
        double r31469 = fma(r31462, r31467, r31468);
        double r31470 = z;
        double r31471 = r31469 - r31470;
        double r31472 = r31471 - r31464;
        return r31472;
}

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. Final simplification0.1

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

Reproduce

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