RE: More math fun

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



1.7763568394E-15 is 0. The computer just had a rounding error somewhere. We
had this discussion a few weeks ago, the solution being to decide to what
accuracy you want the answer. Upto 14 decimal places will give you 0 here!!

Alex

> -----Original Message-----
> From: Robert Cummings [mailto:robert@xxxxxxxxxxxxx]
> Sent: 13 August 2008 05:39
> To: Micah Gersten
> Cc: Jim Lucas; Jay Blanchard; php-general@xxxxxxxxxxxxx
> Subject: Re:  More math fun
> 
> On Tue, 2008-08-12 at 23:23 -0500, Micah Gersten wrote:
> > Robert, when you do yours, it's performing the same function on two
> > different variable types and has to do a conversion before the
> function
> > works.  He was doing a numeric function on a string which might be
> > giving the funky results.
> 
> That's what Jim tried and got 0 and double... I confirmed Jim's results
> (I didn't originally test Jay's problem) and then tried the alternative
> that I might have thought this morning. Either way, it seems to come up
> as 0. Maybe Jay is running a buggy version of PHP.
> 
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.138 / Virus Database: 270.6.1/1608 - Release Date:
> 12/08/2008 16:59

No virus found in this outgoing message. Scanned by AVG Free 8.0
Checked by AVG - http://www.avg.com 
Version: 8.0.138 / Virus Database: 270.6.1/1608 - Release Date: 12/08/2008
16:59


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux