mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
34 lines
639 B
Plaintext
34 lines
639 B
Plaintext
NAME
|
|
isodd - whether a value is an odd integer
|
|
|
|
SYNOPSIS
|
|
isodd(x)
|
|
|
|
TYPES
|
|
x any, &any
|
|
|
|
return int
|
|
|
|
DESCRIPTION
|
|
Determine if x is an odd integer. This function will return 1 if x is
|
|
odd integer, 0 otherwise.
|
|
|
|
EXAMPLE
|
|
> print isodd(2.0), isodd(1), isodd("1")
|
|
0 1 0
|
|
|
|
> print isodd(2i), isodd(1e20+1), isodd(1/3)
|
|
0 1 0
|
|
|
|
LIMITS
|
|
none
|
|
|
|
LIBRARY
|
|
none
|
|
|
|
SEE ALSO
|
|
isassoc, isatty, isblk, isconfig, isdefined, iserror, iseven, isfile,
|
|
ishash, isident, isint, islist, ismat, ismult, isnull, isnum, isobj,
|
|
isobjtype, isprime, isrand, israndom, isreal, isrel,
|
|
issimple, issq, isstr, istype
|