[back] [prev] [next] [index] [root]

 


Log

Returns the principal value of the natural logarithm.

Syntax:

y := Log(x);
y := Log(b,x);

complex or real
  y  
complex or real or rational or integer
  x  
complex or real or rational or integer
  b  

See also:  Exp

Description:

Given x>0 in Z, Q or R the function returns the natural logarithm of x. For x=| x|e^{i\phi} \inC\setminusR^{ >= 0}, \phi\in (-\pi,\pi], the function returns y=\log| x|+i\arg x. The computation is done in the current precision of the real (complex) field. If two arguments are given the first is used as the base of the logarithm.


Example:


kash> Log(2);
0.6931471805599453094172321214581765680755001343602553
kash> Log(-2);
0.6931471805599453094172321214581765680755001343605 + 3.1415926535897932384626\
43383279502884197169399375*i
kash> i := Comp(0, 1);
1*i
kash> Log(i);
> 1.570796326794896619231321691639751442098584699688*i


<- back[back] [prev] [next] [index] [root]