[Tutor] numerical problem

Mr Timothy Hall timothy.hall at uqconnect.edu.au
Thu Oct 15 11:28:32 CEST 2009

i am writing a program for a runge-cutter method of solving ODE's and im having a problem with one part.

whenever i run this part of the program, no matter what values i put in for vto, k1t etc... it always equals zero.
im slightly aware of floating point numbers but im not sure why this will not give me a real answer.
when i do it on my calculator the answer is 0.897 for the correct values of k3t etc. so its not like the result
is extremely small.
any help would be great.

def runge_tang(vto,k1t,k3t,k4t,k5t,k6t):
    vn = vto+(16/135)*k1t+(6656/12825)*k3t+(28561/56430)*k4t-(9/50)*k5t+(2/55)*k6t
    return vn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20091015/cbb19c33/attachment.htm>

More information about the Tutor mailing list