Results of 1 - 10 of about 48 for math (0.005 sec.)
- math --- 数学関数 16676
- math --- 数学関数 このモジュールは、C 標準で定義されたものを含む、一般的な数学関数と定数を提供します。 これらの関数で複素数を使うことはできません。複素数に対応する必要があるならば、 cmath モジュールにある同じ名前の関数を使ってください。ほと
...定数 pi π = 3.141592... e e = 2.718281... tau τ = 2 π = 6.283185... inf 正の無限大 nan 非数 "Not a number" (NaN) 数論関数 math. comb ( n , k ) Return the number of ways to choose k items from n items without repetition and without order. Evaluates t...either of the arguments are not integers. Raises ValueError if either of the arguments are negative. Added 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 integer arguments. If any of the arguments is nonz... - https://man.mtool.work/python/3.14/library/math.html
- 浮動小数点オブジェクト 10950
- 浮動小数点オブジェクト type PyFloatObject この PyObject のサブタイプは Python の浮動小数点オブジェクトを表します。 PyTypeObject PyFloat_Type 次に属します: Stable ABI . この PyTypeObject のインスタンスは Python の浮動小数点型を表します。 Pyt
...uble 型の定数式に展開されるマクロです。 On most platforms, this is equivalent to the INFINITY macro from the C11 standard <math.h> header. Py_NAN 静かな非数 (qNaN) を表す double 型の定数式に展開されるマクロです。 ほとんどのプラットフォームでは、C11 標...準の <math.h> ヘッダの NAN マクロと同等です。 Py_HUGE_VAL INFINITY と同等です。 バージョン 3.14 で非推奨: The macro is soft deprecate...d . Py_MATH_E math.e 定数の定義です ( double 型の精度)。 Py_MATH_El e 定数の高精度 (long double) の定義です。 Py_MATH_PI math.pi 定数の... - https://man.mtool.work/python/3.14/c-api/float.html
- 数値と数学モジュール 9012
- 数値と数学モジュール この章で記述されているモジュールは、数値に関するあるいは数学関係の関数とデータ型を提供します。 numbers モジュールは、数値の型の抽象的な階層を定義します。 math と cmath モジュールは、浮動小数点数と複素数のための様々な数学
...記述されています: numbers --- 数の抽象基底クラス 数値塔 型を実装する人向けの注意事項 Adding more numeric ABCs 算術演算の実装 math --- 数学関数 数論関数 浮動小数点演算 浮動小数点数の操作関数 べき乗関数、指数関数、対数関数 総和と積の関数 角度変換 三角関数...双曲線関数 特殊関数 定数 cmath --- 複素数用の数学関数 極座標変換 指数関数と対数関数 三角関数 双曲線関数 類別関数 定数 decimal --- 10進固定小数点と浮動小数...分布の近似 ナイーブベイズ分類器 他のマニュアルの関連ページ PHP language.types.float PHP is_nan() PHP is_infinite() PHP book.math Linux JM seq(1) PHP ref.math... - https://man.mtool.work/python/3.14/library/numeric.html
- 15. 浮動小数点演算、その問題と制限 8572
- 15. 浮動小数点演算、その問題と制限 浮動小数点数は、コンピューターのハードウェア上では 2 進小数で表されます。 例えば、 10 進小数 の 0.625 は 6/10 + 2/100 + 5/1000 という値を持ち、同様に 2 進小数 の 0.101 は 1/2 + 0/4 + 1/8 という値を持ちます
...ませんが)。 よりよい出力のために、文字列フォーマットを利用して有効桁数を制限した10進数表現を得ることができます: >>> format ( math . pi , '.12g' ) # 有効数字 12 桁で表示 '3.14159265359' >>> format ( math . pi , '.2f' ) # 小数点以下 2 桁で表示 '3.14' >>>...repr ( math . pi ) '3.141592653589793' これが、実際のコンピューター上の値の 表示 を丸めているだけの、いわば錯覚だということを認識してお...) == round ( 0.3 , 1 ) False これらの数値を意図した正確な値にさらに近づけることはできませんが、誤差を含む値を比較するには math.isclose() 関数が役立ちます: >>> math . isclose ( 0.1 + 0.1 + 0.1 , 0.3 ) True あるいは、 round() 関数を粗い近似値比較に使う... - https://man.mtool.work/python/3.14/tutorial/floatingpoint.html
- fractions --- 有理数 8512
- fractions --- 有理数 ソースコード: Lib/fractions.py fractions モジュールは有理数の演算をサポートします。 Fraction インスタンスは、2 つの有理数、1 つの数値、または文字列から作成できます。 class fractions. Fraction ( numerator = 0 , denominat
...および decimal.Decimal インスタンスを受け付けるようになりました。 バージョン 3.9 で変更: numerator と denominator の正規化に math.gcd() 関数を使うようになりました。 math.gcd() は常に int 型を返します。 以前は最大公約数の型が numerator と denominator に...97932' ) . limit_denominator ( 1000 ) Fraction(355, 113) あるいは float で表された有理数を元に戻すのにも使えます: >>> from math import pi , cos >>> Fraction ( cos ( pi / 3 )) Fraction(4503599627370497, 9007199254740992) >>> Fraction ( cos ( pi / 3 ))...) >>> Fraction ( 1.1 ) . limit_denominator () Fraction(11, 10) __floor__ ( ) 最大の int <= self を返します。このメソッドは math.floor() 関数からでもアクセスできます: >>> from math import floor >>> floor ( Fraction ( 355 , 113 )) 3 __ceil__ ( ) 最小の... - https://man.mtool.work/python/3.14/library/fractions.html
- cmath --- 複素数用の数学関数 8391
- cmath --- 複素数用の数学関数 このモジュールは、複素数を扱う数学関数へのアクセスを提供しています。 このモジュール中の関数は整数、浮動小数点数または複素数を引数にとります。 また、 __complex__() または __float__() どちらかのメソッドを提供してい
...ら側かを区別します。 実軸の一部に沿った分枝切断では虚部の符号を使い、虚軸に沿った分枝切断では実部の符号を使います。 例えば cmath.sqrt() 関数は、負の実軸に沿った分枝切断を持ちます。 引数 -2-0j は分枝切断の 下側 にあるものとして扱うため、結果は負の虚軸上...になります。 >>> cmath . sqrt ( - 2 - 0 j ) -1.4142135623730951j 一方、引数 -2+0j は分枝切断の上側にあるものとして扱います。 >>> cmath . sqrt ( -...での角度を反時計回りにラジアンで測った値です。 次の関数はネイティブの直交座標を極座標に変換したりその逆を行うのに使えます。 cmath. phase ( z ) z の位相 ( 偏角 とも呼びます) を浮動小数点数で返します。 phase(z) は math.atan2(z.imag, z.real) と同じです。... - https://man.mtool.work/python/3.14/library/cmath.html
- 10. 標準ライブラリをひとめぐり 8012
- 10. 標準ライブラリをひとめぐり 10.1. オペレーティングシステムとのインターフェース os モジュールは、オペレーティングシステムと対話するための多くの関数を提供しています: >>> import os >>> os . getcwd () # Return the current working directory '
...やすくデバッグしやすい文字列メソッドの方がお勧めです: >>> 'tea for too' . replace ( 'too' , 'two' ) 'tea for two' 10.6. 数学 math モジュールは、浮動小数点演算のための C 言語ライブラリ関数にアクセスする手段を提供しています: >>> import math >>> math . co...s ( math . pi / 4 ) 0.70710678118654757 >>> math . log ( 1024 , 2 ) 10.0 random モジュールは、乱数に基づいた要素選択のためのツールを... - https://man.mtool.work/python/3.14/tutorial/stdlib.html
- What's New In Python 3.8 7876
- What's New In Python 3.8 編集者 : Raymond Hettinger この記事では Python 3.7 と比較した Python 3.8 の新機能を解説します。 Python 3.8 は 2019 年 10 月 14 日にリリースされました。 詳しくは 変更履歴 を参照してください。 概要 -- リリースハイライ
...とが難しくなっていました。 (Raymond Hettinger による提案、Donghee Na による実装、Vinay Sajip によるレビュー、 bpo-33897 。) math 二点間のユークリッド距離を計算する math.dist() 関数が追加されました。(Raymond Hettinger の貢献による bpo-33089 ) math.hypo...献による bpo-33089 ) sum() に類似する関数として、初期値(デフォルトは1) に対してイテレート可能なオブジェクトの数を掛けていく math.prod() 関数が追加されました: >>> prior = 0.8 >>> likelihoods = [ 0.625 , 0.84 , 0.30 ] >>> math . prod ( likelihoods , sta...rt = prior ) 0.126 (Pablo Galindo の貢献による bpo-35606 ) 2つの組み合わせの関数 math.perm() と math.comb() が追加されました: >>> math . perm ( 10 , 3 ) # 10 個から 3 個を取る順列 720 >>> math . comb ( 10 , 3... - https://man.mtool.work/python/3.14/whatsnew/3.8.html
- numbers --- 数の抽象基底クラス 7755
- numbers --- 数の抽象基底クラス ソースコード: Lib/numbers.py numbers モジュール ( PEP 3141 ) は、下位になるほど多くの演算を定義する、数値の 抽象基底クラス の階層を定義しています。 このモジュールで定義する型は、どれもインスタンス化を目的とした
...te() == (1-3j) です。 class numbers. Real Real は Complex に実数の演算を追加します。 簡潔に言うとそれらは: float への変換, math.trunc() , round() , math.floor() , math.ceil() , divmod() , // , % , < , <= , > および >= です。 Real はまた complex() , r... - https://man.mtool.work/python/3.14/library/numbers.html
- What's New In Python 3.11 7755
- What's New In Python 3.11 編集者 : Pablo Galindo Salgado この記事では Python 3.10 と比較した Python 3.11 の新機能を解説します。Python 3.11 は2022年10月24日にリリースされました。全詳細については 変更履歴 をご覧ください。 概要 -- リリースハイ
...時と、イベントを送出する際に有効なソケットがない場合に、自動的に呼び出されます。 (Kirill Pinchuk による gh-88457 での貢献。) math 2 の x 乗を返す math.exp2() が追加されました。 (Gideon Mitchell による bpo-45917 での貢献。) x の立方根を返す math.cbrt()...が追加されました。 (Ajith Ramachandran による bpo-44357 での貢献。) IEEE 754 の仕様と整合させるため、 math.pow() の特殊な 2 つのケースの動作が変わりました。 math.pow(0.0, -math.inf) と math.pow(-0.0, -math.inf) は、 inf を返すよう...になりました。 以前は ValueError を送出していました。 (Mark Dickinson による bpo-44339 での貢献。) math.nan の値が常に利用できるようになりました。 (Victor Stinner による bpo-46917 での貢献。) operator operator.call(obj, *args,... - https://man.mtool.work/python/3.14/whatsnew/3.11.html