Class Bignum
In: rational.rb
mathn.rb
Parent: Object

Methods

**   /   quo   rdiv   rpower  

External Aliases

** -> power!

Public Instance methods

**(other)

Alias for rpower

/(other)

Alias for quo

If Rational is defined, returns a Rational number instead of a Bignum.

[Source]

     # File rational.rb, line 535
535:   def quo(other)
536:     Rational.new!(self,1) / other
537:   end
rdiv(other)

Alias for quo

Returns a Rational number if the result is in fact rational (i.e. other < 0).

[Source]

     # File rational.rb, line 541
541:   def rpower (other)
542:     if other >= 0
543:       self.power!(other)
544:     else
545:       Rational.new!(self, 1)**other
546:     end
547:   end

Search

Google

Ruby API Docs

Links