Library: | math |
See also: | ccos ccosh cexp cln csin csinh ctan ctanh |
Quantlet: | csqrt | |
Description: | computes square root of a complex number |
Usage: | z = csqrt(x) | |
Input: | ||
x | n x p x d1 x ... x dn complex array, i.e., list consisting of elements re and im, both n x p x d1 x ... x dn matrices | |
Output: | ||
z | n x p x d1 x ... x dn complex array, i.e., list consisting of elements re and im, both n x p x d1 x ... x dn matrices |
library("math") x = complex(#(4,16,-1), #(9,1,0)) csqrt(x)
Contents of z.re [1,] 2.6314 [2,] 4.002 [3,] 6.1257e-17 Contents of z.im [1,] 1.7101 [2,] 0.12494 [3,] 1