Average Error: 0.4 → 0.0
Time: 40.8s
Precision: 64
\[1 \le a \le 2 \le b \le 4 \le c \le 8 \le d \le 16 \le e \le 32\]
\[\left(\left(\left(e + d\right) + c\right) + b\right) + a\]
\[\log \left(e^{\log \left(e^{e} \cdot \left(\sqrt{e^{d}} \cdot \left(\sqrt{e^{d}} \cdot \left(\left(e^{a} \cdot e^{c}\right) \cdot e^{b}\right)\right)\right)\right)}\right)\]
\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{\log \left(e^{e} \cdot \left(\sqrt{e^{d}} \cdot \left(\sqrt{e^{d}} \cdot \left(\left(e^{a} \cdot e^{c}\right) \cdot e^{b}\right)\right)\right)\right)}\right)
double f(double a, double b, double c, double d, double e) {
        double r9734709 = e;
        double r9734710 = d;
        double r9734711 = r9734709 + r9734710;
        double r9734712 = c;
        double r9734713 = r9734711 + r9734712;
        double r9734714 = b;
        double r9734715 = r9734713 + r9734714;
        double r9734716 = a;
        double r9734717 = r9734715 + r9734716;
        return r9734717;
}

double f(double a, double b, double c, double d, double e) {
        double r9734718 = e;
        double r9734719 = exp(r9734718);
        double r9734720 = d;
        double r9734721 = exp(r9734720);
        double r9734722 = sqrt(r9734721);
        double r9734723 = a;
        double r9734724 = exp(r9734723);
        double r9734725 = c;
        double r9734726 = exp(r9734725);
        double r9734727 = r9734724 * r9734726;
        double r9734728 = b;
        double r9734729 = exp(r9734728);
        double r9734730 = r9734727 * r9734729;
        double r9734731 = r9734722 * r9734730;
        double r9734732 = r9734722 * r9734731;
        double r9734733 = r9734719 * r9734732;
        double r9734734 = log(r9734733);
        double r9734735 = exp(r9734734);
        double r9734736 = log(r9734735);
        return r9734736;
}

Error

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus d

Bits error versus e

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.4
Target0.2
Herbie0.0
\[\left(d + \left(c + \left(a + b\right)\right)\right) + e\]

Derivation

  1. Initial program 0.4

    \[\left(\left(\left(e + d\right) + c\right) + b\right) + a\]
  2. Using strategy rm
  3. Applied add-log-exp0.4

    \[\leadsto \left(\left(\left(e + d\right) + c\right) + b\right) + \color{blue}{\log \left(e^{a}\right)}\]
  4. Applied add-log-exp0.4

    \[\leadsto \left(\left(\left(e + d\right) + c\right) + \color{blue}{\log \left(e^{b}\right)}\right) + \log \left(e^{a}\right)\]
  5. Applied add-log-exp0.4

    \[\leadsto \left(\left(\left(e + d\right) + \color{blue}{\log \left(e^{c}\right)}\right) + \log \left(e^{b}\right)\right) + \log \left(e^{a}\right)\]
  6. Applied add-log-exp0.4

    \[\leadsto \left(\left(\color{blue}{\log \left(e^{e + d}\right)} + \log \left(e^{c}\right)\right) + \log \left(e^{b}\right)\right) + \log \left(e^{a}\right)\]
  7. Applied sum-log0.4

    \[\leadsto \left(\color{blue}{\log \left(e^{e + d} \cdot e^{c}\right)} + \log \left(e^{b}\right)\right) + \log \left(e^{a}\right)\]
  8. Applied sum-log0.3

    \[\leadsto \color{blue}{\log \left(\left(e^{e + d} \cdot e^{c}\right) \cdot e^{b}\right)} + \log \left(e^{a}\right)\]
  9. Applied sum-log0.2

    \[\leadsto \color{blue}{\log \left(\left(\left(e^{e + d} \cdot e^{c}\right) \cdot e^{b}\right) \cdot e^{a}\right)}\]
  10. Simplified0.3

    \[\leadsto \log \color{blue}{\left(e^{\left(d + e\right) + \left(\left(c + a\right) + b\right)}\right)}\]
  11. Using strategy rm
  12. Applied add-log-exp0.3

    \[\leadsto \log \left(e^{\left(d + e\right) + \color{blue}{\log \left(e^{\left(c + a\right) + b}\right)}}\right)\]
  13. Applied add-log-exp0.3

    \[\leadsto \log \left(e^{\color{blue}{\log \left(e^{d + e}\right)} + \log \left(e^{\left(c + a\right) + b}\right)}\right)\]
  14. Applied sum-log0.3

    \[\leadsto \log \left(e^{\color{blue}{\log \left(e^{d + e} \cdot e^{\left(c + a\right) + b}\right)}}\right)\]
  15. Simplified0.2

    \[\leadsto \log \left(e^{\log \color{blue}{\left(e^{e + \left(d + \left(b + \left(a + c\right)\right)\right)}\right)}}\right)\]
  16. Using strategy rm
  17. Applied add-log-exp0.2

    \[\leadsto \log \left(e^{\log \left(e^{e + \left(d + \left(b + \left(a + \color{blue}{\log \left(e^{c}\right)}\right)\right)\right)}\right)}\right)\]
  18. Applied add-log-exp0.2

    \[\leadsto \log \left(e^{\log \left(e^{e + \left(d + \left(b + \left(\color{blue}{\log \left(e^{a}\right)} + \log \left(e^{c}\right)\right)\right)\right)}\right)}\right)\]
  19. Applied sum-log0.2

    \[\leadsto \log \left(e^{\log \left(e^{e + \left(d + \left(b + \color{blue}{\log \left(e^{a} \cdot e^{c}\right)}\right)\right)}\right)}\right)\]
  20. Applied add-log-exp0.2

    \[\leadsto \log \left(e^{\log \left(e^{e + \left(d + \left(\color{blue}{\log \left(e^{b}\right)} + \log \left(e^{a} \cdot e^{c}\right)\right)\right)}\right)}\right)\]
  21. Applied sum-log0.2

    \[\leadsto \log \left(e^{\log \left(e^{e + \left(d + \color{blue}{\log \left(e^{b} \cdot \left(e^{a} \cdot e^{c}\right)\right)}\right)}\right)}\right)\]
  22. Applied add-log-exp0.2

    \[\leadsto \log \left(e^{\log \left(e^{e + \left(\color{blue}{\log \left(e^{d}\right)} + \log \left(e^{b} \cdot \left(e^{a} \cdot e^{c}\right)\right)\right)}\right)}\right)\]
  23. Applied sum-log0.2

    \[\leadsto \log \left(e^{\log \left(e^{e + \color{blue}{\log \left(e^{d} \cdot \left(e^{b} \cdot \left(e^{a} \cdot e^{c}\right)\right)\right)}}\right)}\right)\]
  24. Applied add-log-exp0.2

    \[\leadsto \log \left(e^{\log \left(e^{\color{blue}{\log \left(e^{e}\right)} + \log \left(e^{d} \cdot \left(e^{b} \cdot \left(e^{a} \cdot e^{c}\right)\right)\right)}\right)}\right)\]
  25. Applied sum-log0.0

    \[\leadsto \log \left(e^{\log \left(e^{\color{blue}{\log \left(e^{e} \cdot \left(e^{d} \cdot \left(e^{b} \cdot \left(e^{a} \cdot e^{c}\right)\right)\right)\right)}}\right)}\right)\]
  26. Applied rem-exp-log0.0

    \[\leadsto \log \left(e^{\log \color{blue}{\left(e^{e} \cdot \left(e^{d} \cdot \left(e^{b} \cdot \left(e^{a} \cdot e^{c}\right)\right)\right)\right)}}\right)\]
  27. Using strategy rm
  28. Applied add-sqr-sqrt0.0

    \[\leadsto \log \left(e^{\log \left(e^{e} \cdot \left(\color{blue}{\left(\sqrt{e^{d}} \cdot \sqrt{e^{d}}\right)} \cdot \left(e^{b} \cdot \left(e^{a} \cdot e^{c}\right)\right)\right)\right)}\right)\]
  29. Applied associate-*l*0.0

    \[\leadsto \log \left(e^{\log \left(e^{e} \cdot \color{blue}{\left(\sqrt{e^{d}} \cdot \left(\sqrt{e^{d}} \cdot \left(e^{b} \cdot \left(e^{a} \cdot e^{c}\right)\right)\right)\right)}\right)}\right)\]
  30. Final simplification0.0

    \[\leadsto \log \left(e^{\log \left(e^{e} \cdot \left(\sqrt{e^{d}} \cdot \left(\sqrt{e^{d}} \cdot \left(\left(e^{a} \cdot e^{c}\right) \cdot e^{b}\right)\right)\right)\right)}\right)\]

Reproduce

herbie shell --seed 2019119 +o rules:numerics
(FPCore (a b c d e)
  :name "Expression 1, p15"
  :pre (<= 1 a 2 b 4 c 8 d 16 e 32)

  :herbie-target
  (+ (+ d (+ c (+ a b))) e)

  (+ (+ (+ (+ e d) c) b) a))