Rounding real numbers
Rounding real numbers
- Subject: Rounding real numbers
- From: giZm0 <email@hidden>
- Date: Sun, 28 Jan 2001 16:32:06 -0500
Hi,
i am uing a value qich is representing the amount of bytes of a specific
file. To get the number in megabytes instead, i worte this:
(thenumber / 1024) / 1024
Now, when i dialog this number it contains about 10 numbers after the point
(.). For example : 6.022548445
While i know this is normal, i would like to round this number to two
decimals only (6.02). Does anyone knows an easy way to do this ?
I could also delete the other decimals, without rounding... btu i dont know
how
giZm0