mpmath version: 1.1.0
The fmod functions in the mp and fp contexts do not agree on how to handle a positive infinity in the second argument. The former returns NaN while the latter returns the first argument. While arguments could be made in favor of either behavior, I think it's safe to say they should not behave differently from one another.
Example:
Python 3.6.8 (default, Aug 20 2019, 17:12:48)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mpmath import *
>>> import numpy as np
>>> mp.fmod(2.53, np.inf)
mpf('nan')
>>> fp.fmod(2.53, np.inf)
2.53
mpmath version: 1.1.0
The fmod functions in the mp and fp contexts do not agree on how to handle a positive infinity in the second argument. The former returns NaN while the latter returns the first argument. While arguments could be made in favor of either behavior, I think it's safe to say they should not behave differently from one another.
Example: