@@ -1016,16 +1016,17 @@ def pos(x, context=None):
10161016 temporary increase in precision, back to the current context. For
10171017 example::
10181018
1019- >>> from bigfloat import precision
1020- >>> pow(3, 20 ) + 1.234 - pow(3, 20 ) # inaccurate due to precision loss
1021- BigFloat.exact('1.2340002059936523 ', precision=53 )
1022- >>> with precision(100 ): # compute result with extra precision
1023- ... x = pow(3, 20 ) + 1.234 - pow(3, 20 )
1019+ >>> from bigfloat import pos, pow, precision
1020+ >>> pow(3, 60 ) + 1.234 - pow(3, 60 ) # inaccurate due to precision loss
1021+ BigFloat.exact('1.23400115966796875000000000000000000 ', precision=113 )
1022+ >>> with precision(200 ): # compute result with extra precision
1023+ ... x = pow(3, 60 ) + 1.234 - pow(3, 60 )
10241024 ...
10251025 >>> x
1026- BigFloat.exact('1.2339999999999999857891452847980 ', precision=100 )
1026+ BigFloat.exact('1.2339999999999999857891452847979962825775146484375000000000000 ', precision=200 )
10271027 >>> pos(x) # round back to original precision
1028- BigFloat.exact('1.2340000000000000', precision=53)
1028+ BigFloat.exact('1.23399999999999998578914528479799628', precision=113)
1029+
10291030
10301031 """
10311032 return _apply_function_in_current_context (
@@ -1770,23 +1771,23 @@ def atan2(y, x, context=None):
17701771 >>> inf = BigFloat('inf')
17711772
17721773 >>> print(atan2(+0.0, -0.0)) # pi
1773- 3.1415926535897931
1774+ 3.14159265358979323846264338327950280
17741775 >>> print(atan2(+0.0, +0.0)) # 0
17751776 0
17761777 >>> print(atan2(+0.0, negative)) # pi
1777- 3.1415926535897931
1778+ 3.14159265358979323846264338327950280
17781779 >>> print(atan2(+0.0, positive)) # 0
17791780 0
17801781 >>> print(atan2(positive, 0.0)) # pi / 2
1781- 1.5707963267948966
1782+ 1.57079632679489661923132169163975140
17821783 >>> print(atan2(inf, -inf)) # 3*pi / 4
1783- 2.3561944901923448
1784+ 2.35619449019234492884698253745962710
17841785 >>> print(atan2(inf, inf)) # pi / 4
1785- 0.78539816339744828
1786+ 0.785398163397448309615660845819875699
17861787 >>> print(atan2(inf, finite)) # pi / 2
1787- 1.5707963267948966
1788+ 1.57079632679489661923132169163975140
17881789 >>> print(atan2(positive, -inf)) # pi
1789- 3.1415926535897931
1790+ 3.14159265358979323846264338327950280
17901791 >>> print(atan2(positive, +inf)) # 0
17911792 0
17921793
@@ -2333,8 +2334,8 @@ def ceil(x, context=None):
23332334 the current context. Note that the rounding step means that it's possible
23342335 for the result to be smaller than ``x``. For example::
23352336
2336- >>> x = 2**100 + 1
2337- >>> ceil(2**100 + 1) >= x
2337+ >>> x = 2**1000 + 1
2338+ >>> ceil(2**1000 + 1) >= x
23382339 False
23392340
23402341 One way to be sure of getting a result that's greater than or equal to
0 commit comments