expected output from log of negative number

Doug Stewart dastew at sympatico.ca
Fri Jun 13 14:12:27 CDT 2008


E. Joshua Rigler wrote:
> If I type log10(-1), I get a complex number back whose real part is the 
> log of the absolute value of the argument, and whose imaginary part is 
> always equal to 1.36438.  What's more, I get similar behavior with a 
> natural log, but the imaginary part is always equal to Pi.
>
> I've managed to confirm that this behavior is compatible with ML, so I 
> imagine it's not a bug, but can someone explain to me the logic here?
> _______________________________________________
> Help-octave mailing list
> Help-octave at octave.org
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>
>   
http://www.newton.dep.anl.gov/askasci/math99/math99180.htm

Is this good enough or do you want more?


More information about the Help-octave mailing list