How to calculate the square root of a number in Ruby?