From: Brian Candler Date: 2007-03-30T06:00:53+09:00 Subject: Re: Ruby math.pow equivalent On Fri, Mar 30, 2007 at 05:43:38AM +0900, John Butler wrote: > I am trying to calculate a monthly payment for a loan in Ruby. Does > anyone know what the equivalent for math.pow in Java is for Ruby? > > @monthlypayment = @principal*@rate/(1-Math.pow(1/(1+@rate),@payments)) > > Ive searched everywhere and cant seem to find anything. http://www.rubycentral.com/book/ref_c_float.html#Float.Arithmeticoperations Look for 'exponentiation'