Testing for Odd and Even Numbers - GNU Scientific Library -- Reference Manual
Description: GNU Scientific Library -- Reference Manual

Next: Maximum and Minimum functions, Previous: Testing the Sign of Numbers, Up: Mathematical Functions

### 4.6 Testing for Odd and Even Numbers

— Macro: GSL_IS_ODD (n)

> This macro evaluates to 1 if n is odd and 0 if n is even. The argument n must be of integer type.

— Macro: GSL_IS_EVEN (n)

> This macro is the opposite of `GSL_IS_ODD(n)`. It evaluates to 1 if n is even and 0 if n is odd. The argument n must be of integer type.

The GNU Scientific Library - a free numerical library licensed under the GNU GPL
Back to the GNU Scientific Library Homepage