Re: Re: Why do these values not match?

From: Date: Tue, 25 Jun 2002 22:35:28 +0000
Subject: Re: Re: Why do these values not match?
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-20112@lists.php.net to get a copy of this message
On Tue, 25 Jun 2002 15:27:19 -0700 (PDT) Manuel <manuel@ochoa-usa.com> wrote: > > I tried it and the if statement is still treating the evaluation as if they are not equal. > I also did this: > $test = $total - $production; > print "$test"; > and got this as the result: -5.68434188608E-014 > What is going on here? Floating point numbers never exactly match the value you set. Here you have the difference between your two numbers and why they are not equals. Take a look (google :) ) on how managed float numbers, that may help you to understand the problem. hth pa

« previous php.db (#20112) next »