The math.modf()
function is used to split a real number into its fractional and integer components.
math.modf(x)
copy
Where, parameter x
is the number to split.
The function returns a tuple containing the fractional and the integer parts of x
.