2023-06-24 Python - math.log(x[, base]):対数 Python3 mathモジュール 概要 インポート 実行結果 表示イメージ 概要log(x[, base]) base:省略時は自然対数(底e)になる 対数 mathモジュール インポート import math 実行結果 import math print(math.log(2)) print(math.log(2,3)) 表示イメージ 0.6931471805599453 0.6309297535714574