sympy/sympy — pull request #1709 by prasoon2211 (2013-01-09 19:32:11+00:00)
Title: Issue 3587: Modified Rational.__mod__ by adding a extra test to determine whether self.evalf() is a Float.

The issue was that expressions such as:
`(pi*0) % float(1)`
were resulting in errors because it `S.Zero.evalf() == S.Zero` and the above resulted in expression like `S.Zero % 1.0`

So, I modified Rational.__mod__ as suggested here:
http://code.google.com/p/sympy/issues/detail?id=3587&q=label%3AEasyToFix&sort=-id&colspec=ID%20Type%20Status%20Priority%20Milestone%20Reporter%20Summary%20Stars#makechanges

The modified code adds an extra check to determine whether `self.evalf()` is a `Float` or not.
I checked using pdb that:
`>>> self is S.Zero`
`>>> True`
So, for such a case, we are just returning self.evalf() == S.Zero since `0 % n == 0`.
Also, the case where `n == 0` is already taken care of by `Sympy` itself.