ID: 36065
Updated by: [EMAIL PROTECTED]
Reported By: goth at spellforce dot ru
-Status: Open
+Status: Bogus
Bug Type: Math related
Operating System: unix
PHP Version: 5.1.2
New Comment:
Try to set error_reporting to E_ALL ?
Previous Comments:
------------------------------------------------------------------------
[2006-01-18 12:02:25] goth at spellforce dot ru
Description:
------------
Hello,
I've incountered a following mistake in your is_infinite function - why
does it return 'false' in the following example?
Here is_infinite returns 'false' and is_finite - convercely, 'true'.
Reproduce code:
---------------
<?PHP
$T1=1;
$T2=0;
if (is_infinite($T1/$T2))
{
$R="value is infinite"; // 1)
}
else
{
$R="value is finite"; // 2)
}
echo $R;
?>
So this script outputs 2) instead of 1), but it's incorrect
Expected result:
----------------
>From the maths. analisys follows, that
constant / zero = infinity
So the answer must be "value is infinite" not ="value is finite"!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36065&edit=1