Closed GoogleCodeExporter closed 9 years ago
I assume you are using the beta release.
gmpy2.context() returns a new context based on the built-in defaults. It
doesn't modify the existing context.
If you want to set the context to the default context plus precision set to
100, use the following:
gmpy2.set_context(gmpy2.context(precision=100))
gmpy2.get_context() returns a reference to the existing active context. To
change the precision of the active context to 100 and leave everything else "as
is", use:
gmpy2.get_context().precision=100
I tried to follow the use of contexts in the decimal library but I agree it can
get confusing.
casevh
Original comment by casevh
on 15 Apr 2012 at 2:29
thanks for your reply.
I am clear now.
2012/4/15, gmpy@googlecode.com <gmpy@googlecode.com>:
Original comment by 1989l...@gmail.com
on 17 Apr 2012 at 3:51
Thank you for the feedback. I'll clarify this issue in the documentation.
Original comment by casevh
on 18 Apr 2012 at 5:05
Original issue reported on code.google.com by
1989l...@gmail.com
on 15 Apr 2012 at 9:30