Average Error: 0.0 → 0.0
Time: 6.5s
Precision: 64
Internal Precision: 576
\[re \cdot re - im \cdot im\]
\[(re \cdot re + \left(-im \cdot im\right))_*\]

Error

Bits error versus re

Bits error versus im

Derivation

  1. Initial program 0.0

    \[re \cdot re - im \cdot im\]
  2. Initial simplification0.0

    \[\leadsto re \cdot re - im \cdot im\]
  3. Using strategy rm
  4. Applied fma-neg0.0

    \[\leadsto \color{blue}{(re \cdot re + \left(-im \cdot im\right))_*}\]
  5. Final simplification0.0

    \[\leadsto (re \cdot re + \left(-im \cdot im\right))_*\]

Runtime

Time bar (total: 6.5s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.00.000.00%
herbie shell --seed 2018297 +o rules:numerics
(FPCore (re im)
  :name "math.square on complex, real part"
  (- (* re re) (* im im)))