Average Error: 0.0 → 0.0
Time: 15.6s
Precision: 64
Internal precision: 128
\[\left(x + y\right) \cdot \left(x + y\right)\]
\[{x}^2 + \left(2 \cdot \left(y \cdot x\right) + {y}^2\right)\]

Error

Bits error versus x

Bits error versus y

Target

Original0.0
Comparison0.0
Herbie0.0
\[ {x}^2 + \left({y}^2 + 2 \cdot \left(y \cdot x\right)\right) \]

Derivation

  1. Initial program 0.0

    \[\left(x + y\right) \cdot \left(x + y\right)\]
  2. Applied simplify 0.0

    \[\leadsto \color{blue}{{\left(x + y\right)}^2}\]
  3. Applied taylor 0.0

    \[\leadsto {x}^2 + \left(2 \cdot \left(y \cdot x\right) + {y}^2\right)\]
  4. Taylor expanded around 0 0.0

    \[\leadsto \color{blue}{{x}^2 + \left(2 \cdot \left(y \cdot x\right) + {y}^2\right)}\]
  5. Removed slow pow expressions

Runtime

Time bar (total: 15.6s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(2741415180 3389321985 1027940268 1518820902 2968853036 1244388572)'
(FPCore (x y)
  :name "Examples.Basics.BasicTests:f3 from sbv-4.4"

  :target
  (+ (sqr x) (+ (sqr y) (* 2 (* y x))))

  (* (+ x y) (+ x y)))