On 8/2/06, Wang Austin-W22255 <xuwang / motorola.com> wrote: > Hi Ruby Gurus, > > Could you please point me how to do some scientific calculation in Ruby: > > 1) How to calculate std.dev for an integer array? > 2) Is there a log() function in Ruby? > > Thank you! > Austin 1) I don't think there's a builtin function for that, so you'll have to create your own. You'll probably want to add it to the Array class. class Array def stddev # your function here end end You could also check rubyforge.org, maybe there's a statistics library available there. 2) Math.log