Re: float precision
| From: | Jason Wong | Date: | Thu, 09 Jan 2003 04:39:35 +0000 |
| Subject: | Re: float precision | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130867@lists.php.net to get a copy of this message | ||
On Thursday 09 January 2003 12:33, Kevin Avila wrote:
> Greetings,
>
> I'm having a weird issue with float precision. I am decrementing the
> value of a float by 0.1. The problem is when the float I am working
> with reaches 0.1 and I decrement it again I get 1.e09 instead of the
> expected 0.0. This was also confirmed by a user in #php. Anyone have
> any ideas?
Use the BCMath functions if you require absolute precision.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
If you knew what to say next, would you say it?
*/