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]{\sqrt[3]{y} \cdot \sqrt[3]{y}}\right) + x \cdot \log \left(\sqrt[3]{\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]{\sqrt[3]{y} \cdot \sqrt[3]{y}}\right) + x \cdot \log \left(\sqrt[3]{\sqrt[3]{y}}\right)\right) - z\right) - y
double f(double x, double y, double z) {
        double r22637 = x;
        double r22638 = y;
        double r22639 = log(r22638);
        double r22640 = r22637 * r22639;
        double r22641 = z;
        double r22642 = r22640 - r22641;
        double r22643 = r22642 - r22638;
        return r22643;
}

double f(double x, double y, double z) {
        double r22644 = x;
        double r22645 = 2.0;
        double r22646 = y;
        double r22647 = cbrt(r22646);
        double r22648 = log(r22647);
        double r22649 = r22645 * r22648;
        double r22650 = r22647 * r22647;
        double r22651 = cbrt(r22650);
        double r22652 = log(r22651);
        double r22653 = r22644 * r22652;
        double r22654 = cbrt(r22647);
        double r22655 = log(r22654);
        double r22656 = r22644 * r22655;
        double r22657 = r22653 + r22656;
        double r22658 = fma(r22644, r22649, r22657);
        double r22659 = z;
        double r22660 = r22658 - r22659;
        double r22661 = r22660 - r22646;
        return r22661;
}

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. Using strategy rm
  10. Applied add-cube-cbrt0.1

    \[\leadsto \left(\mathsf{fma}\left(x, 2 \cdot \log \left(\sqrt[3]{y}\right), x \cdot \log \left(\sqrt[3]{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}\right)\right) - z\right) - y\]
  11. Applied cbrt-prod0.1

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

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

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

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

Reproduce

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