[Numpy-tickets] [NumPy] #556: polydiv function gets the wrong answer!!

NumPy numpy-tickets@scipy....
Tue Jul 24 10:10:44 CDT 2007

#556: polydiv function gets the wrong answer!!
 Reporter:  subheight640  |       Owner:  somebody
     Type:  defect        |      Status:  new     
 Priority:  normal        |   Milestone:          
Component:  numpy.lib     |     Version:  none    
 Severity:  normal        |    Keywords:          
 the numpy.polydiv function does not seem to work for all cases. For

 >>> numpy.polydiv([7,6,5,4,3,2,1],[6,5,4,3,2,1])
 (array([ 1.16666667,  0.        ]), array([1]))

 The answer I got from two other polynomial division programs, my own
 function, and by working the problem out by hand is:

 >>> poly_divider([7,6,5,4,3,2,1],[6,5,4,3,2,1])
 ([1.1666666666666667, 0.027777777777777679], [0.194444444444,
 0.388888888889, 0.583333333333, 0.777777777778, 0.972222222222])

 polydiv seems to suffer from rounding errors.

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

More information about the Numpy-tickets mailing list