you are not mistaken. abs will convert the return value to integer and should issue a compiler warning if warning levels are high enough which would catch this type of error.