Floating point number problem...............

Simon Brunning SBrunning at trisystems.co.uk
Fri May 23 08:12:01 EDT 2003


> From:	Python-lover [SMTP:hemanexp at yahoo.com]
>     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.
 
<http://www.brunningonline.net/simon/blog/archives/000710.html>

Simon B.
--LongSig




-----------------------------------------------------------------------
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.





More information about the Python-list mailing list