Test integerness: Difference between revisions
Added Quackery.
(Updated to work with Nim 1.4: added parentheses around negative floats. Changed "is_integer" to "isInteger" to follow Nim guidelines. Done miscellaneous minor changes.) |
(Added Quackery.) |
||
Line 1,972:
False
</lang>
=={{header|Quackery}}==
Quackery uses bignums ("numbers" in the Quackery nomenclature) and comes with a bignum rational ("vulgars") arithmetic library. Quackery does not differentiate between two numbers on the stack and one vulgar. <code>v-is-num</code> returns true (1) if the top two numbers on the stack can be interpreted as a vulgar with no fractional component, and false (0) otherwise.
<lang Quackery> [ mod not ] is v-is-num ( n/d --> b )</lang>
=={{header|Racket}}==
|