Bug #80867 [NEW]: bccomp warning for INF
| From: | marian dot sedivy at gmail dot com | Date: | Mon, 15 Mar 2021 09:37:12 +0000 |
| Subject: | Bug #80867 [NEW]: bccomp warning for INF | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-232723@lists.php.net to get a copy of this message | ||
From: marian dot sedivy at gmail dot com
Operating system: MacOS
PHP version: 7.4.16
Package: *Math Functions
Bug Type: Bug
Bug description:bccomp warning for INF
Description:
------------
---
From manual page: https://php.net/function.bccomp
---
This code: var_dump(bccomp(-INF, 1.0, 2)); produces error
PHP Warning: bccomp(): bcmath function argument is not well-formed
But according to docs (https://www.php.net/manual/en/math.constants.php)
INF is float, so I think, that this Warning is wrong.
Test script:
---------------
var_dump(bccomp(-INF, 1.0, 2));
Expected result:
----------------
No warning
Actual result:
--------------
PHP Warning: bccomp(): bcmath function argument is not well-formed
--
Edit bug report at https://bugs.php.net/bug.php?id=80867&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80867&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80867&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80867&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80867&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80867&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80867&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80867&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80867&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80867&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80867&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80867&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80867&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80867&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80867&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80867&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80867&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80867&r=mysqlcfg