address requested changes
3/2 pi rad is equal to -pi/2 rad other changes were caused by file editing issues. sorry about that.
This commit is contained in:
parent
75b919036c
commit
6424dcbdcf
1 changed files with 2 additions and 2 deletions
|
|
@ -225,14 +225,14 @@ def acos(x, context=None):
|
||||||
with localcontext(context) as ctx:
|
with localcontext(context) as ctx:
|
||||||
ctx.prec += 2
|
ctx.prec += 2
|
||||||
if x == 1:
|
if x == 1:
|
||||||
r = Decimal(0). # 0 radians
|
r = Decimal(0) # 0 radians
|
||||||
elif x == -1:
|
elif x == -1:
|
||||||
r = Decimal(1).atan() * 4 # pi radians
|
r = Decimal(1).atan() * 4 # pi radians
|
||||||
else:
|
else:
|
||||||
r = atan((1 - x * x).sqrt() / x)
|
r = atan((1 - x * x).sqrt() / x)
|
||||||
if r < 0:
|
if r < 0:
|
||||||
r += 4 * atan(1)
|
r += 4 * atan(1)
|
||||||
return r / 1
|
return r / 1
|
||||||
|
|
||||||
|
|
||||||
for name in __all__:
|
for name in __all__:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue