<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/494" rel="nofollow">http://projects.scipy.org/numpy/ticket/494</a> on 2007-04-05 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/davidsocha/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/davidsocha">@davidsocha</a>, assigned to unknown.</em></p>
<p dir="auto">Here is an example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="C:\Documents and Settings\socha&gt;python
Python 2.4.3 - Enthought Edition 1.0.0 (#69, Aug  2 2006, 12:09:59) [MSC v.1310 32 bit (Intel)] on win32
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; import numpy
&gt;&gt;&gt; numpy.__version__
'1.0.2'
&gt;&gt;&gt; from numpy import array
&gt;&gt;&gt; f = array([1,2,3], dtype='float96')
&gt;&gt;&gt; f
array([0.0, 0.0, -2.0], dtype=float96)             &lt;== float96 prints incorrectly
&gt;&gt;&gt; f.astype('float32')
array([ 1.,  2.,  3.], dtype=float32)              &lt;== Yet data seems intact
&gt;&gt;&gt; f.sum()
-2.0                                               &lt;== prints incorrectly
&gt;&gt;&gt; f.sum().astype('float32')
6.0                                                &lt;== prints correctly if force to float32
&gt;&gt;&gt;"><pre class="notranslate"><code class="notranslate">C:\Documents and Settings\socha&gt;python
Python 2.4.3 - Enthought Edition 1.0.0 (#69, Aug  2 2006, 12:09:59) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import numpy
&gt;&gt;&gt; numpy.__version__
'1.0.2'
&gt;&gt;&gt; from numpy import array
&gt;&gt;&gt; f = array([1,2,3], dtype='float96')
&gt;&gt;&gt; f
array([0.0, 0.0, -2.0], dtype=float96)             &lt;== float96 prints incorrectly
&gt;&gt;&gt; f.astype('float32')
array([ 1.,  2.,  3.], dtype=float32)              &lt;== Yet data seems intact
&gt;&gt;&gt; f.sum()
-2.0                                               &lt;== prints incorrectly
&gt;&gt;&gt; f.sum().astype('float32')
6.0                                                &lt;== prints correctly if force to float32
&gt;&gt;&gt;
</code></pre></div>
<p dir="auto">We have the same symptoms with float128 (on a Mac with an Intel 2GHz Core Duo).</p>
<ul dir="auto">
<li>David Socha &amp; Daniel Terhorst, UrbanSim Project, <a href="http://www.urbansim.org" rel="nofollow">http://www.urbansim.org</a></li>
</ul>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/1531" rel="nofollow">http://projects.scipy.org/numpy/ticket/1531</a> on 2010-06-30 by trac user valhallasw, assigned to unknown.</em></p>
<p dir="auto"><a href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html" rel="nofollow">http://docs.scipy.org/doc/numpy/reference/routines.fft.html</a> reads:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="If A = fft(a, n), then A[0] contains the zero-frequency term (the mean of the signal), which is always purely real for real inputs."><pre class="notranslate"><code class="notranslate">If A = fft(a, n), then A[0] contains the zero-frequency term (the mean of the signal), which is always purely real for real inputs.
</code></pre></div>
<p dir="auto">This is, however, incorrect. A[0] contains the zero-frequency term <em>multiplied by the number of data points</em>.</p>
<p dir="auto">The same error is in more docs, for example <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfft.html#numpy.fft.rfft" rel="nofollow">http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfft.html#numpy.fft.rfft</a>.</p>