Zero division error!

Prem Rachakonda prem at engr.uky.edu
Thu Aug 2 19:34:18 CEST 2001


Hi,
  I am writing a script for 'cubic spline interpolation' and when there is
a float value = 0.004, it is rounded off to zero and I am getting a Zero
Division error. Is it a python bug?

Prem.

x=array([2.056, 2.06, 2.064, 2.068, 2.072, 2.076, 2.08, 2.084, 2.088,
2.092, 2.096, 2.1, 2.104])
..
..
..
d[0]=x[1]-x[0]
c[1]=(y[1]-y[0])/d[0] 

Here d[0] is 0.004(equally spaced points) and is being considered as 0 and
I am getting this error.


____________________________________________________________
                       Prem Rachakonda
____________________________________________________________
Mailing Address:                               Work Address:
700 Woodland Ave., #E4          Teradyne Connection Systems,
Lexington, Kentucky-40508       44 Simon St., Mail Stop#006,
PH :859-323-2880(PP)            Nashua, NewHampshire - 03060
eFax:253-323-9795               Work Phone No : 603-879-3442
Fax:603-879-3046                 Res. Phone No.:603-247-2651




More information about the Python-list mailing list