Next: , Previous: , Up: Mathematical Functions   [Index]


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.