Average Error: 0.0 → 0.1
Time: 19.7s
Precision: 64
\[e^{\left(x + y \cdot \log y\right) - z}\]
\[{\left(e^{\sqrt[3]{\left(27 \cdot \mathsf{fma}\left(y, \log y, x - z\right)\right) \cdot \left(\mathsf{fma}\left(y, \log y, x - z\right) \cdot \mathsf{fma}\left(y, \log y, x - z\right)\right)}}\right)}^{\frac{1}{3}}\]
e^{\left(x + y \cdot \log y\right) - z}
{\left(e^{\sqrt[3]{\left(27 \cdot \mathsf{fma}\left(y, \log y, x - z\right)\right) \cdot \left(\mathsf{fma}\left(y, \log y, x - z\right) \cdot \mathsf{fma}\left(y, \log y, x - z\right)\right)}}\right)}^{\frac{1}{3}}
double f(double x, double y, double z) {
        double r12488572 = x;
        double r12488573 = y;
        double r12488574 = log(r12488573);
        double r12488575 = r12488573 * r12488574;
        double r12488576 = r12488572 + r12488575;
        double r12488577 = z;
        double r12488578 = r12488576 - r12488577;
        double r12488579 = exp(r12488578);
        return r12488579;
}

double f(double x, double y, double z) {
        double r12488580 = 27.0;
        double r12488581 = y;
        double r12488582 = log(r12488581);
        double r12488583 = x;
        double r12488584 = z;
        double r12488585 = r12488583 - r12488584;
        double r12488586 = fma(r12488581, r12488582, r12488585);
        double r12488587 = r12488580 * r12488586;
        double r12488588 = r12488586 * r12488586;
        double r12488589 = r12488587 * r12488588;
        double r12488590 = cbrt(r12488589);
        double r12488591 = exp(r12488590);
        double r12488592 = 0.3333333333333333;
        double r12488593 = pow(r12488591, r12488592);
        return r12488593;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original0.0
Target0.0
Herbie0.1
\[e^{\left(x - z\right) + \log y \cdot y}\]

Derivation

  1. Initial program 0.0

    \[e^{\left(x + y \cdot \log y\right) - z}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{e^{\mathsf{fma}\left(\log y, y, x\right) - z}}\]
  3. Using strategy rm
  4. Applied add-cbrt-cube0.1

    \[\leadsto \color{blue}{\sqrt[3]{\left(e^{\mathsf{fma}\left(\log y, y, x\right) - z} \cdot e^{\mathsf{fma}\left(\log y, y, x\right) - z}\right) \cdot e^{\mathsf{fma}\left(\log y, y, x\right) - z}}}\]
  5. Simplified0.1

    \[\leadsto \sqrt[3]{\color{blue}{e^{3 \cdot \left(\mathsf{fma}\left(y, \log y, x\right) - z\right)}}}\]
  6. Using strategy rm
  7. Applied pow1/30.1

    \[\leadsto \color{blue}{{\left(e^{3 \cdot \left(\mathsf{fma}\left(y, \log y, x\right) - z\right)}\right)}^{\frac{1}{3}}}\]
  8. Using strategy rm
  9. Applied add-cbrt-cube0.1

    \[\leadsto {\left(e^{3 \cdot \color{blue}{\sqrt[3]{\left(\left(\mathsf{fma}\left(y, \log y, x\right) - z\right) \cdot \left(\mathsf{fma}\left(y, \log y, x\right) - z\right)\right) \cdot \left(\mathsf{fma}\left(y, \log y, x\right) - z\right)}}}\right)}^{\frac{1}{3}}\]
  10. Applied add-cbrt-cube0.1

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

    \[\leadsto {\left(e^{\color{blue}{\sqrt[3]{\left(\left(3 \cdot 3\right) \cdot 3\right) \cdot \left(\left(\left(\mathsf{fma}\left(y, \log y, x\right) - z\right) \cdot \left(\mathsf{fma}\left(y, \log y, x\right) - z\right)\right) \cdot \left(\mathsf{fma}\left(y, \log y, x\right) - z\right)\right)}}}\right)}^{\frac{1}{3}}\]
  12. Simplified0.1

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

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

Reproduce

herbie shell --seed 2019163 +o rules:numerics
(FPCore (x y z)
  :name "Statistics.Distribution.Poisson.Internal:probability from math-functions-0.1.5.2"

  :herbie-target
  (exp (+ (- x z) (* (log y) y)))

  (exp (- (+ x (* y (log y))) z)))