rounding average to one decimal point
| From: | Adam Williams | Date: | Mon, 10 May 2004 18:03:36 +0000 |
| Subject: | rounding average to one decimal point | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-185821@lists.php.net to get a copy of this message | ||
Hi, I have a randon group of numbers I need the average of. When I add
them up and divide by how many there are and print the result, I get a
lot of decimal places. The number comes out to look like 29.3529411765,
but I don't need that many decimal places. rounding to one decimal place
will be fine. anyway to trim off the excess decimal values?