Test integerness

From Rosetta Code
Revision as of 11:06, 18 June 2014 by Grondilu (talk | contribs)
Test integerness is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

Given a real numeric value, test whether or not it is an integer.

J

<lang J>= <.</lang>

Perl 6

<lang perl6>say pi.narrow ~~ Int; say 1e5.narrow ~~ Int;</lang>

Output:
False
True