Problem with inf

Please supply a minimal code example that reproduces your error, following the guidelines in:

When you share the code, please use 3x` encapsulation to ensure proper formatting.