Class
BigDecimal extends the native Integer class to provide the to_d method.
When you require the BigDecimal library in your application, this methodwill be available on Integer objects.
Add double dispatch to Integer
This class is the basis for the two concrete classes that hold whole numbers, Bignum and Fixnum.
Class Methods
2.3
View on GitHub
# File tmp/rubies/ruby-2.3.8/lib/prime.rb, line 48
def Integer.each_prime(ubound, &block) # :yields: prime
Prime.each(ubound, &block)
end
Iterates the given block over all prime numbers.
See Prime#each for more details.
2.3
View on GitHub
# File tmp/rubies/ruby-2.3.8/lib/prime.rb, line 22
def Integer.from_prime_division(pd)
Prime.int_from_prime_division(pd)
end
Re-composes a prime factorization and returns the product.
See Prime#int_from_prime_division for more details.
Instance Methods