per page, with , order by , clip by
Results of 1 - 6 of about 6 for prec (0.008 sec.)
decimal --- 10進固定小数点と浮動小数点の演算 13215
decimal --- 10進固定小数点と浮動小数点の演算 ソースコード: Lib/decimal.py decimal モジュールは、高速で正しく丸められる 10 進浮動小数点演算をサポートします。 float データ型に比べて次のような利点があります: Decimal は「人間を念頭に設計された ... できます (デフォルトは 28 桁です)。 問題に応じて必要なだけ精度を高くできます: >>> from decimal import * >>> getcontext () . prec = 6 >>> Decimal ( 1 ) / Decimal ( 7 ) Decimal('0.142857') >>> getcontext () . prec = 28 >>> Decimal ( 1 ) / Decimal ( 7 ) ... getcontext() で調べ、必要なら、精度、丸め、有効なトラップを設定します: >>> from decimal import * >>> getcontext () Context(prec=28, rounding=ROUND_HALF_EVEN, Emin=-999999, Emax=999999, capitals=1, clamp=0, flags=[], traps=[Overflow, DivisionByZero, I ... nvalidOperation]) >>> getcontext () . prec = 7 # 新しい精度を設定します Decimal インスタンスは、整数、文字列、浮動小数点数、またはタプルから構成できます。整数や浮動小 ...
https://man.mtool.work/python/3.14/library/decimal.html
What's New in Python 2.4 8499
What's New in Python 2.4 著者 : A.M. Kuchling この文書は 2005 年 3 月 30 日にリリースされた Python 2.4.1 の新機能について解説します。 Python 2.4 は、真ん中サイズ、のリリースです。急進的だった Python 2.2 ほどには多くの変更をしていませんが、保 ... IEEE 754 number, which uses 52 bits of space for the mantissa. This means that numbers can only be specified to 52 bits of precision. If you're trying to represent numbers whose expansion repeats endlessly, the expansion is cut off after 52 bits. Unf ... 28820134592177245001") Context 型 Context クラスのインスタンスは、十進数の演算に関するいくつかの設定をまとめて保持します。 prec is the precision, the number of decimal places. rounding は丸めモードを指定します。 decimal モジュールには、 ROUND_DOWN 、 ... を変えられます。 次の例は、デフォルトのコンテキストの精度を変更したときの影響を示しています。 >>> decimal . getcontext () . prec 28 >>> decimal . Decimal ( 1 ) / decimal . Decimal ( 7 ) Decimal("0.1428571428571428571428571429") >>> decimal . getcontex ...
https://man.mtool.work/python/3.14/whatsnew/2.4.html
11. 標準ライブラリをひとめぐり --- その II 8371
11. 標準ライブラリをひとめぐり --- その II ツアーの第2部では、プロフェッショナルプログラミングを支えるもっと高度なモジュールをカバーします。ここで挙げるモジュールは、小さなスクリプトの開発ではほとんど使いません。 11.1. 出力のフォーマット re ... + 0.1 + 0.1 + 0.1 + 0.1 == 1.0 False decimal モジュールを使うと、必要なだけの精度で算術演算を行えます: >>> getcontext () . prec = 36 >>> Decimal ( 1 ) / Decimal ( 7 ) Decimal('0.142857142857142857142857142857142857') 他のマニュアルの関連ページ Linux ...
https://man.mtool.work/python/3.14/tutorial/stdlib2.html
What's New in Python 2.5 8225
What's New in Python 2.5 著者 : A.M. Kuchling この記事では Python 2.5 の新機能を説明します。 Python 2.5 の最終リリースは 2006 年 8 月に予定されており、 PEP 356 にリリース計画が記載されています。 Python 2.5 は 2006 年 9 月 19 日にリリースされ ... , localcontext # デフォルトの精度である 28 桁で表示 v = Decimal ( '578' ) print v . sqrt () with localcontext ( Context ( prec = 16 )): # このブロック内のコードはすべて 16 桁の精度を使う。 # ブロックを抜けると元のコンテキストに戻る。 print v . sqrt ... os.stat() will now return time values as floats. (This doesn't necessarily mean that os.stat() will return times that are precise to fractions of a second; not all systems support such precision.) os.SEEK_SET 、 os.SEEK_CUR 、 os.SEEK_END という定数 ...
https://man.mtool.work/python/3.14/whatsnew/2.5.html
What's New in Python 2.6 8225
What's New in Python 2.6 著者 : A.M. Kuchling (amk at amk.ca) この記事では、2008 年 10 月 1 日にリリースされた Python 2.6 の新機能を説明します。 リリース日程は PEP 361 に記載されています。 Python 2.6 の主要なテーマは、言語を大幅に再設計する ... , localcontext # デフォルトの精度である 28 桁で表示 v = Decimal ( '578' ) print v . sqrt () with localcontext ( Context ( prec = 16 )): # このブロック内のコードはすべて 16 桁の精度を使う。 # ブロックを抜けると元のコンテキストに戻る。 print v . sqrt ... 1817 。) parse_qs() と parse_qsl() が cgi から urlparse モジュールへ移されました。 cgi に残っている版は、2.6 では PendingDeprecationWarning を出します ( bpo-600362 )。 cmath モジュールに大掛かりな改訂が行われました。Mark Dickinson と Christian Heimes ...
https://man.mtool.work/python/3.14/whatsnew/2.6.html
What's New In Python 3.3 8225
What's New In Python 3.3 この記事では 3.2 と比較した Python 3.3 の新機能を解説します。 Python 3.3 は2012年9月29日にリリースされました。全詳細については 変更履歴 をご覧ください。 参考 PEP 398 - Python 3.3 リリーススケジュール 概要 -- リリース ... ットされます。 API の変更 C モジュールはマシンアーキテクチャに依存する以下のコンテキストの制限を持ちます: 32-bit 64-bit MAX_PREC 425000000 999999999999999999 MAX_EMAX 425000000 999999999999999999 MIN_EMIN -425000000 -999999999999999999 コンテキストのテ ...
https://man.mtool.work/python/3.14/whatsnew/3.3.html
PREV 1 NEXT