Skip to content

Commit

Permalink
Merge pull request #2249 from mbaz/patch-1
Browse files Browse the repository at this point in the history
Documentation for isprime(), isodd(), iseven()
  • Loading branch information
ViralBShah committed Feb 10, 2013
2 parents 770c575 + e1963b9 commit 7d8b365
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------------
Expand Down

0 comments on commit 7d8b365

Please sign in to comment.