Average Error: 0.3 → 0.2
Time: 18.1s
Precision: 64
\[\frac{e^{x}}{\left(\left(e^{x0} + e^{x1}\right) + e^{x2}\right) + e^{x3}}\]
\[e^{x - \log \left(\left(\sqrt[3]{\left(e^{x0} + e^{x1}\right) + e^{x2}} \cdot \sqrt[3]{\left(e^{x0} + e^{x1}\right) + e^{x2}}\right) \cdot \sqrt[3]{\left(e^{x0} + e^{x1}\right) + e^{x2}} + e^{x3}\right)}\]
\frac{e^{x}}{\left(\left(e^{x0} + e^{x1}\right) + e^{x2}\right) + e^{x3}}
e^{x - \log \left(\left(\sqrt[3]{\left(e^{x0} + e^{x1}\right) + e^{x2}} \cdot \sqrt[3]{\left(e^{x0} + e^{x1}\right) + e^{x2}}\right) \cdot \sqrt[3]{\left(e^{x0} + e^{x1}\right) + e^{x2}} + e^{x3}\right)}
double f(double x, double x0, double x1, double x2, double x3) {
        double r1806970 = x;
        double r1806971 = exp(r1806970);
        double r1806972 = x0;
        double r1806973 = exp(r1806972);
        double r1806974 = x1;
        double r1806975 = exp(r1806974);
        double r1806976 = r1806973 + r1806975;
        double r1806977 = x2;
        double r1806978 = exp(r1806977);
        double r1806979 = r1806976 + r1806978;
        double r1806980 = x3;
        double r1806981 = exp(r1806980);
        double r1806982 = r1806979 + r1806981;
        double r1806983 = r1806971 / r1806982;
        return r1806983;
}

double f(double x, double x0, double x1, double x2, double x3) {
        double r1806984 = x;
        double r1806985 = x0;
        double r1806986 = exp(r1806985);
        double r1806987 = x1;
        double r1806988 = exp(r1806987);
        double r1806989 = r1806986 + r1806988;
        double r1806990 = x2;
        double r1806991 = exp(r1806990);
        double r1806992 = r1806989 + r1806991;
        double r1806993 = cbrt(r1806992);
        double r1806994 = r1806993 * r1806993;
        double r1806995 = r1806994 * r1806993;
        double r1806996 = x3;
        double r1806997 = exp(r1806996);
        double r1806998 = r1806995 + r1806997;
        double r1806999 = log(r1806998);
        double r1807000 = r1806984 - r1806999;
        double r1807001 = exp(r1807000);
        return r1807001;
}

Error

Bits error versus x

Bits error versus x0

Bits error versus x1

Bits error versus x2

Bits error versus x3

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.3

    \[\frac{e^{x}}{\left(\left(e^{x0} + e^{x1}\right) + e^{x2}\right) + e^{x3}}\]
  2. Using strategy rm
  3. Applied add-exp-log0.4

    \[\leadsto \frac{e^{x}}{\color{blue}{e^{\log \left(\left(\left(e^{x0} + e^{x1}\right) + e^{x2}\right) + e^{x3}\right)}}}\]
  4. Applied div-exp0.0

    \[\leadsto \color{blue}{e^{x - \log \left(\left(\left(e^{x0} + e^{x1}\right) + e^{x2}\right) + e^{x3}\right)}}\]
  5. Using strategy rm
  6. Applied add-cube-cbrt0.2

    \[\leadsto e^{x - \log \left(\color{blue}{\left(\sqrt[3]{\left(e^{x0} + e^{x1}\right) + e^{x2}} \cdot \sqrt[3]{\left(e^{x0} + e^{x1}\right) + e^{x2}}\right) \cdot \sqrt[3]{\left(e^{x0} + e^{x1}\right) + e^{x2}}} + e^{x3}\right)}\]
  7. Final simplification0.2

    \[\leadsto e^{x - \log \left(\left(\sqrt[3]{\left(e^{x0} + e^{x1}\right) + e^{x2}} \cdot \sqrt[3]{\left(e^{x0} + e^{x1}\right) + e^{x2}}\right) \cdot \sqrt[3]{\left(e^{x0} + e^{x1}\right) + e^{x2}} + e^{x3}\right)}\]

Reproduce

herbie shell --seed 1 
(FPCore (x x0 x1 x2 x3)
  :name "exp(x)/(exp(x0)+exp(x1)+exp(x2)+exp(x3))"
  :precision binary64
  (/ (exp x) (+ (+ (+ (exp x0) (exp x1)) (exp x2)) (exp x3))))