Re: Changing numbers
| From: | Brad Pauly | Date: | Mon, 21 Jul 2003 21:44:59 +0000 |
| Subject: | Re: Changing numbers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156152@lists.php.net to get a copy of this message | ||
Roger B.A Klorese wrote:
I am not sure what he is after, but I don't think it has to do with significant figures (if that is what you meant). If that was the case, 12.400 should remain 12.400. Trailing zeros to the right of a decimal are significant. - BradWhat's so hard about this? He wants two or more *significant* positions preserved. Show to at least two decimal places, trailing zeroes truncated beyond the 2nd decimal place.* Thus wrote zavaboy (zavaboy@hotmail.com):I have the following numbers: 12.400 666.75 23 369.2 3.234 How can I make them have at least 2 decimal places? So, they will output: 12.40 666.75 23.00 269.20 3.234