Well, that particular case won't unless the tolerance (ε) is very large, as int(0.999) is 0. ;-) More generally, it is, of course, possible, although when it happens will be dependent on the details of the C compiler and compiler options used to build a particular installation of Perl. Alas, this means that it's possible that different Perl installations on a given platform, e.g., ActiveState and Strawberry Perl on Windows, could yield different results.
Given your last statement, "false positives would not have any adverse impact if they only result into action that ensures that $x does not contain a decimal component." you may want to tell us why you're interested in this test, at all. It may be superfluous.
In reply to Re^3: How to determine whether a number has a decimal component?
by swampyankee
in thread How to determine whether a number has a decimal component?
by Xenofur
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |