Previous Up Next

7.1.11  Testing evenness

The even command tests an integer to see if it is even. (A Gaussian integer a+ib is even exactly when a and b are both even and odd otherwise.)

Examples

even(148)
     
1           
even(149)
     
0           
even(2+4*i)
     
1           

Previous Up Next