Complex | construct a complex number |
Re | real part of a complex number |
Im | imaginary part of a complex number |
I | imaginary unit |
Conjugate | complex conjugate |
Arg | argument of a complex number |
Complex(r, c) |
c -- imaginary part
Note that, at the moment, many functions in Yacas assume that all numbers are real unless it is obvious that it is a complex number. Hence Im(Sqrt(x)) evaluates to 0 which is only true for nonnegative "x".
In> I Out> Complex(0,1); In> 3+4*I Out> Complex(3,4); In> Complex(-2,0) Out> -2; |
Re(x) |
In> Re(5) Out> 5; In> Re(I) Out> 0; In> Re(Complex(3,4)) Out> 3; |
Im(x) |
In> Im(5) Out> 0; In> Im(I) Out> 1; In> Im(Complex(3,4)) Out> 4; |
I |
In> I Out> Complex(0,1); In> I = Sqrt(-1) Out> True; |
Conjugate(x) |
In> Conjugate(2) Out> 2; In> Conjugate(Complex(a,b)) Out> Complex(a,-b); |
Arg(x) |
In> Arg(2) Out> 0; In> Arg(-1) Out> Pi; In> Arg(1+I) Out> Pi/4; |