Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added usage statements for C<chr>, C<expmod>, and C<is-prime>
  • Loading branch information
dha committed Oct 3, 2015
1 parent 2dd4903 commit 3bed9cc
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lib/Type/Int.pod
Expand Up @@ -23,24 +23,46 @@ separators, but don't carry any meaning:
=head2 routine chr
Defined as:
multi sub chr(Int:D ) returns Str:D
multi method chr(Int:D:) returns Str:D
Usage:
chr INTEGER
INTEGER.chr
Returns a one-character string, by interpreting the integer as a Unicode
codepoint number and converting it the corresponding character.
=head2 routine expmod
Defined as:
multi sub expmod (Int:D: Int $y, Int $mod) returns Int:D
multi method expmod (Int:D: Int $y, Int $mod) returns Int:D
Usage:
expmod(INTEGER, POWER, MODULUS)
INTEGER.expmod(POWER, MODULUS)
Returns the given C<Int> raised to the C<$y> power within modulus C<$mod>.
=head2 routine is-prime
Defined as:
multi sub is-prime (Int:D $number, Int $tries = 100) returns Bool:D
multi method is-prime (Int:D: Int $tries = 100) returns Bool:D
Usage:
is-prime INTEGER
INTEGER.is-prime
INTEGER.is-prime
Returns C<True> if this C<Int> is known to be a prime, or is likely to be a
prime based on a probabilistic Miller-Rabin test. C<$tries> is the maximal
number of iterations the test is allowed to do.
Expand Down

0 comments on commit 3bed9cc

Please sign in to comment.