Skip to content

mpf arithmetics with inf or nan are inconsistent with python float #516

Description

@sylee957
>>> float(1) ** float('inf')
1.0
>>> mpf(1) ** mpf('inf')
mpf('nan')

>>> float('nan') ** float(0)
1.0
>>> mpf('nan') ** mpf(0)
mpf('nan')

These questions have arised from
sympy/sympy#18500
sympy/sympy#18470
But the inconsistency of mpmath and python arithmetic itself is making the thoughts complicated.
Is it intended or is it a bug of mpmath?

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