ISODD returns TRUE for members (N) of a numeric array, which
- are within the range of ±bitmax
- are integers such that N == fix(N)
- are integers not evenly divisible by 2
Unlike the typical computational approach using REM/MOD,
ISODD produces a not-valid flag for numbers, which are
1) not an integer
2) larger than the maximum possible double precision
integer representation (±bitmax)
and does never return their parity as being odd
REM/MOD, on the other hand, do not complain if an input
is not a valid candidate for being even or odd at all
and, therefore, are NOT reliable parity checkers
see
> help isodd
for usage and a brief example for this small utility |