Skip to content

bernpoly behaviour at infinity with 0 imaginary component #471

Description

@cbm755

Good:

>>> inf = float('inf')
>>> mpmath.bernpoly(3, inf)                                                        
mpf('+inf')

>>> mpmath.bernpoly(4, inf)                                                        
mpf('+inf')

Now how about complex with 0 imag part? This seems ok:

>>> bernpoly(4, complex(inf, 0))
mpc(real='+inf', imag='0.0')
```
But:
```
>>> bernpoly(3, complex(inf, 0))
mpc(real='nan', imag='nan')

This isn't wrong per se if you think of complex(..., 0) as a very small negative part.

Do we care? Correct behaviour at real infinity is very nice property but maybe exactly what happens for complex(..., 0) is less important?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions