From: Sander Land Date: 2006-08-02T19:38:10+09:00 Subject: Re: Scientific calculation: get Std.Dev for a integer array On 8/2/06, Wang Austin-W22255 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