Average Error: 0.0 → 0.1
Time: 19.8s
Precision: 64
\[e^{\left(x + y \cdot \log y\right) - z}\]
\[{\left(e^{\sqrt[3]{\left(\mathsf{fma}\left(y, \log y, x - z\right) \cdot \mathsf{fma}\left(y, \log y, x - z\right)\right) \cdot \left(27 \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(\mathsf{fma}\left(y, \log y, x - z\right) \cdot \mathsf{fma}\left(y, \log y, x - z\right)\right) \cdot \left(27 \cdot \mathsf{fma}\left(y, \log y, x - z\right)\right)}}\right)}^{\frac{1}{3}}
double f(double x, double y, double z) {
        double r11795406 = x;
        double r11795407 = y;
        double r11795408 = log(r11795407);
        double r11795409 = r11795407 * r11795408;
        double r11795410 = r11795406 + r11795409;
        double r11795411 = z;
        double r11795412 = r11795410 - r11795411;
        double r11795413 = exp(r11795412);
        return r11795413;
}

double f(double x, double y, double z) {
        double r11795414 = y;
        double r11795415 = log(r11795414);
        double r11795416 = x;
        double r11795417 = z;
        double r11795418 = r11795416 - r11795417;
        double r11795419 = fma(r11795414, r11795415, r11795418);
        double r11795420 = r11795419 * r11795419;
        double r11795421 = 27.0;
        double r11795422 = r11795421 * r11795419;
        double r11795423 = r11795420 * r11795422;
        double r11795424 = cbrt(r11795423);
        double r11795425 = exp(r11795424);
        double r11795426 = 0.3333333333333333;
        double r11795427 = pow(r11795425, r11795426);
        return r11795427;
}

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 - z\right)}}\]
  3. Using strategy rm
  4. Applied expm1-log1p-u0.0

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

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

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

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

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

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

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

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

    \[\leadsto {\left(e^{\sqrt[3]{\left(\mathsf{fma}\left(y, \log y, x - z\right) \cdot \mathsf{fma}\left(y, \log y, x - z\right)\right) \cdot \left(27 \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)))