From e1963b9d258b54cd3f026c797f6634863d07ca32 Mon Sep 17 00:00:00 2001 From: mbaz Date: Sat, 9 Feb 2013 20:44:18 -0500 Subject: [PATCH] Documentation for isprime(), isodd(), iseven() --- doc/stdlib/base.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/stdlib/base.rst b/doc/stdlib/base.rst index 5e64d226c9e2f..d997e49fc0aed 100644 --- a/doc/stdlib/base.rst +++ b/doc/stdlib/base.rst @@ -1490,6 +1490,23 @@ Integers **Example**: ``trailing_ones(3) -> 2`` +.. function:: isprime(x::Integer) -> Bool + + Returns ``true`` if ``x`` is prime, and ``false`` otherwise. + + **Example**: ``isprime(3) -> true`` + +.. function: isodd(x::Integer) -> Bool + + Returns ``true`` if ``x`` is odd (that is, not divisible by 2), and ``false`` otherwise. + + **Example**: ``isodd(9) -> false`` + +.. function: iseven(x::Integer) -> Bool + + Returns ``true`` is ``x`` is even (that is, divisible by 2), and ``false`` otherwise. + + **Example**: ``iseven(1) -> false`` Random Numbers --------------