Bug #76418 [Com]: é«ç²¾åº¦ä¹æ³è¿ç®ä¸ä¼æå°æ°ç¹ ä¸ä¼æ²¡æ
| From: | zh9025 at qq dot com | Date: | Wed, 06 Jun 2018 10:48:52 +0000 |
| Subject: | Bug #76418 [Com]: é«ç²¾åº¦ä¹æ³è¿ç®ä¸ä¼æå°æ°ç¹ ä¸ä¼æ²¡æ | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215514@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
Comment by: zh9025 at qq dot com
Reported by: zh9025 at qq dot com
Summary: é«ç²¾åº¦ä¹æ³è¿ç®ä¸ä¼æå°æ°ç¹
ä¸ä¼æ²¡æ
Status: Feedback
Type: Bug
Package: BC math related
Operating System: CentOS Linux release 7.4.1708 (C
PHP Version: 7.1.18
Block user comment: N
Private report: N
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
[2018-06-06 10:34:13] zh9025 at qq dot com
1.æ£å¸¸æ
åµä¸ åºè¯¥æ¯1ï¼è䏿¯1.00
2.å·æ°å¤æ¬¡ç»æè¿å¯è½åæ1
------------------------------------------------------------------------
[2018-06-06 10:28:27] zh9025 at qq dot com
Description:
------------
---
From manual page: http://www.php.net/function.bcmul
---
Test script:
---------------
<?php
// Test Url http://tb.besoft.top/bcmul.php
éè¦å¤æ¬¡å·æ° 20%左峿¦çåºç°1
var_dump(bcmul(0.01, 100));
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76418&edit=1