per page, with , order by , clip by
Results of 1 - 10 of about 12 for Integral (0.010 sec.)
numbers --- 数の抽象基底クラス 13637
numbers --- 数の抽象基底クラス ソースコード: Lib/numbers.py numbers モジュール ( PEP 3141 ) は、下位になるほど多くの演算を定義する、数値の 抽象基底クラス の階層を定義しています。 このモジュールで定義する型は、どれもインスタンス化を目的とした ... tor と denominator のプロパティを加えたものです。これは float() のデフォルトも提供します。 numerator と denominator の値は Integral のインスタンスでなければならず、 denominator が正の既約分数になっていなければなりません。 numerator 抽象プロパティ。 この有 ... 理数の分子。 denominator 抽象プロパティ。 この有理数の分母。 class numbers. Integral Rational をサブタイプ化し int への変換が加わります。 float() , numerator , denominator のデフォルトを提供します。法 (訳注: ... 術演算では、両方の引数の型を考慮した実装を呼び出すか、両方を最も近い組み込み型に変換して、その型で演算するように実装します。 Integral のサブタイプでは、 __add__() と __radd__() を次のように定義するということです。 class MyIntegral ( Integral ): def __add__ ...
https://man.mtool.work/python/3.14/library/numbers.html
fractions --- 有理数 10506
fractions --- 有理数 ソースコード: Lib/fractions.py fractions モジュールは有理数の演算をサポートします。 Fraction インスタンスは、2 つの有理数、1 つの数値、または文字列から作成できます。 class fractions. Fraction ( numerator = 0 , denominat ... integer ( ) Fraction が整数なら True を返します。 Added in version 3.12. classmethod from_float ( f ) float または numbers.Integral のインスタンスだけを受け取る代替コンストラクタです。 Fraction.from_float(0.3) は Fraction(3, 10) と同じ値ではないことに注意 ... から直接 Fraction インスタンスを構築できるようになりました。 classmethod from_decimal ( dec ) decimal.Decimal または numbers.Integral のインスタンスだけを受け取る代替コンストラクタです。 注釈 Python 3.2 以降では、 decimal.Decimal インスタンスから直接 Fract ... ion インスタンスを構築できるようになりました。 classmethod from_number ( number ) numbers.Integral 、 numbers.Rational 、 float 、 decimal.Decimal のインスタンス、および as_integer_ratio() メソッドを持つオブジェクトだけを ...
https://man.mtool.work/python/3.14/library/fractions.html
decimal --- 10進固定小数点と浮動小数点の演算 9781
decimal --- 10進固定小数点と浮動小数点の演算 ソースコード: Lib/decimal.py decimal モジュールは、高速で正しく丸められる 10 進浮動小数点演算をサポートします。 float データ型に比べて次のような利点があります: Decimal は「人間を念頭に設計された ... 1 つまたは 2 つ追加する必要が生じることがあります。 たとえば、 Decimal('123E+1') は Decimal('1.23E+3') に変換されます。 to_integral ( rounding = None , context = None ) to_integral_value() メソッドと同じです。 to_integral の名前は古いバージョンとの互換性 ... のために残されています。 to_integral_exact ( rounding = None , context = None ) 最近傍の整数に値を丸め、丸めが起こった場合には Inexact または Rounded のシグナル ... うでなければ context 引数で決まります。どちらの引数も渡されなければ現在のスレッドのコンテキストの丸めモードが使われます。 to_integral_value ( rounding = None , context = None ) Inexact や Rounded といったシグナルを出さずに最近傍の整数に値を丸めます。 round ...
https://man.mtool.work/python/3.14/library/decimal.html
math --- 数学関数 9781
math --- 数学関数 このモジュールは、C 標準で定義されたものを含む、一般的な数学関数と定数を提供します。 これらの関数で複素数を使うことはできません。複素数に対応する必要があるならば、 cmath モジュールにある同じ名前の関数を使ってください。ほと ... in version 3.8. math. factorial ( n ) Return factorial of the nonnegative integer n . バージョン 3.10 で変更: Floats with integral values (like 5.0 ) are no longer accepted. math. gcd ( * integers ) Return the greatest common divisor of the specified in ... h. ceil ( x ) x の「天井」 ( x 以上の最小の整数) を返します。 x が浮動小数点数でなければ、内部的に x.__ceil__ が実行され、 Integral 値が返されます。 math. fabs ( x ) x の絶対値を返します。 math. floor ( x ) x の「床」 ( x 以下の最大の整数) を返します。 x ... が浮動小数点数でなければ、内部的に x.__floor__ が実行され、 Integral 値が返されます。 math. fma ( x , y , z ) 融合積和演算です。 (x * y) + z を、無限の精度と範囲で計算してから float 形式に 1 ...
https://man.mtool.work/python/3.14/library/math.html
What's New in Python 2.6 8330
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 の主要なテーマは、言語を大幅に再設計する ... on が加わりました。 ( numbers.Rational との名前の衝突を避けるため、 Rational ではなく Fraction という名前になっています。) Integral は Rational を継承し、 << と >> による左右のシフト、 & や | などのビット演算ができ、配列のインデックスやスライスの境界にも ... わります。 この新しい関数は Python 2.6 にも移植されました。 math.trunc() はゼロに向かって丸め、引数とゼロの間にある最も近い Integral を返します。 参考 PEP 3141 - 数値の型階層 PEP 著: Jeffrey Yasskin. Guile マニュアルの Scheme's numerical tower 。 R5RS Sch ... 数点数では近似しか出来ない 2/3 のような数を正確に表現出来ます。 Fraction のコンストラクターは、分数の分子と分母になる 2 つの Integral 値を受け取ります。 >>> from fractions import Fraction >>> a = Fraction ( 2 , 3 ) >>> b = Fraction ( 2 , 5 ) >>> float ( a ...
https://man.mtool.work/python/3.14/whatsnew/2.6.html
組み込み型 8083
組み込み型 以下のセクションでは、インタプリタに組み込まれている標準型について記述します。 主要な組み込み型は、数値、シーケンス、マッピング、クラス、インスタンス、および例外です。 コレクションクラスには、ミュータブルなものがあります。コレクシ ... Unicode 標準 をご覧ください。 全ての numbers.Real 型 ( int 、 float ) は以下の演算も含みます: 演算 結果 math.trunc(x) x を Integral (整数) に切り捨てます round(x[, n]) x を n 桁に丸めます。丸め方は偶数丸めです。 n が省略されれば 0 がデフォルトとなります。 ... math.floor(x) x 以下の最大の Integral (整数) を返します math.ceil(x) x 以上の最小の Integral (整数) を返します その他の数値演算は、 math や cmath モジュールをご ... 計算に使うビット幅は 1 + max(x.bit_length(), y.bit_length()) 以上で十分です。 整数型における追加のメソッド 整数型は numbers.Integral 抽象基底クラス を実装します。さらに、追加のメソッドをいくつか提供します: int. bit_length ( ) 整数を、符号と先頭の 0 は除い ...
https://man.mtool.work/python/3.14/builtins/stdtypes.html
はじめに 8083
はじめに Python のアプリケーションプログラマー向けインターフェース (API) は、C と C++ のプログラマーに、Python インタープリタへのさまざまなレベルのアクセスを提供します。 C++ からも同様に使えますが、簡潔に Python/C API と呼びます。 Python/C ... います。これらの型については、その型を使う関数とともに説明してゆきます。 type Py_ssize_t 次に属します: Stable ABI . A signed integral type such that sizeof(Py_ssize_t) == sizeof(size_t) . C99 doesn't define such a thing directly (size_t is an unsigned inte ...
https://man.mtool.work/python/3.14/c-api/intro.html
Pythonモジュール索引 8083
Pythonモジュール索引 _ | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | z _ __future__ Future statement definitions __main__ The environment where top-level code is run. Covers command-line i ... files. nis 非推奨: Removed in 3.13. nntplib 非推奨: Removed in 3.13. numbers Numeric abstract base classes (Complex, Real, Integral, etc.). o operator Functions corresponding to the standard operators. optparse Command-line option parsing library. os Mis ...
https://man.mtool.work/python/3.14/py-modindex.html
組み込み関数 7605
組み込み関数 Python インタプリタには数多くの関数と型が組み込まれており、いつでも利用できます。それらをここにアルファベット順に挙げます。 組み込み関数 A abs() aiter() all() anext() any() ascii() B bin() bool() breakpoint() bytearray() bytes( ... d. For example, pow(10, 2) returns 100 , but pow(10, -2) returns 0.01 . For a negative base of type int or float and a non-integral exponent, a complex result is delivered. For example, pow(-9, 0.5) returns a value close to 3j . Whereas, for a negative b ... ase of type int or float with an integral exponent, a float result is delivered. For example, pow(-9, 2.0) returns 81.0 . base と exp が int オペランドで mod が存在 ...
https://man.mtool.work/python/3.14/builtins/functions.html
Python ドキュメントの目次 7375
Python ドキュメントの目次 What's New in Python What's new in Python 3.14 概要 -- リリースハイライト 新しい機能 PEP 649 と PEP 749 : アノテーションの遅延評価 PEP 734 : 複数インタープリタ機能が標準ライブラリに追加 PEP 750 : テンプレート文字列 ... ト、値、および型 3.2. 標準型の階層 3.2.1. None 3.2.2. NotImplemented 3.2.3. Ellipsis 3.2.4. numbers.Number 3.2.4.1. numbers.Integral (整数) 3.2.4.2. numbers.Real ( float ) (実数) 3.2.4.3. numbers.Complex ( complex ) 3.2.5. シーケンス型 (sequence) 3.2.5.1. ...
https://man.mtool.work/python/3.14/contents.html
PREV 1 2 NEXT