How to evaluate limit of a function