Raise error indicating what is cauing computation to fail

This is the computation that fails
def t_r(r,size)
  r * Math::sqrt(((size)-2).to_f / (1 - r**2))
end