2010/8/24 Roshan George <roshan@xxxxxxxxx>
On Tue, 2010-08-24 at 16:57 +0530, Arulalan T wrote:
Yes, we can do this multiply by 100 way.
By this way I can handle 80 and 23 as two separate integers.
But when I want make it as float
80.23000000000000480+0.23
again it will be come same floating value.
so I cant use this way.
Well, I meant something like using 8000 and 23 instead of 80 and 0.23.
Then when the time comes to print your number you can just do something
like:
a = str(8000+23)
b = a[:-2] + '.' + a[-2:]
Your output will be the nice 80.23 that you always wanted. Unless you're
doing some division that requires you to hold on to the third place or
lower, why use floats when integers will do the job?
--
Roshan George
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc