[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question on using FP numbers in python 2

On Fri, 14 Feb 2014 22:25:59 -0500, Gene Heskett wrote:

> Greetings;
> Is there something I can search for and fix in some python code that is
> giving me bogus answers that get good only when there is a valid digit
> to the left of the decimal point?

Er, yes? Anything which involves floating point maths?

Your question is to vague to really answer. You are basically saying "I'm 
doing some calculations [what sort of calculations?] with floats [how 
many floats? of what values?], and they're wrong [wrong in what way? how 
badly wrong?] unless there is a valid digit [which digits count as valid 
and which as invalid?] to the left of the decimal point in some number."

Can you extract the float calculations and show us, together with some 
sample data, expected result, and actual result?