Python math.e 定数

Python math 模块Python math モジュール

Python math.e定数はオイラー数 (2.7182...) を返すために使用されます。

構文

math.e 定数の構文は次のとおりです:

math.e

戻り値

数学定数を表す浮動小数点数 2.718281828459045 を返します。e。

例

次の例はオイラー数 (2.7182...) を返します:

例

# math パッケージをインポート
import math

# e の値を出力
print (math.e)

出力結果:

2.718281828459045

Python math 模块Python math モジュール

その他の拡張