title: Pandas calculation inconsistencies
body: <p>The question I'm going to ask might be a bit weird. 
  I'm using recent Anaconda 3.5 distribution to perform calculations.
  All my routines are mostly based on numpy and pandas.</p>
  
  <p>Recently, I discovered a <strong>very strange behavior of Pandas/numpy/python</strong> (don't know who's responsible).</p>
  
  <p>Suppose I have a 2 col (<code>G, B</code>) Pandas DataFrame without index (integer index) denoted by <code>l</code> and the following function:</p>
  
  <pre><code>import numpy as np
  import pandas as pd
  
  def runTest(l):
      res = l.G  + 1j * l.B
      return res
  </code></pre>
  
  <p>Both columns have <code>float64</code> dtype. So, I'm trying to create a complex number where the real part is taken from <code>G</code> and imaginary from <code>B</code>.</p>
  
  <p><strong>The weird thing is:</strong> if we ran this code, let's say, for a few hundreds of times, some outcomes might be <strong>drastically different</strong> from what normally comes out.</p>
  
  <p><em>An example on my data:</em></p>
  
  <pre><code>def printDifference(y1, y2):
      dif = np.absolute(y1 - y2) &gt; 1e-13
      ys1 = y1[dif]
      ys2 = y2[dif]
      for i in range(ys1.shape[0]):
          print("{:d}: {:f} vs {:f}".format(i, ys1.iloc[i], ys2.iloc[i]))
  
  main = runTest(l)
  for i in range(200):
      test = runTest(l)
      if np.any(np.absolute(main - test) &gt; 1e-10):
          print(i)
          printDifference(main, test)
          break
  </code></pre>
  
  <blockquote>
    <p>149</p>
    
    <p>0: 0.000000+0.000093j vs 0.000000+0.000000j</p>
    
    <p>1: 0.000003+0.000132j vs 0.000006+0.000132j</p>
    
    <p>2: 0.000000+0.000006j vs 0.000000+0.000006j</p>
    
    <p>3: 0.000002+0.000113j vs 0.000005+0.000113j</p>
    
    <p>4: 0.000000+0.000009j vs 0.000000+0.000009j</p>
    
    <p>5: 0.000005+0.000210j vs 0.000009+0.000210j</p>
    
    <p>6: 0.000004+0.000161j vs 0.000007+0.000161j</p>
    
    <p>7: 0.000004+0.000160j vs 0.000007+0.000160j</p>
    
    <p>8: 0.000002+0.000095j vs 0.000004+0.000095j</p>
    
    <p>9: 0.000011+0.000448j vs 0.000022+0.000448j</p>
    
    <p>....</p>
  </blockquote>
  
  <ol>
  <li>Note, that it happened only on <strong>149</strong>th iteration.</li>
  <li>It looks like real part is accounted twice, but also somewhere the imaginary part is different.</li>
  <li>If i change <code>1j * l.B</code> to <code>1j * l.B.values</code> everything (statistically) becomes normal.</li>
  </ol>
  
  <p><strong>The question is:</strong> what is going on??? I read both Pandas and Numpy docs on calculations but hadn't found a thing that might explain this behavior.</p>
  
  <p>Any guess would be highly appreciated!</p>
  
  <p><strong>P.s.</strong> I could provide the exact data if there's a need in it. But I'm not sure what type of conainer I should use, so put the request, I'll handle.</p>
  
  <hr>
  
  <p><strong>upd</strong>
  I successfully reproduced the error for
  <code>l = pd.DataFrame({'G': np.random.rand(14000) * 1e-7, 'B': np.random.rand(14000) * 1e-5})</code></p>