Average Error: 0.0 → 0.0
Time: 11.2s
Precision: 64
Internal Precision: 384
\[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. Using strategy rm
  3. Applied difference-of-squares0.0

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

Runtime

Time bar (total: 11.2s)Debug logProfile

herbie shell --seed '#(1063185673 2139736501 2393378123 1907444849 1070993796 1007244912)' 
(FPCore (re im)
  :name "math.square on complex, real part"
  (- (* re re) (* im im)))