浮動小数点の演算
pythonone = float(1)
eps = float(1)
while one + eps != one:
eps /= 2
print(
(one + eps) + eps == one + (eps + eps)
)
False
になる
one = float(1)
eps = float(1)
while one + eps != one:
eps /= 2
print(
(one + eps) + eps == one + (eps + eps)
)
False
になる