On 2002-05-08 12:26, IML wrote:
According to Bill Gates zero is even.
=iseven(0)
And if that's the way bill wants it, I guess that's the way it is!
Check also
=ISEVEN(-4)
I believe ISEVEN does not allow one to conclude that 0 should be or is a positive integer/number.
Postscript: The loveliest of all programming languages (my bias) LISP has the following predicates:
zerop number
"This predicate is true if number is zero (either the integer zero, a floating-point zero, or a complex zero), and is false otherwise. regardless of whether an implemetation provides distinct representations for positive and negative floating-point zeros,
(zerop -0.0) is always true. it is an error if the argument number is not a number."
plusp number
"This predicate is true if number is strictly greater than zero, and is false otherwise. It is an error if the argument number is not a non-complex number."
minusp number
"This predicate is true if number is strictly less than zero, and is false otherwise. Regardless of whether an implementation provides distinct representations for positive and negative floating-point zeros,
(minusp -0.0) is always false. (the function float-sign may be used to distinguish a negative zero.) It is an error if the argument number is not a non-complex number." [ Steele, G. (1984). Common Lisp: The language, pp. 195-196. ]
Aladin
This message was edited by Aladin Akyurek on 2002-05-08 13:12
This message was edited by Aladin Akyurek on 2002-05-08 13:15