Average Error: 0.4 → 0.3
Time: 50.0s
Precision: 64
Internal Precision: 320
\[\left(\left(\left(e + d\right) + c\right) + b\right) + a\]
\[\left(\left(e + c\right) + d\right) + \left(a + b\right)\]

Error

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus d

Bits error versus e

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 add-sqr-sqrt0.6

    \[\leadsto \left(\color{blue}{\sqrt{\left(e + d\right) + c} \cdot \sqrt{\left(e + d\right) + c}} + b\right) + a\]
  4. Applied fma-def0.5

    \[\leadsto \color{blue}{(\left(\sqrt{\left(e + d\right) + c}\right) \cdot \left(\sqrt{\left(e + d\right) + c}\right) + b)_*} + a\]
  5. Taylor expanded around 0 0.5

    \[\leadsto (\left(\sqrt{\left(e + d\right) + c}\right) \cdot \left(\sqrt{\color{blue}{c + \left(d + e\right)}}\right) + b)_* + a\]
  6. Applied simplify0.3

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

Runtime

Time bar (total: 50.0s)Debug logProfile

herbie shell --seed '#(1071246582 2318319007 2683472949 3810440501 3233274817 2724848749)' +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))