Re: help with float numbers

From: Date: Fri, 09 May 2003 19:16:56 +0000
Subject: Re: help with float numbers
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-147059@lists.php.net to get a copy of this message
On Saturday 10 May 2003 02:11, pdmytrew@lexmark.com wrote: > Learned members of the list: > > I have quite a frustrating problem that I *think* involves floating-point > ('double') numbers. I have the following code: [snip] > For my purposes, $Activity > may have all integers, all decimals, or a combination of both like (25, 25, > 25, 12.5, 12.5). I'm using PHP 4.3.1. What can I do to allow for this? How > do I compare an integer (100) to what MAY OR MAY NOT be a float ($Total)? If you're going to be doing any mission-critical calculations with numbers other than integers then you ought to be using the bcmath functions. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Unnamed Law: If it happens, it must be possible. */

« previous php.general (#147059) next »