#37206 [Opn->Bgs]: hexdec can not handle "NAN" and "INF" problem
| From: | tony2001@php.net | Date: | Wed, 26 Apr 2006 07:26:08 +0000 |
| Subject: | #37206 [Opn->Bgs]: hexdec can not handle "NAN" and "INF" problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-96243@lists.php.net to get a copy of this message | ||
ID: 37206
Updated by: tony2001@php.net
Reported By: sqchen at cititz dot net
-Status: Open
+Status: Bogus
Bug Type: *Math Functions
Operating System: redhat 7.3
PHP Version: 5.1.2
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2006-04-26 05:29:30] sqchen at cititz dot net
Description:
------------
please see file "ext/standard/math.c" and function "PHPAPI int
_php_math_basetozval(zval *arg, int base, zval *ret)", It's obvious
that it does not consider the "NAN" and "INF" problem
Reproduce code:
---------------
<?php
hexdec(INF);
hexdec(NAN);
?>
Expected result:
----------------
to be decided
to be decided
Actual result:
--------------
15 (actually It just convert "f" to decimal)
10 (covert "A" to decimal)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37206&edit=1