Average Error: 0.0 → 0.0
Time: 4.5s
Precision: 64
Internal precision: 128
\[re \cdot re - im \cdot im\]
\[\left(re + im\right) \cdot \left(re - im\right)\]

Error

Bits error versus re

Bits error versus im

Derivation

  1. Initial program 0.0

    \[re \cdot re - im \cdot im\]
  2. Applied simplify 0.0

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

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

Runtime

Time bar (total: 4.5s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(386159506 4116175663 3979138247 84589859 3609988614 4195656347)'
(FPCore (re im)
  :name "math.square on complex, real part"
  (- (* re re) (* im im)))