#24330 [Bgs]: bug in ABS()
| From: | vm at color-pro dot com | Date: | Wed, 25 Jun 2003 12:15:49 +0000 |
| Subject: | #24330 [Bgs]: bug in ABS() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-42483@lists.php.net to get a copy of this message | ||
ID: 24330
User updated by: vm at color-pro dot com
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:
derick i don't anderstand u..
can u tell me why this:
if ( abs(0.97 - 0.98) > 0.01 ) echo bad;
print bad.. ?
Previous Comments:
------------------------------------------------------------------------
[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