Average Error: 0.4 → 0.3
Time: 15.6s
Precision: 64
Internal Precision: 128
\[\left(\left(\left(e + d\right) + c\right) + b\right) + a\]
\[\log \left(e^{\left(\left(a + d\right) + e\right) + \left(b + c\right)}\right)\]

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.3
\[\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 associate-+l+0.3

    \[\leadsto \color{blue}{\left(\left(e + d\right) + c\right) + \left(b + a\right)}\]
  4. Taylor expanded around 0 0.3

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

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

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

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

    \[\leadsto \log \color{blue}{\left(e^{\left(\left(c + b\right) + \left(a + d\right)\right) + e}\right)}\]
  10. Using strategy rm
  11. Applied associate-+l+0.3

    \[\leadsto \log \left(e^{\color{blue}{\left(c + b\right) + \left(\left(a + d\right) + e\right)}}\right)\]
  12. Final simplification0.3

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

Reproduce

herbie shell --seed 2019030 +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))