欧美AV无码一区二区,麻豆+无码+国产在线+观看,欧美狂躁少妇XXXX高潮无码,美女扒开屁股让男人桶免费观看,极品粉嫩国产18尤物在线播放

bcmul

(PHP 4, PHP 5, PHP 7, PHP 8)

bcmul兩個(gè)任意精度數字乘法計算

說(shuō)明

bcmul(string $num1, string $num2, ?int $scale = null): string

num1 乘以 num2。

參數

num1

字符串類(lèi)型的左操作數。

num2

字符串類(lèi)型的右操作數。

scale

此可選參數用于設置結果中小數點(diǎn)后的小數位數。也可通過(guò)使用 bcscale() 來(lái)設置全局默認的小數位數,用于所有函數。如果未設置,則默認為 0。

返回值

返回字符串類(lèi)型的結果。

更新日志

版本 說(shuō)明
8.0.0 現在 scale 可以為 null。
7.3.0 現在 bcmul() 可以按想要的小數點(diǎn)位數返回數字。 而之前,返回的數字會(huì )忽略尾隨零(trailing decimal zeroes)。

范例

示例 #1 bcmul() 示例

<?php
echo bcmul('1.34747474747''35'3); // 47.161
echo bcmul('2''4'); // 8
?>

注釋

注意:

Before PHP 7.3.0 bcmul() may return a result with fewer digits after the decimal point than the scale parameter would indicate. This only occurs when the result doesn't require all of the precision allowed by the scale. For example:

示例 #2 bcmul() scale example

<?php
echo bcmul('5''2'2);     // prints "10", not "10.00"
?>

參見(jiàn)

  • bcdiv() - 兩個(gè)任意精度的數字除法計算

欧美AV无码一区二区,麻豆+无码+国产在线+观看,欧美狂躁少妇XXXX高潮无码,美女扒开屁股让男人桶免费观看,极品粉嫩国产18尤物在线播放