-
Notifications
You must be signed in to change notification settings - Fork 205
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Milestone
Description
As in the title.
Reproducer (mpmath version 1.4.0a1.dev43+g0d287bf):
>>> mpmath.mp.sqrt(mpmath.mp.mpc(mpmath.mp.inf, mpmath.mp.inf)) # expected (+∞,+∞)
mpc(real='+inf', imag='nan')
>>> mpmath.mp.sqrt(mpmath.mp.mpc(-mpmath.mp.inf, mpmath.mp.inf)) # expected (+∞,+∞)
mpc(real='nan', imag='+inf')
>>> mpmath.mp.sqrt(mpmath.mp.mpc(mpmath.mp.inf, -mpmath.mp.inf)) # expected (+∞,-∞)
mpc(real='+inf', imag='nan')
>>> mpmath.mp.sqrt(mpmath.mp.mpc(-mpmath.mp.inf, -mpmath.mp.inf)) # expected (+∞,-∞)
mpc(real='nan', imag='-inf')mpmath.fp gives expected results as defined by https://en.cppreference.com/w/cpp/numeric/complex/sqrt.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior