per page, with , order by , clip by
Results of 1 - 5 of about 5 for rounding (0.008 sec.)
decimal --- 10進固定小数点と浮動小数点の演算 12851
decimal --- 10進固定小数点と浮動小数点の演算 ソースコード: Lib/decimal.py decimal モジュールは、高速で正しく丸められる 10 進浮動小数点演算をサポートします。 float データ型に比べて次のような利点があります: Decimal は「人間を念頭に設計された ... t() で調べ、必要なら、精度、丸め、有効なトラップを設定します: >>> from decimal import * >>> getcontext () Context(prec=28, rounding=ROUND_HALF_EVEN, Emin=-999999, Emax=999999, capitals=1, clamp=0, flags=[], traps=[Overflow, DivisionByZero, InvalidOperati ... Decimal('3.1415926535') >>> Decimal ( '3.1415926535' ) + Decimal ( '2.7182818285' ) Decimal('5.85987') >>> getcontext () . rounding = ROUND_UP >>> Decimal ( '3.1415926535' ) + Decimal ( '2.7182818285' ) Decimal('5.85988') C バージョンの内部制限を超えた場 ... '2.675' ) : .2f } " '2.68' >>> format ( Decimal ( '2.675' ), ".2e" ) '2.68e+0' >>> with localcontext () as ctx : ... ctx . rounding = ROUND_DOWN ... print ( format ( Decimal ( '2.675' ), ".2f" )) ... 2.67 いくつかの数学的関数も Decimal には用意されていま ...
https://man.mtool.work/python/3.14/library/decimal.html
string --- 一般的な文字列操作 8567
string --- 一般的な文字列操作 ソースコード: Lib/string/__init__.py 参考 テキストシーケンス型 --- str 文字列メソッド 文字列定数 このモジュールで定義されている定数は以下の通りです: string. ascii_letters 後述の ascii_lowercase と ascii_upperca ... ような結果になります。 The result should be correctly rounded to a given precision p of digits after the decimal point. The rounding mode for float matches that of the round() builtin. For Decimal , the rounding mode of the current context will be used. c ...
https://man.mtool.work/python/3.14/library/string.html
組み込み型 8162
組み込み型 以下のセクションでは、インタプリタに組み込まれている標準型について記述します。 主要な組み込み型は、数値、シーケンス、マッピング、クラス、インスタンス、および例外です。 コレクションクラスには、ミュータブルなものがあります。コレクシ ... oating-point formats, the result should be correctly rounded to a given precision p of digits after the decimal point. The rounding mode matches that of the round() builtin. 注釈: 別の形式を指定(訳注: 変換フラグ # を使用)すると 8 進数を表す接頭辞 ( '0o ...
https://man.mtool.work/python/3.14/builtins/stdtypes.html
What's New in Python 2.4 8162
What's New in Python 2.4 著者 : A.M. Kuchling この文書は 2005 年 3 月 30 日にリリースされた Python 2.4.1 の新機能について解説します。 Python 2.4 は、真ん中サイズ、のリリースです。急進的だった Python 2.2 ほどには多くの変更をしていませんが、保 ... ンスタンスは、十進数の演算に関するいくつかの設定をまとめて保持します。 prec is the precision, the number of decimal places. rounding は丸めモードを指定します。 decimal モジュールには、 ROUND_DOWN 、 ROUND_CEILING 、 ROUND_HALF_EVEN など、各種モードを表す定 ...
https://man.mtool.work/python/3.14/whatsnew/2.4.html
What's New in Python 2.7 8162
What's New in Python 2.7 著者 : A.M. Kuchling (amk at amk.ca) この文書は Python 2.7 の新機能について解説します。Python 2.7 は 2010 年 7 月 3 日にリリースされました。 数値周りの扱いが、浮動小数点数でも Decimal クラスでもいろいろな点で改良され ... esis; bpo-6491 .) configure が一部の 32 ビット Intel チップの浮動小数点数の丸めバグを調べ、プリプロセッサー定義 X87_DOUBLE_ROUNDING を設定するようになりました。 現在これを使うコードはありませんが、必要なら利用できます。 (Mark Dickinson が追加しました。 b ...
https://man.mtool.work/python/3.14/whatsnew/2.7.html
PREV 1 NEXT