ruby-win32/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel/stats.rb
# Calculates the standard deviation of the data so far.
Calculates the standard deviation of the data so far.
Calculates the standard deviation of the data so far .
def sd
      begin
        return Math.sqrt( (@sumsq - ( @sum * @sum / @n)) / (@n-1) )
      rescue Errno::EDOM
        return 0.0
      end
    end
def sd begin return Math . sqrt ( ( @sumsq - ( @sum * @sum / @n ) ) / ( @n - 1 ) ) rescue Errno :: EDOM return 0.0 end end
Calculates the standard deviation of the data so far.
Calculates the standard deviation of the data so far .
# (sqrt( ((s).sumsq - ( (s).sum * (s).sum / (s).n)) / ((s).n-1) ))