Python fmod function

Python fmod(x,y) function returns x % y. It's a method of math module.

>>> import math
>>> math.fmod(3,2)
1.0
>>> math.fmod(-3,2)
-1.0
>>> math.fmod(-3.2,2)
-1.2
>>> math.fmod(3.2,2)
1.2
















endmemo.com © 2024  | Terms of Use | Privacy | Home