Hmmm ... this doesn't look quite right ...

If this is actually a percent difference isn't that  ( (now -prev)/ ( (now.to_f + prev.to_f ) / 2) ) * 100?
If this is percent change it should be (now - prev) / (prev.to_f) * 100

unless there's another reason that you're dividing by "now" wouldn't it make sense to be dividing by "prev"?