[Numpy-tickets] [NumPy] #866: ldexp broken

NumPy numpy-tickets@scipy....
Thu Sep 4 08:57:52 CDT 2008

#866: ldexp broken
 Reporter:  dhuard  |        Owner:  cdavid
     Type:  defect  |       Status:  new   
 Priority:  normal  |    Milestone:  1.2.0 
Component:  Other   |      Version:  devel 
 Severity:  normal  |   Resolution:        
 Keywords:          |  
Comment (by dhuard):

 The umathmodule defines
 ldexp(double x1, int x2)
 ldexpf(float x1, int x2)
 ldexpl(longdouble x1, int x2)

 But since the default int on 64 bits platform is a long, we would need to
 define as well
 ldexpfl(float x1, long x2)
 ldexpdl(double x1, long x2)
 ldexpll(longdouble x1, long x2)

 Now since ldexp returns x1 * 2 ** x2, an a 32 bit integer spans [-2**31 +
 1, 2**31 -1], I doubt long x2 are really useful. I suggest long x2 are
 simply cast to int x2. Don't really know where this should be done though.

Ticket URL: <http://scipy.org/scipy/numpy/ticket/866#comment:3>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.

More information about the Numpy-tickets mailing list