2023-06-22 Python - math.fsum(iterable):浮動小数の総和 mathモジュール Python3 概要 インポート 実行結果 表示イメージ 概要fsum(iterable) iterable内の値の正確な総和をfloat返す。 mathモジュール インポート import math 実行結果 import math math.fsum(0.2 for x in range(5)) 表示イメージ 1.0