floating point numbers always have a degree of imprecision. A floating point value will never be equal to a whole number. You should check to see if it is within an acceptable epsilon from a whole number (or fractional value, if such a situation were to arise).
(loanYears <= floor(loanYears) + epsilon)
Reputation Points: 683
Solved Threads: 53
Posting Virtuoso
Offline 1,580 posts
since May 2006