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 Fixnum.

[Source]

     # File rational.rb, line 508
508:   def quo(other)
509:     Rational.new!(self,1) / other
510:   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 514
514:   def rpower (other)
515:     if other >= 0
516:       self.power!(other)
517:     else
518:       Rational.new!(self,1)**other
519:     end
520:   end

Search

Google

Ruby API Docs

Links