[NumPy-Tickets] [NumPy] #1633: Changeset 8438 breaks ldexp on 64bit/bigendian systems

NumPy Trac numpy-tickets@scipy....
Tue Oct 19 08:06:24 CDT 2010


#1633: Changeset 8438 breaks ldexp on 64bit/bigendian systems
---------------------+------------------------------------------------------
  Reporter:  nics    |       Owner:  somebody
      Type:  defect  |      Status:  reopened
  Priority:  normal  |   Milestone:  1.5.1   
 Component:  Other   |     Version:  1.5.0   
Resolution:          |    Keywords:          
---------------------+------------------------------------------------------

Comment(by pv):

 Something very strange is going on here:
 {{{
 >>> import numpy as np
 >>> np.iinfo('l').max
 2147483647
 >>> np.ldexp(2, 2147483647)
 0.0
 >>> np.ldexp(2, 2147483646)
 0.0
 >>> np.ldexp(2, 2147483645)
 Warning: overflow encountered in ldexp
 inf
 }}}
 There seems to be exactly two integer values for which it does not work.
 And this depends on the Python version. I will need to set up a debugger
 on a real Windows platform to figure it out (I haven't managed to get
 debuggers work Wine to work, or Numpy build with debugging symbols to
 succeed). This may take some time.

 Moreover, the new code path is *not* invoked here, since on this setup
 `SIZEOF_INT == SIZEOF_LONG`. Indeed, I can reproduce the issue on the
 preceding commit:d24db3430a, so this bug is unrelated to #1633.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1633#comment:14>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list