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

bcpow

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

bcpow任意精度數字的乘方

說(shuō)明

bcpow(string $num, string $exponent, ?int $scale = null): string

numexponent 次方運算。

參數

num

string 類(lèi)型的底數。

exponent

string 類(lèi)型的指數。 如果指數不是整數,將被截斷。 指數的有效范圍取決于平臺,但起碼支持 -21474836482147483647 的范圍。

scale

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

返回值

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

更新日志

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

范例

示例 #1 bcpow() 示例

<?php

echo bcpow('4.2''3'2); // 74.08

?>

注釋

注意:

Before PHP 7.3.0 bcpow() 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 bcpow() scale example

<?php
echo bcpow('5''2'2);     // prints "25", not "25.00"
?>

參見(jiàn)

  • bcpowmod() - Raise an arbitrary precision number to another, reduced by a specified modulus
  • bcsqrt() - 任意精度數字的二次方根

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