What is the *correct* implementation of constraints?

assumption

verification

The 'Int' constraints should pass the following test case.But, the implementation that following test case is pass, is impossible in perl5.

use Test::More;

ok  is_int(1e100);
ok  is_int("1e100");
ok !is_int(1e100+0.1);

sub is_int {
    ...
}

*My* answer

1e100 is NV.NV is floating point number.floating point number is not integer.NV should not pass the 'Int' constraint.

Published: 2010-03-01(Mon) 16:37