Average Error: 0.0 → 0.1
Time: 7.3s
Precision: 64
\[x \cdot e^{\frac{a}{x}}\]
\[x \cdot \sqrt[3]{{\left(e^{\frac{a}{x}}\right)}^{3}}\]
x \cdot e^{\frac{a}{x}}
x \cdot \sqrt[3]{{\left(e^{\frac{a}{x}}\right)}^{3}}
double f(double x, double a) {
        double r629917 = x;
        double r629918 = a;
        double r629919 = r629918 / r629917;
        double r629920 = exp(r629919);
        double r629921 = r629917 * r629920;
        return r629921;
}

double f(double x, double a) {
        double r629922 = x;
        double r629923 = a;
        double r629924 = r629923 / r629922;
        double r629925 = exp(r629924);
        double r629926 = 3.0;
        double r629927 = pow(r629925, r629926);
        double r629928 = cbrt(r629927);
        double r629929 = r629922 * r629928;
        return r629929;
}

Error

Bits error versus x

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[x \cdot e^{\frac{a}{x}}\]
  2. Using strategy rm
  3. Applied add-cbrt-cube0.1

    \[\leadsto x \cdot \color{blue}{\sqrt[3]{\left(e^{\frac{a}{x}} \cdot e^{\frac{a}{x}}\right) \cdot e^{\frac{a}{x}}}}\]
  4. Simplified0.1

    \[\leadsto x \cdot \sqrt[3]{\color{blue}{{\left(e^{\frac{a}{x}}\right)}^{3}}}\]
  5. Final simplification0.1

    \[\leadsto x \cdot \sqrt[3]{{\left(e^{\frac{a}{x}}\right)}^{3}}\]

Reproduce

herbie shell --seed 1 
(FPCore (x a)
  :name "x*exp(a/x)"
  :precision binary64
  (* x (exp (/ a x))))