in reply to Re: How to determine whether a number has a decimal component?
in thread How to determine whether a number has a decimal component?
Comparing $number with int($number) for equalness might fail due to rounding issues.
Not true in the narrow context of the equality test. If you have already rounded $number to a suitable precision then the equality test will always be correct. When they can be represented at all, integers are stored and manipulated precisely.
|
|---|