Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpc precision inconsistency #179

vinklein opened this issue Jan 24, 2018 · 2 comments


None yet
2 participants
Copy link

commented Jan 24, 2018

The precision of .real and .imag attributes looks to be inconsistent with their mpc's precision

>>> from gmpy2 import *
>>> x = mpc('56+78j', precision=70)
>>> x.precision
(70, 70)
>>> x.real.precision
>>> x.imag.precision

Is this intended or is it a bug ?


This comment has been minimized.

Copy link

commented Jan 25, 2018

It's a bug. I'll work on a fix tomorrow.

vinklein added a commit to vinklein/gmpy that referenced this issue Jan 25, 2018

gmpy2_mpc_misc.c : Fix issue aleaxit#179
- .real and .imag now return the same precision as their mpc

- add doctests for these cases.

This comment has been minimized.

Copy link
Contributor Author

commented Jan 25, 2018

Fixed with #181

casevh added a commit that referenced this issue Jan 25, 2018

Merge pull request #181 from vinklein/fix_issue_179
Fix for mpc precision inconsistency issue #179

@vinklein vinklein closed this Jan 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.