Results of 1 - 10 of about 71 for Fraction (0.044 sec.)
- fractions --- 有理数 — Python 3.14.8 ドキュメント 15054
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 数値と数学モジュール » fractions --- 有理数 テーマ 自動 ライト ダーク | fractions --- 有理数 ¶ ソースコード: Lib/fractions.py The fraction
...ractions module provides support for rational number arithmetic. A Fraction instance can be constructed from a pair of rational numbers, from a single number, or from a string. class fractions. Frac...tion ( numerator = 0 , denominator = 1 ) ¶ class fractions. Fraction ( number ) class fractions. Fraction ( string ) The first version requires that numerator and denominator are i...nstances of numbers.Rational and returns a new Fraction instance with a value equal to numerator/denominator . If denominator is zero, it raises a ZeroDivisionError . The second... - https://man.mtool.work/python/3.14/library/fractions.html
- fractions --- 有理数 — Python 3.14.8 ドキュメント 15054
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 数値と数学モジュール » fractions --- 有理数 テーマ 自動 ライト ダーク | fractions --- 有理数 ¶ ソースコード: Lib/fractions.py The fraction
...ractions module provides support for rational number arithmetic. A Fraction instance can be constructed from a pair of rational numbers, from a single number, or from a string. class fractions. Frac...tion ( numerator = 0 , denominator = 1 ) ¶ class fractions. Fraction ( number ) class fractions. Fraction ( string ) The first version requires that numerator and denominator are i...nstances of numbers.Rational and returns a new Fraction instance with a value equal to numerator/denominator . If denominator is zero, it raises a ZeroDivisionError . The second... - https://man.mtool.work/python/3.14/library/fractions.html
- statistics --- 数学的統計関数 — Python 3.14.8 ドキュメント 7702
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 数値と数学モジュール » statistics --- 数学的統計関数 テーマ 自動 ライト ダーク | statistics --- 数学的統計関数 ¶ Added in version 3
...意図していません。グラフ関数電卓のレベルを対象としています。 特に明記しない限り、これらの関数は int , float , Decimal そして Fraction をサポートします。他の型 (算術型及びそれ以外) は現在サポートされていません。型が混ざったコレクションも未定義で実装依存です...sError を送出します。 使用例: >>> mean ([ 1 , 2 , 3 , 4 , 4 ]) 2.8 >>> mean ([ - 1.0 , 2.5 , 3.25 , 5.75 ]) 2.625 >>> from fractions import Fraction as F >>> mean ([ F ( 3 , 7 ), F ( 1 , 21 ), F ( 5 , 3 ), F ( 1 , 3 )]) Fraction(13, 21) >>> from decimal...、それを第2引数 mu に渡して再計算を避けることが出来ます: >>> mu = mean ( data ) >>> pvariance ( data , mu ) 1.25 Decimal と Fraction がサポートされています: >>> from decimal import Decimal as D >>> pvariance ([ D ( "27.5" ), D ( "30.25" ), D ( "30.25" ),... - https://man.mtool.work/python/3.14/library/statistics.html
- statistics --- 数学的統計関数 — Python 3.14.8 ドキュメント 7702
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 数値と数学モジュール » statistics --- 数学的統計関数 テーマ 自動 ライト ダーク | statistics --- 数学的統計関数 ¶ Added in version 3
...意図していません。グラフ関数電卓のレベルを対象としています。 特に明記しない限り、これらの関数は int , float , Decimal そして Fraction をサポートします。他の型 (算術型及びそれ以外) は現在サポートされていません。型が混ざったコレクションも未定義で実装依存です...sError を送出します。 使用例: >>> mean ([ 1 , 2 , 3 , 4 , 4 ]) 2.8 >>> mean ([ - 1.0 , 2.5 , 3.25 , 5.75 ]) 2.625 >>> from fractions import Fraction as F >>> mean ([ F ( 3 , 7 ), F ( 1 , 21 ), F ( 5 , 3 ), F ( 1 , 3 )]) Fraction(13, 21) >>> from decimal...、それを第2引数 mu に渡して再計算を避けることが出来ます: >>> mu = mean ( data ) >>> pvariance ( data , mu ) 1.25 Decimal と Fraction がサポートされています: >>> from decimal import Decimal as D >>> pvariance ([ D ( "27.5" ), D ( "30.25" ), D ( "30.25" ),... - https://man.mtool.work/python/3.14/library/statistics.html
- 組み込み型 — Python 3.14.8 ドキュメント 7660
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python built-ins reference » 組み込み型 テーマ 自動 ライト ダーク | 組み込み型 ¶ 以下のセクションでは、インタプリタに組み込まれている標準型について記述します。 主
...t-in objects considered false: 偽であると定義されている定数: None と False 数値型におけるゼロ: 0 , 0.0 , 0j , Decimal(0) , Fraction(0, 1) 空のシーケンスまたはコレクション: '' , () , [] , {} , set() , range(0) ブール値の結果を返す演算および組み込み関数は、...z から実部および虚部を取り出すには、 z.real および z.imag を使ってください。 (標準ライブラリには、さらに分数のための数値型 fractions.Fraction や、ユーザによる精度の定義が可能な浮動小数点数のための decimal.Decimal があります。) 数値は、数値リテラルによって...はインスタンスメソッドであることに注意して下さい。 16 進文字列表現は以下の書式となります: [ sign ] [ '0x' ] integer [ '.' fraction ] [ 'p' exponent ] where the optional sign may be either + or - , integer and fraction are strings of hexadecimal digits,... - https://man.mtool.work/python/3.14/builtins/stdtypes.html
- What's New In Python 3.1 — Python 3.14.8 ドキュメント 7562
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's New In Python 3.1 テーマ 自動 ライト ダーク | What's New In Python 3.1 ¶ 著者 : Raymond Hettinger This article explains the new fea
...の同名機能の模倣品です。また、既存の itertools.count() 関数は新たにオプショナルな step 引数を取るようになり、そして数え方に fractions.Fraction や decimal.Decimal を含む任意の数値型を使えるようになりました。 >>> [ p + q for p , q in combinations_with_repla...mpress ( data = range ( 10 ), selectors = [ 0 , 0 , 1 , 1 , 0 , 1 , 0 , 1 , 0 , 0 ])) [2, 3, 5, 7] >>> c = count ( start = Fraction ( 1 , 2 ), step = Fraction ( 1 , 6 )) >>> [ next ( c ), next ( c ), next ( c ), next ( c )] [Fraction(1, 2), Fraction(2, 3...), Fraction(5, 6), Fraction(1, 1)] (Contributed by Raymond Hettinger.) collections.namedtuple() が新たにキーワード引数 rename をサポー... - https://man.mtool.work/python/3.14/whatsnew/3.1.html
- What's New In Python 3.1 — Python 3.14.8 ドキュメント 7562
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's New In Python 3.1 テーマ 自動 ライト ダーク | What's New In Python 3.1 ¶ 著者 : Raymond Hettinger This article explains the new fea
...の同名機能の模倣品です。また、既存の itertools.count() 関数は新たにオプショナルな step 引数を取るようになり、そして数え方に fractions.Fraction や decimal.Decimal を含む任意の数値型を使えるようになりました。 >>> [ p + q for p , q in combinations_with_repla...mpress ( data = range ( 10 ), selectors = [ 0 , 0 , 1 , 1 , 0 , 1 , 0 , 1 , 0 , 0 ])) [2, 3, 5, 7] >>> c = count ( start = Fraction ( 1 , 2 ), step = Fraction ( 1 , 6 )) >>> [ next ( c ), next ( c ), next ( c ), next ( c )] [Fraction(1, 2), Fraction(2, 3...), Fraction(5, 6), Fraction(1, 1)] (Contributed by Raymond Hettinger.) collections.namedtuple() が新たにキーワード引数 rename をサポー... - https://man.mtool.work/python/3.14/whatsnew/3.1.html
- 組み込み型 — Python 3.14.8 ドキュメント 7379
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python built-ins reference » 組み込み型 テーマ 自動 ライト ダーク | 組み込み型 ¶ 以下のセクションでは、インタプリタに組み込まれている標準型について記述します。 主
...t-in objects considered false: 偽であると定義されている定数: None と False 数値型におけるゼロ: 0 , 0.0 , 0j , Decimal(0) , Fraction(0, 1) 空のシーケンスまたはコレクション: '' , () , [] , {} , set() , range(0) ブール値の結果を返す演算および組み込み関数は、...z から実部および虚部を取り出すには、 z.real および z.imag を使ってください。 (標準ライブラリには、さらに分数のための数値型 fractions.Fraction や、ユーザによる精度の定義が可能な浮動小数点数のための decimal.Decimal があります。) 数値は、数値リテラルによって...はインスタンスメソッドであることに注意して下さい。 16 進文字列表現は以下の書式となります: [ sign ] [ '0x' ] integer [ '.' fraction ] [ 'p' exponent ] where the optional sign may be either + or - , integer and fraction are strings of hexadecimal digits,... - https://man.mtool.work/python/3.14/builtins/stdtypes.html
- 15. 浮動小数点演算、その問題と制限 — Python 3.14.8 ドキュメント 7238
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python チュートリアル » 15. 浮動小数点演算、その問題と制限 テーマ 自動 ライト ダーク | 15. 浮動小数点演算、その問題と制限 ¶ 浮動小数点数はコンピューターのハードウ
...何桁使おうとも、10 進数の 0.1 は基数を 2 とした小数で正確に表現することはできません。基数 2 では、1/10 は循環小数 (repeating fraction) となります 0.0001100110011001100110011001100110011001100110011 ... どこか有限の桁で止めると、近似値を得ることになります。...プリケーションや高精度の計算が求められるアプリケーションに適した、10進数の計算を実装しています。 別の正確な計算方法として、 fractions モジュールが有理数に基づく計算を実装しています (1/3 のような数を正確に表すことができます)。 あなたが浮動小数点演算のヘビー...024 , 143401161448607.16 , ... - 143401161400469.7 , 266262841.31058735 , - 0.003244936839808227 ] >>> float ( sum ( map ( Fraction , arr ))) # Exact summation with single rounding 8.042173697819788e-13 >>> math . fsum ( arr ) # Single rounding 8.0421736... - https://man.mtool.work/python/3.14/tutorial/floatingpoint.html
- 変更履歴 — Python 3.14.8 ドキュメント 7238
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » 変更履歴 テーマ 自動 ライト ダーク | 変更履歴 ¶ Python next ¶ Release date: XXXX-XX-XX セキュリティ ¶ gh-157265 : In tarfile , when extrac
...: The C implementations of fromisoformat() and fromisoformat() now reject a decimal separator that is not followed by any fractional digit before a timezone designator. gh-151763 : Fix crash in _interpqueues.create() whe MemoryError happens on queue cre...ormatting, for example format(Decimal(1.25), '.016f') . gh-130662 : Accept leading zeros in precision and width fields for Fraction formatting, for example format(Fraction(1, 3), '.016f') . gh-87790 : Support underscore and comma as thousands separators...in the fractional part for Fraction 's formatting. Patch by Sergey B Kirpichev. gh-87790 : Support underscore and comma as thousands separ... - https://man.mtool.work/python/3.14/whatsnew/changelog.html