[Jprogramming] represention of complex numbers

david alis david.alis at gmail.com
Mon Oct 11 04:49:31 HKT 2010


fmtpd =: ;@: ( (   ' ',(3 : '(":a),''ad'',":b[ ''a b''=.(%1 1r180p1)
**. y')`":@.(=+) )&.>)@((<"0)^:(0=#@$))

(=+)   tests complex or real

   A=. 1ad45
   fmtpd A
 1ad45
   fmtpd 99
 99
   fmtpd 1 2 3,(*/\A,A,A)
 1 2 3 1ad45 1ad90 1ad135


      polarDeg A,A
1ad45 1ad45
      polarDeg A
1 a d 4 5


More information about the Programming mailing list