Results of 1 - 10 of about 49 for BCMath (0.002 sec.)
- BcMath\Number クラス | PHP 8.3 10217
- BcMath\Number クラス (PHP 8 >= 8.4.0) はじめに 任意精度数値のクラスです。 このオブジェクトは、オーバーロードされた 算術演算子 , 比較演算子 をサポートしています。 注意 : このクラスは、 php.ini で設定された bcmath.scale INI ディレクティブの影
... ーバーロードされた演算子の動作は、対応するメソッドで scale パラメータに null を指定した場合と同じです。 クラス概要 namespace BcMath ; final readonly class Number implements Stringable { /* プロパティ */ public string $ value ; public int $ scale ; /* メソ ... ッド */ public function __construct ( string | int $num ) public function add ( BcMath\Number | string | int $num , ? int $scale = null ): BcMath\Number public function ceil (): BcMath\Number public function c ... ompare ( BcMath\Number | string | int $num , ? int $scale = null ): int public function div ( BcMath\Number | string | int $num , ? int $s ...
-
https://man.mtool.work/php/8.3/class.bcmath-number.html
- BcMath\Number::round — 任意精度数値を丸める | PHP 8.3 10187
- BcMath\Number::round (PHP 8 >= 8.4.0) BcMath\Number::round — 任意精度数値を丸める 説明 public function BcMath\Number::round ( int $precision = 0 , RoundingMode $mode = RoundingMode::HalfAwayFromZero ): BcMath\Number $this を、指定した preci
... の倍数に丸められる、という具合です。 mode 指定する丸めモード。詳しくは RoundingMode を参照してください。 戻り値 結果を新しい BcMath\Number オブジェクトとして返します。 エラー / 例外 このメソッドは、無効な mode が指定された場合に ValueError をスローします ... 。 例 例1 BcMath\Number::round() の例 <?php var_dump ( new BcMath\Number ( '3.4' )-> round (), new BcMath\Number ( '3.5' )-> round (), new ... BcMath\Number ( '3.6' )-> round (), new BcMath\Number ( '3.6' )-> round ( 0 ), new BcMath\Number ( '5.045' )-> round ( 2 ), new BcMath\Number ( '5.055' )-> round ( 2 ), ...
-
https://man.mtool.work/php/8.3/bcmath-number.round.html
- BcMath\Number::div — 任意精度数値の除算を行う | PHP 8.3 9931
- BcMath\Number::div (PHP 8 >= 8.4.0) BcMath\Number::div — 任意精度数値の除算を行う 説明 public function BcMath\Number::div ( BcMath\Number | string | int $num , ? int $scale = null ): BcMath\Number $this を num で割ります。 パラメータ num 除
... 数を表す値。 scale 計算結果オブジェクトの BcMath\Number::scale を明示的に指定します。 null の場合、計算結果の BcMath\Number::scale は自動的に設定されます。 戻り値 除算結果 ... を新しい BcMath\Number オブジェクトとして返します。 除算結果オブジェクトの BcMath\Number::scale が自動的に設定される場合、被除数の BcMath\ ... Number::scale が使用されます。ただし、割り切れない除算の場合は、 除算結果オブジェクトの BcMath\Number::scale が拡張されます。 拡張は必要に応じてのみ行われ、最大で +10 まで拡張されます。 つまり、被除数の BcMath\Number: ...
-
https://man.mtool.work/php/8.3/bcmath-number.div.html
- BcMath\Number::powmod — 任意精度数値のべき乗の、指定した数値による剰余 | PHP 8.... 9719
- BcMath\Number::powmod (PHP 8 >= 8.4.0) BcMath\Number::powmod — 任意精度数値のべき乗の、指定した数値による剰余 説明 public function BcMath\Number::powmod ( BcMath\Number | string | int $exponent , BcMath\Number | string | int $modulus , ? in
... t $scale = null ): BcMath\Number modulus で割った余りを求めることを考慮して、 $this の exponent 乗を高速に計算します。 パラメータ exponent 基数を表す ... いけません) modulus 指数を表す、負でない、整数の値。 (つまり、scale は 0 でなければいけません) scale 計算結果オブジェクトの BcMath\Number::scale を明示的に指定します。 null の場合、計算結果の BcMath\Number::scale は自動的に設定されます。 戻り値 計算結果 ... を新しい BcMath\Number オブジェクトとして返します。 計算結果オブジェクトの BcMath\Number::scale が自動的に設定される場合、常に 0 になります ...
-
https://man.mtool.work/php/8.3/bcmath-number.powmod.html
- BcMath\Number::divmod — 任意精度数値の商と剰余を取得する | PHP 8.3 9674
- BcMath\Number::divmod (PHP 8 >= 8.4.0) BcMath\Number::divmod — 任意精度数値の商と剰余を取得する 説明 public function BcMath\Number::divmod ( BcMath\Number | string | int $num , ? int $scale = null ): array $this を num で割った商と剰余を取得
... します。 パラメータ num 除数を表す値。 scale 計算結果オブジェクトの BcMath\Number::scale を明示的に指定します。 null の場合、計算結果の BcMath\Number::scale は自動的に設定されます。 戻り値 1つ目の要 ... 素に商として新しい BcMath\Number オブジェクトが、 2つ目の要素に剰余として新しい BcMath\Number オブジェクトが格納された配列を返します。 商は常に整数値 ... となるため、商オブジェクトの BcMath\Number::scale は scale の指定に関わらず、常に 0 になります。 scale を明示的に指定した場合、剰余オブジェクトの BcMath\Numbe ...
-
https://man.mtool.work/php/8.3/bcmath-number.divmod.html
- BcMath\Number::pow — 任意精度数値をべき乗する | PHP 8.3 9644
- BcMath\Number::pow (PHP 8 >= 8.4.0) BcMath\Number::pow — 任意精度数値をべき乗する 説明 public function BcMath\Number::pow ( BcMath\Number | string | int $exponent , ? int $scale = null ): BcMath\Number $this の exponent 乗を求めます。 パラメ
... はプラットフォームに依存しますが、少なくとも -2147483648 から 2147483647 までの範囲を持ちます。 scale 計算結果オブジェクトの BcMath\Number::scale を明示的に指定します。 null の場合、計算結果の BcMath\Number::scale は自動的に設定されます。 戻り値 べき乗の ... 結果を新しい BcMath\Number オブジェクトとして返します。 べき乗結果オブジェクトの BcMath\Number::scale が自動的に設定される場合、 exponent の値 ... に応じて、結果の BcMath\Number::scale が以下のようになります: exponent べき乗結果オブジェクトの BcMath\Number::scale 正の値 (基数の BcMath\Number: ...
-
https://man.mtool.work/php/8.3/bcmath-number.pow.html
- BcMath\Number::mul — 任意精度数値の乗算を行う | PHP 8.3 9568
- BcMath\Number::mul (PHP 8 >= 8.4.0) BcMath\Number::mul — 任意精度数値の乗算を行う 説明 public function BcMath\Number::mul ( BcMath\Number | string | int $num , ? int $scale = null ): BcMath\Number $this に num を掛けます。 パラメータ num 乗
... 数を表す値。 scale 計算結果オブジェクトの BcMath\Number::scale を明示的に指定します。 null の場合、計算結果の BcMath\Number::scale は自動的に設定されます。 戻り値 乗算結果 ... を新しい BcMath\Number オブジェクトとして返します。 乗算結果オブジェクトの BcMath\Number::scale が自動的に設定される場合、乗算に使用する2つ ... の数値の BcMath\Number::scale の合計値が使用されます。 つまり、2つの値の BcMath\Number::scale がそれぞれ 2 と 5 の場合、 乗算結果オブジェク ...
-
https://man.mtool.work/php/8.3/bcmath-number.mul.html
- BcMath\Number::add — 任意精度の数値を加算する | PHP 8.3 9508
- BcMath\Number::add (PHP 8 >= 8.4.0) BcMath\Number::add — 任意精度の数値を加算する 説明 public function BcMath\Number::add ( BcMath\Number | string | int $num , ? int $scale = null ): BcMath\Number $this と num を加算します。 パラメータ num
... 加数を表す値。 scale 計算結果オブジェクトの BcMath\Number::scale を明示的に指定します。 null の場合、計算結果の BcMath\Number::scale は自動的に設定されます。 戻り値 加算結果 ... を新しい BcMath\Number オブジェクトとして返します。 加算結果オブジェクトの BcMath\Number::scale が自動的に設定される場合、加算に使用する2つ ... の数値のうち、 大きい方の BcMath\Number::scale が使用されます。 つまり、2つの値の BcMath\Number::scale がそれぞれ 2 と 5 の場合、 加算結果オブジェクトの Bc ...
-
https://man.mtool.work/php/8.3/bcmath-number.add.html
- BcMath\Number::mod — 任意精度数値の剰余を取得する | PHP 8.3 9508
- BcMath\Number::mod (PHP 8 >= 8.4.0) BcMath\Number::mod — 任意精度数値の剰余を取得する 説明 public function BcMath\Number::mod ( BcMath\Number | string | int $num , ? int $scale = null ): BcMath\Number $this を num で割った剰余を取得します。
... num が 0 でない限り、 結果は $this と同じ符号になります。 パラメータ num 除数を表す値。 scale 計算結果オブジェクトの BcMath\Number::scale を明示的に指定します。 null の場合、計算結果の BcMath\Number::scale は自動的に設定されます。 戻り値 剰余オブ ... ジェクトを新しい BcMath\Number オブジェクトとして返します。 剰余オブジェクトの BcMath\Number::scale が自動的に設定される場合、剰余計算に使用する2つ ... の数値のうち、 大きい方の BcMath\Number::scale が使用されます。 つまり、2つの値の BcMath\Number::scale がそれぞれ 2 と 5 の場合、 加算結果オブジェクトの Bc ...
-
https://man.mtool.work/php/8.3/bcmath-number.mod.html
- BcMath\Number::sub — 任意精度数値の減算を行う | PHP 8.3 9508
- BcMath\Number::sub (PHP 8 >= 8.4.0) BcMath\Number::sub — 任意精度数値の減算を行う 説明 public function BcMath\Number::sub ( BcMath\Number | string | int $num , ? int $scale = null ): BcMath\Number $this と num を減算します。 パラメータ num
... 減数を表す値。 scale 計算結果オブジェクトの BcMath\Number::scale を明示的に指定します。 null の場合、計算結果の BcMath\Number::scale は自動的に設定されます。 戻り値 減算結果 ... を新しい BcMath\Number オブジェクトとして返します。 減算結果オブジェクトの BcMath\Number::scale が自動的に設定される場合、減算に使用する2つ ... の数値のうち、 大きい方の BcMath\Number::scale が使用されます。 つまり、2つの値の BcMath\Number::scale がそれぞれ 2 と 5 の場合、 加算結果オブジェクトの Bc ...
-
https://man.mtool.work/php/8.3/bcmath-number.sub.html