Floating point calculation problem

Schizoid Man schiz_man at 21stcentury.com
Sat Feb 2 12:51:31 CET 2013

> If your input has no decimal point in it, eval (or input) will return
> an integer, not a float. Other than that, I can't see any obvious
> reason for there to be a difference. Can you put together a simple
> script that demonstrates the problem and post it, along with the exact
> input that you're giving it, and the different outputs?

Understood. I'm trying to learn Python by porting an ODE solver I wrote over 
from C#, so what I'll do is break down the routine and append a small code 
snippet highlighting the difference.

I know this is probably redundant but Python 2.7.3 is running on a Mac and 
3.3.0 on a PC, so it's not exactly an apples-v-apples comparison. 

More information about the Python-list mailing list