<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<font face="Courier New">Dear all,<br>
<br>
Consider<br>
</font><font face="Courier New"> </font><br>
<span style="color:rgb(0,0,0);">M</span> <span
style="color:rgb(92,92,92);">=</span> <span
style="color:rgb(188,143,143);">16</span>
<br>
<span style="color:rgb(0,0,0);">w</span> <span
style="color:rgb(92,92,92);">=</span> <span
style="color:rgb(74,85,219);">[</span><span
style="color:rgb(50,185,185);">ones</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(188,143,143);">1</span><span
style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">M</span><span
style="color:rgb(92,92,92);">/</span><span
style="color:rgb(188,143,143);">4</span><span
style="color:rgb(74,85,219);">)</span><span
style="color:rgb(0,0,0);">,</span><span
style="color:rgb(50,185,185);">zeros</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(188,143,143);">1</span><span
style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">M</span><span
style="color:rgb(92,92,92);">/</span><span
style="color:rgb(188,143,143);">4</span><span
style="color:rgb(74,85,219);">)</span><span
style="color:rgb(74,85,219);">]</span>
<span style="color:rgb(0,0,0);"><br>
w</span> <span style="color:rgb(92,92,92);">=</span> <span
style="color:rgb(74,85,219);">[</span><span
style="color:rgb(0,0,0);">w</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(188,143,143);">1</span><span
style="color:rgb(255,170,0);">:</span><span
style="color:rgb(0,0,0);">M</span><span
style="color:rgb(92,92,92);">/</span><span
style="color:rgb(188,143,143);">2</span><span
style="color:rgb(74,85,219);">)</span><span
style="color:rgb(0,0,0);">,</span> <span
style="color:rgb(188,143,143);">0</span><span
style="color:rgb(0,0,0);">,</span> <span
style="color:rgb(50,185,185);">conj</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(0,0,0);">w</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(255,170,0);">$</span><span
style="color:rgb(255,170,0);">:</span><span
style="color:rgb(92,92,92);">-</span><span
style="color:rgb(188,143,143);">1</span><span
style="color:rgb(255,170,0);">:</span><span
style="color:rgb(188,143,143);">2</span><span
style="color:rgb(74,85,219);">)</span><span
style="color:rgb(74,85,219);">)</span><span
style="color:rgb(74,85,219);">]</span>
<br>
<span style="color:rgb(0,0,0);">v</span> <span
style="color:rgb(92,92,92);">=</span> <span
style="color:rgb(0,0,0);">ifft</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(0,0,0);">w</span><span
style="color:rgb(74,85,219);">)</span>
<br>
<span style="color:rgb(50,185,185);">isreal</span><span
style="color:rgb(74,85,219);">(</span><span
style="color:rgb(0,0,0);">v</span><span
style="color:rgb(74,85,219);">)</span><br>
<font face="Courier New"><br>
The first 3 lines defines a real spectrum of a real signal, then
the real signal is recovered and finally it is checked whether it
is real or not.<br>
<br>
What puzzles me is that the result is T (true). However, the
definition of the ifft() involves complex operations, so at some
point the numbers must be converted to a complex representation
such as <br>
<br>
1. + 0.i<br>
<br>
so I would expect that the result included 0i so the result of the
test should be F. Where is this null imaginary component removed?<br>
<br>
I don't say this is wrong, but it is perplexing if compared to
much more simple operations such as<br>
<br>
sqrt(%i^4)<br>
<br>
which yields 1. + 0.i, a complex representation of real scalar 1.<br>
<br>
Maybe the fftw package is so refined to detect whether the result
is actually real and removes the useless 0.i components?<br>
<br>
Regards,<br>
<br>
Federico Miyara<br>
<br>
<br>
</font>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br /> <table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 18px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 17px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Libre de virus. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avast.com</a> </td>
</tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>