[Tutor] Floating point number problem...............
Python-lover
hemanexp@yahoo.com
Fri May 23 08:09:43 2003
--0-1660340533-1053691653=:68665
Content-Type: text/plain; charset=us-ascii
Hi, I have a problem in floating point number. I assgined a value, say 1.23456, to a variable. When i printed the variable i got 1.234560000000001 instead of 1.23456. How can i get the original value? Moreover how to have a floating point number that has only 3 numbers after decimal point even the number has got more digits after the decimal point? I tried with "round" function but it is rounding the 3rd digit instead of keeping it as it is. Thanx.
---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
--0-1660340533-1053691653=:68665
Content-Type: text/html; charset=us-ascii
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV> I have a problem in floating point number. I assgined a value, say 1.23456, to a variable. When i printed the variable i got 1.234560000000001 instead of 1.23456. How can i get the original value? Moreover how to have a floating point number that has only 3 numbers after decimal point even the number has got more digits after the decimal point? I tried with "round" function but it is rounding the 3rd digit instead of keeping it as it is.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Thanx.</DIV>
<DIV> </DIV>
<DIV> </DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/search/mailsig/*http://search.yahoo.com">The New Yahoo! Search</a> - Faster. Easier. Bingo.
--0-1660340533-1053691653=:68665--