Ruby for calculating Power
Correction PowerRuby