Bug #80943 [Opn->Nab]: pow and ** different result
| From: | requinix@php.net | Date: | Thu, 08 Apr 2021 23:31:49 +0000 |
| Subject: | Bug #80943 [Opn->Nab]: pow and ** different result | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-233335@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80943&edit=1
ID: 80943
Updated by: requinix@php.net
Reported by: inpostdpua at gmail dot com
Summary: pow and ** different result
-Status: Open
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: all
PHP Version: 8.0.3
Block user comment: N
Private report: N
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
https://www.php.net/manual/en/language.operators.precedence.php
** has higher precedence than -. Use parentheses like (-3)**3.5.
Previous Comments:
------------------------------------------------------------------------
[2021-04-08 23:17:48] inpostdpua at gmail dot com
Description:
------------
echo pow(-3, 3.5); // NAN
echo "\r\n";
echo -3**3.5; // -46.76537180436
As i think, it`s must be same result.
Test script:
---------------
echo pow(-3, 3.5);
echo "\r\n";
echo -3**3.5;
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80943&edit=1