On Wed, 2008-08-13 at 07:47 -0700, Jim Lucas wrote:
> Jay Blanchard wrote:
> > [snip]
> >> 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 de
Jay Blanchard wrote:
[snip]
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!!
I thought we had a different discuss
[snip]
> 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!!
I thought we had a different discussion a couple of weeks a
On Wed, 2008-08-13 at 08:14 +0100, Alex Chamberlain wrote:
> 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!!
I thoug
mailto:[EMAIL PROTECTED]
> Sent: 13 August 2008 05:39
> To: Micah Gersten
> Cc: Jim Lucas; Jay Blanchard; php-general@lists.php.net
> Subject: Re: [PHP] More math fun
>
> On Tue, 2008-08-12 at 23:23 -0500, Micah Gersten wrote:
> > Robert, when you do yours, it's
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.
T
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.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http
On Tue, 2008-08-12 at 14:59 -0700, Jim Lucas wrote:
> Jay Blanchard wrote:
> > abs($balanceTest) = 15.22
> > abs($oldLineArray[16]) = 15.22
> >
> > $diff = abs($balanceTest) - abs($oldLineArray[16]);
> > echo abs($diff) . "\n";
> >
> > 1.7763568394E-15
> >
> > WTF? This should be a big fat 0
> >
Jay Blanchard wrote:
abs($balanceTest) = 15.22
abs($oldLineArray[16]) = 15.22
$diff = abs($balanceTest) - abs($oldLineArray[16]);
echo abs($diff) . "\n";
1.7763568394E-15
WTF? This should be a big fat 0
I do not see how it makes any difference if $balanceTest and $oldLineArray[16]
are stri
[snip]
string(5) "15.22"
float(15.22)
You're right*smacks forehead*. Sometimes this whole forest and trees
thing kills me.
[/snip]
settype($balanceTest, "float") had no effect
[/snip]
$diff = round(abs($balanceTest), 2) - round(abs($oldLineArray[16]), 2);
Works? Does round convert the strin
[snip]
Methinks you have different data types.
[/snip]
string(5) "15.22"
float(15.22)
You're right*smacks forehead*. Sometimes this whole forest and trees
thing kills me.
[/snip]
settype($balanceTest, "float") had no effect
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
[snip]
Please provide the list with the following output:
Methinks you have different data types.
[/snip]
string(5) "15.22"
float(15.22)
You're right*smacks forehead*. Sometimes this whole forest and trees
thing kills me.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, v
On Tue, 2008-08-12 at 15:18 -0500, Jay Blanchard wrote:
> abs($balanceTest) = 15.22
> abs($oldLineArray[16]) = 15.22
>
> $diff = abs($balanceTest) - abs($oldLineArray[16]);
> echo abs($diff) . "\n";
>
> 1.7763568394E-15
>
> WTF? This should be a big fat 0
Please provide the list with the follow
13 matches
Mail list logo