note 2318 deleted from Floating point numbers by torben
| From: | torben@php.net | Date: | Sat, 19 Aug 2000 21:09:59 +0000 |
| Subject: | note 2318 deleted from Floating point numbers by torben | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-2679@lists.php.net to get a copy of this message | ||
i am using php 3.0.11 .. anyone using floats and integers and converting back and forth should know
<PRE>
intval (9.95 * 100) = 994
</PRE>
i suggest that you do not attempt converting floats to integers if you require accurate results. if
you need to, my fudge solution is to add 0.5 before doing the intval.