yarv-dev-en:301
From: SASADA Koichi <ko1 atdot.net>
Date: Sat, 19 May 2007 23:18:27 +0900
Subject: [yarv-dev-en:301] Re: YARV
Hi, # ./miniruby -v ruby 1.9.0 (2007-05-17 patchlevel 0) [i686-linux] # make run ./miniruby -I../trunk/lib ../trunk/test.rb 2007-05-18 05:40:09 +0900 280.953529456894 Regards, Koichi vikas vaid wrote: > Hi, > > try this code.. > require "mathn" > puts getTime=Time.now > # normal standard deviation test" > def variance(population) > n = 0 > mean = 0.0 > s = 0.0 > > > population.each { |x| > n = n + 1 > delta = x.to_f - mean.to_f > mean = mean.to_f + (delta.to_f / n).to_f > s = s + delta.to_f * (x.to_f - mean.to_f).to_f > } > > > # if you want to calculate std deviation > # of a sample change this to "s / (n-1)" > > return (s / (n-1)).to_f > end > > chk_Arr=[632,567,936,109,180,23,369,284,40,36,233,280,752,293,84] > > puts Math.sqrt(variance(chk_Arr)) > > > Superclass mismatch for class rational... > > error i get is .. > > Superclass mismatch for class rational... > > any idea.... > > Thanks > SASADA Koichi wrote: >> Hi, >> >> On my environment: >> >> # ./ruby -v >> ruby 1.9.0 (2007-05-17 patchlevel 0) [i686-linux] >> # make runruby >> ./miniruby ../trunk/runruby.rb --extout=.ext -- ../trunk/test.rb >> hello world >> >> Any other hint? > > -- // SASADA Koichi at atdot dot net -- ML: yarv-dev-en quickml.atdot.net Info: http://www.atdot.net/~ko1/quickml
@ 296 2007-05-12 01:13 [vaid.vikas gmail.com] YARV 298 2007-05-18 13:27 ┗[ko1 atdot.net ] 300 2007-05-19 03:58 ┗[ruby-forum-incoming ] -> 301 2007-05-19 23:18 ┗[ko1 atdot.net ] 305 2007-06-07 06:05 ┗[ruby-forum-incoming ] 306 2007-06-07 08:32 ┗[ko1 atdot.net ] 307 2007-06-07 12:19 ┗[ruby-forum-incoming ]