<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">
<div class="moz-cite-prefix">Le 14/08/2014 19:46, Samuel Gougeon a
écrit :<br>
</div>
<blockquote cite="mid:53ECF612.9070605@free.fr" type="cite"> <font
face="Courier New, Courier, monospace">-->disp([atan(z),%i/2*log((%i+z)/(%i-z))])<br>
<br>
1.5707963 + 0.5493061i 1.5707963 + 0.5493061i </font><br>
<br>
This is a strange result for the log expression, since we could
expect -1.57.. rather than 1.57...<br>
Indeed, with z = 2.i, we have: (i+z)/(i-z) = 3i/ -i = -3 = 3.i^2
=> ln(3.i^2) = ln(3) + 2 ln(i)<br>
with i = exp(i.pi/2), so : .. = ln(3) + 2.i.pi/2 = ln(3) + i.pi<br>
Hence: i/2 * ln((i+z)/(i-z)) = i.ln(3)/2 - pi/2 : the real part
is < 0.<br>
If there is an issue, it could be with log() rather than with
atan().<br>
</blockquote>
Actually, we have -3 = 3.exp(i.pi) but also = 3.exp(-i.pi),
leading to ln(3) - i.pi .. and so i.ln(3)/2 <font color="#009900"><big><big>+</big></big></font>
pi/2 :<br>
The real part is here modulo pi (due to the i/2 factor) ; so the
Scilab output is correct for the log.<br>
<br>
</div>
</body>
</html>