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:
Cedar Grove Maker Studios 2022-02-14 16:26:51 -08:00 committed by GitHub
parent 75b919036c
commit 6424dcbdcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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__: