数学関数
公式サイト:
math – 数学関数 | Python 3.x ドキュメント [公式]
使い方
参考:
Python の math モジュールを使ってみる | ネットワークエンジニアを目指して
指数/対数
math.e
:自然対数の底 (定数)math.exp
:指数関数math.log
:対数を計算するmath.log10
:常用対数を計算する
参考:
exp / log / log10 / log2 – 指数関数/対数関数を計算 | note.nkmk.me
math.e | Python 3.x ドキュメント [公式]
math.exp | Python 3.x ドキュメント [公式]
math.log | Python 3.x ドキュメント [公式]
math.log10 | Python 3.x ドキュメント [公式]
math.exp() Method | W3Swchools
math.log() Method | W3Swchools
math.log10() Method | W3Swchools
角度の変換
- math.degrees:ラジアンから度に変換する
- math.radians:度からラジアンに変換する
参考:
ラジアンと度数法単位の相互変換 | Python 数値計算入門
三角波
参考: