#24330 [Bgs]: bug in ABS()
| From: | derick@php.net | Date: | Wed, 25 Jun 2003 12:22:17 +0000 |
| Subject: | #24330 [Bgs]: bug in ABS() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-42486@lists.php.net to get a copy of this message | ||
ID: 24330
Updated by: derick@php.net
Reported By: vm at color-pro dot com
Status: Bogus
Bug Type: *Math Functions
Operating System: FreeBSD 4.5
PHP Version: 4.3.1
New Comment:
http://nl3.php.net/manual/en/language.types.float.php
read the big warning...
Previous Comments:
------------------------------------------------------------------------
[2003-06-25 07:15:48] vm at color-pro dot com
derick i don't anderstand u..
can u tell me why this:
if ( abs(0.97 - 0.98) > 0.01 ) echo bad;
print bad.. ?
------------------------------------------------------------------------
[2003-06-25 07:01:26] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
Read the section on floats again...
------------------------------------------------------------------------
[2003-06-25 06:53:02] vm at color-pro dot com
Description:
------------
abs not work corectly with <,> operator
Reproduce code:
---------------
if ( abs(0.97 - 0.98) > 0.01 ) echo bed1;
if ( abs(0.07 - 0.08) > 0.01 ) echo bed2;
if ( 0.01 > 0.01 ) echo bed3;
Expected result:
----------------
there must nothing here printing !!!
Actual result:
--------------
bed1 here printing
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24330&edit=1