Issue 3587 : evalf() called once only. Removed extra elif cluase.
             Added test case.