\[re \cdot im + im \cdot re\]
Test:
math.square on complex, imaginary part
Bits:
128 bits
Bits error versus re
Bits error versus im
Time: 1.0 s
Input Error: 0.0
Output Error: 0.0
Log:
Profile: 🕒
\(re \cdot \left(im + im\right)\)
  1. Started with
    \[re \cdot im + im \cdot re\]
    0.0
  2. Applied simplify to get
    \[\color{red}{re \cdot im + im \cdot re} \leadsto \color{blue}{re \cdot \left(im + im\right)}\]
    0.0

Original test:


(lambda ((re default) (im default))
  #:name "math.square on complex, imaginary part"
  (+ (* re im) (* im re)))