Average Error: 0.0 → 0.0
Time: 1.8m
Precision: 64
Internal Precision: 384
\[\left(a + b\right) \cdot \left(a + b\right)\]
\[{a}^{2} + \left(2 \cdot \left(b \cdot a\right) + {b}^{2}\right)\]

Error

Bits error versus a

Bits error versus b

Target

Original0.0
Target0.0
Herbie0.0
\[\left(\left(b \cdot a + b \cdot b\right) + b \cdot a\right) + a \cdot a\]

Derivation

  1. Initial program 0.0

    \[\left(a + b\right) \cdot \left(a + b\right)\]
  2. Taylor expanded around 0 0.0

    \[\leadsto \color{blue}{{a}^{2} + \left(2 \cdot \left(b \cdot a\right) + {b}^{2}\right)}\]
  3. Removed slow pow expressions.

Runtime

Time bar (total: 1.8m)Debug logProfile

herbie shell --seed '#(1062930989 876886121 3990119081 3032829768 3060892583 1929069376)' 
(FPCore (a b)
  :name "Expression 4, p15"
  :pre (and (<= 5 a 10) (<= 0 b 0.001))

  :herbie-target
  (+ (+ (+ (* b a) (* b b)) (* b a)) (* a a))

  (* (+ a b) (+ a b)))