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

Error

Bits error versus a

Bits error versus b

Target

Original0.0
Comparison0.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. Applied taylor 0.0

    \[\leadsto 2 \cdot \left(b \cdot a\right) + \left({a}^2 + {b}^2\right)\]
  3. Taylor expanded around inf 0.0

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

Runtime

Time bar (total: 9.8s) Debug logProfile

Please include this information when filing a bug report:

herbie shell --seed '#(1064524629 4159152179 2999149171 575749698 4006532819 692958815)'
(FPCore (a b)
  :name "Expression 4, p15"
  :pre (and (<= 5 a 10) (<= 0 b 0.001))

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

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