why is it important to take the absolute value to calc if x is an integer? why can't we just write x-round(x)>0 instead of abs(x)-round(abs(x)) >0?
The number you are testing could be a negative number(remember absolute value of any number makes it positive). Here we do not care whether the number is positive or negative because we are only interested in whether the number is an int.
So we turn the number to a positive number and we perform our test
Hope this helps