« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 5 of about 5 for PositiveInfinity (0.001 sec.)
bcround — 任意精度数値を丸める | PHP 8.3 11656
bcround (PHP 8 >= 8.4.0) bcround — 任意精度数値を丸める 説明 function bcround ( string $num , int $precision = 0 , RoundingMode $mode = RoundingMode::HalfAwayFromZero ): string num を、指定した precision (小数点以下の桁数)に丸めた値を返しま ... )); var_dump ( bcround ( '9.5' , 0 , RoundingMode :: NegativeInfinity )); var_dump ( bcround ( '9.5' , 0 , RoundingMode :: PositiveInfinity )); echo PHP_EOL ; echo 'Rounding modes with 8.5' . PHP_EOL ; var_dump ( bcround ( '8.5' , 0 , RoundingMode :: HalfAwayFro ... )); var_dump ( bcround ( '8.5' , 0 , RoundingMode :: NegativeInfinity )); var_dump ( bcround ( '8.5' , 0 , RoundingMode :: PositiveInfinity )); ?> 上の例の出力は以下となります。 Rounding modes with 9.5 string(2) "10" string(1) "9" string(2) "10" string(1) "9" st ... nfinity )); var_dump ( bcround (- 1.55 , 1 , RoundingMode :: NegativeInfinity )); echo PHP_EOL ; echo 'Using RoundingMode::PositiveInfinity with 1 decimal digit precision' . PHP_EOL ; var_dump ( bcround ( 1.55 , 1 , RoundingMode :: PositiveInfinity )); var_dump ...
https://man.mtool.work/php/8.3/function.bcround.html
BcMath\Number::round — 任意精度数値を丸める | PHP 8.3 10791
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 ... gMode :: AwayFromZero ), $number -> round ( 0 , RoundingMode :: NegativeInfinity ), $number -> round ( 0 , RoundingMode :: PositiveInfinity ), ); echo PHP_EOL ; echo 'Rounding modes with 8.5' . PHP_EOL ; $number = new BcMath\Number ( '8.5' ); var_dump ( $number ... gMode :: AwayFromZero ), $number -> round ( 0 , RoundingMode :: NegativeInfinity ), $number -> round ( 0 , RoundingMode :: PositiveInfinity ), ); ?> 上の例の出力は以下となります。 Rounding modes with 9.5 object(BcMath\Number)#3 (2) { ["value"]=> string(2) "10" [ ... gativeInfinity ), $negative -> round ( 1 , RoundingMode :: NegativeInfinity ), ); echo PHP_EOL ; echo 'Using RoundingMode::PositiveInfinity with 1 decimal digit precision' . PHP_EOL ; var_dump ( $positive -> round ( 1 , RoundingMode :: PositiveInfinity ), $negat ...
https://man.mtool.work/php/8.3/bcmath-number.round.html
round — 浮動小数点数を丸める | PHP 8.3 8861
round (PHP 4, PHP 5, PHP 7, PHP 8) round — 浮動小数点数を丸める 説明 function round ( int | float $num , int $precision = 0 , int | RoundingMode $mode = RoundingMode::HalfAwayFromZero ): float num を、指定した precision (小数点以下の桁数)に ... -> +10 AwayFromZero : -3.5 -> -4 NegativeInfinity : +8.5 -> +8 NegativeInfinity : +9.5 -> +9 NegativeInfinity : -3.5 -> -4 PositiveInfinity : +8.5 -> +9 PositiveInfinity : +9.5 -> +10 PositiveInfinity : -3.5 -> -3 参考 ceil() - 端数の切り上げ floor() - 端数の切り ...
https://man.mtool.work/php/8.3/function.round.html
RoundingMode Enum | PHP 8.3 7997
RoundingMode Enum (PHP 8 >= 8.4.0) はじめに 列挙型の RoundingMode は、 round() 、 bcround() 、 BcMath\Number::round() で丸めの方法を指定するために使用されます。 列挙型概要 enum RoundingMode { case HalfAwayFromZero ; // 最も近い整数に丸めます ... もしくは等しい、最も近い整数に丸めます。 case NegativeInfinity ; // より小さい、もしくは等しい、最大の整数に丸めます。 case PositiveInfinity ; // より大きい、もしくは等しい、最小の整数に丸めます。 } 他のマニュアルの関連ページ Linux JM round(3) Python enum Linux J ...
https://man.mtool.work/php/8.3/enum.roundingmode.html
その他の変更 | PHP 8.3 6600
その他の変更 PHP コア クロージャ クロージャの名前が調整され、親関数の名前と 定義の行番号を含むようになりました。これにより、 スタックトレース内などでの識別が容易になります。 ファイバー(Fibers) デストラクタ実行中にファイバーを切り替えられるよ ... 加された RoundingMode 列挙型のインスタンスを受け入れます。 round() 関数に 4 つの新しいモードが追加されました: RoundingMode::PositiveInfinity, RoundingMode::NegativeInfinity, RoundingMode::TowardsZero, RoundingMode::AwayFromZero 整数への丸めのための内部実装が、正確 ...
https://man.mtool.work/php/8.3/migration84.other-changes.html
PREV 1 NEXT