Welcome to PF, salil87!
Infinite and undefined are different things.
For a function, infinite usually implies undefined.
But undefined does not have to be infinite.
For instance, the function log(x) is negative infinity at zero and as such undefined at zero.
But for negative values of x, log(x) is simply undefined (but not infinite).