At 2009-07-21 08:41AM, "phBl" wrote:
>  I'm working on a lot of math in my projects so I thought I would convert
>  over a few methods I used in other languages that I created and port
>  them to ruby.
>  
>  Here's a mean method which allows you to return either:
>  
>  a) arithmetic mean
>  b) geometric mean
>  c) harmonic mean
>  
>  http://pastie.org/553287

You might enjoy perusing code examples at
    http://rosettacode.org/wiki/Category:Mathematical_operations
to compare with what you currently have.

-- 
Glenn Jackman
    Write a wise saying and your name will live forever. -- Anonymous