Bug #76418 [Fbk]: The scale is not set, but there are two decimal places.
| From: | cmb@php.net | Date: | Thu, 07 Jun 2018 16:52:12 +0000 |
| Subject: | Bug #76418 [Fbk]: The scale is not set, but there are two decimal places. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215537@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76418&edit=1
ID: 76418
Updated by: cmb@php.net
Reported by: zh9025 at qq dot com
Summary: The scale is not set, but there are two decimal
places.
Status: Feedback
Type: Bug
Package: BC math related
Operating System: CentOS Linux release 7.4.1708 (C
PHP Version: 7.1.18
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Please run without SourceGuardian, just to make sure it is not
related to this extension.
Previous Comments:
------------------------------------------------------------------------
[2018-06-07 16:52:01] cmb@php.net
Please run without SourceGuardian, just to make sure it is not
related to this extension.
------------------------------------------------------------------------
[2018-06-06 13:26:02] zh9025 at qq dot com
The scale is not set, but there are two decimal places.
Test script:
---------------
<?php echo bcmul("0.01", 100);
<?php echo bcmul(0.01, 100);
Expected result:
----------------
1
Actual result:
--------------
1.00
Test link:
--------------
http://tb.besoft.top/bcmul.php
Refresh multiple times, and the result can also be 1
------------------------------------------------------------------------
[2018-06-06 10:48:51] zh9025 at qq dot com
Test script:
---------------
<?php echo bcmul("0.01", 100);
<?php echo bcmul(0.01, 100);
Expected result:
----------------
1
Actual result:
--------------
1.00
Test link:
--------------
Refresh multiple times, and the result can also be 1
------------------------------------------------------------------------
[2018-06-06 10:41:27] requinix@php.net
http://php.net/manual/zh/function.bcmul.php
> left_operand
> å符串类åçå·¦æä½æ°.
> right_operand
> å符串类åç峿使°.
Please try
var_dump(bcmul("0.01", "100"));
------------------------------------------------------------------------
[2018-06-06 10:36:23] spam2 at rhsoft dot net
please, this is an english bugtracker - i don't write german here too
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=76418
--
Edit this bug report at https://bugs.php.net/bug.php?id=76418&edit=1