0

Hi everybody.

Could someone explain me the usage of python's modulo operator and/or the fmod function?

why do i get these results?

>>> 23%0.1

0.099999999999998729

>>> import math

>>> math.fmod(23,0.1)

0.099999999999998729

>>>

normally 23 mod 0.1 = 0 because 23 / 0.1 = 230 exactly

is there anything wrong there or did i miss something???

Thanks in advance...