each_prime

each_prime(ubound) Class Public methods Iterates the given block over all prime numbers. See Prime#each for more details.

from_prime_division

from_prime_division(pd) Class Public methods Re-composes a prime factorization and returns the product. See Prime#int_from_prime_division for more details.

ceil

int.ceil â integer Instance Public methods As int is already an Integer, all these methods simply return the receiver.

chr

int.chr([encoding]) â string Instance Public methods Returns a string containing the character represented by the receiver's value according to encoding. 65.chr #=> "A" 230.chr #=> "\346" 255.chr(Encoding::UTF_8) #=> "\303\277"

denominator

int.denominator â 1 Instance Public methods Returns 1.

downto

int.downto(limit) {|i| block } â selfint.downto(limit) â an_enumerator Instance Public methods Iterates block, passing decreasing values from int down to and including limit. If no block is given, an enumerator is returned instead. 5.downto(1) { |n| print n, ".. " } print " Liftoff!\n" produces: 5.. 4.. 3.. 2.. 1.. Liftoff!

each

each() Instance Public methods Alias for: times

even?

int.even? â true or false Instance Public methods Returns true if int is an even number.

floor

int.floor â integer Instance Public methods As int is already an Integer, all these methods simply return the receiver.

gcd

int.gcd(int2) â integer Instance Public methods Returns the greatest common divisor (always positive). 0.gcd(x) and x.gcd(0) return abs(x). 2.gcd(2) #=> 2 3.gcd(-7) #=> 1 ((1<<31)-1).gcd((1<<61)-1) #=> 1