Average Error: 0.0 → 0.0
Time: 5.0s
Precision: 64
Internal precision: 128
\[x \cdot x - y \cdot y\]
\[\left(x + y\right) \cdot \left(x - y\right)\]

Error

Bits error versus x

Bits error versus y

Target

Original0.0
Comparison0.0
Herbie0.0
\[ {x}^2 - {y}^2 \]

Derivation

  1. Initial program 0.0

    \[x \cdot x - y \cdot y\]
  2. Applied simplify 0.0

    \[\leadsto \color{blue}{{x}^2 - {y}^2}\]
  3. Using strategy rm
  4. Applied difference-of-squares 0.0

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

Runtime

Time bar (total: 5.0s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(3974731552 407205991 3694488752 1231165808 2551775584 1745760295)'
(FPCore (x y)
  :name "Examples.Basics.BasicTests:f2 from sbv-4.4"

  :target
  (- (sqr x) (sqr y))

  (- (* x x) (* y y)))