Skip to content

Commit c98ad66

Browse files
committed
fix for pylint
1 parent 4f5be4b commit c98ad66

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

jepler_udecimal/utrig.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,10 @@ def asin(x, context=None):
198198

199199
with localcontext(context) as ctx:
200200
ctx.prec += 2
201-
pi = Decimal(1).atan() * 4
202201
if x == 1:
203-
r = pi / 2 # pi * 1/2 radians
202+
r = atan(Decimal(1)) * 2 # pi * 1/2 radians
204203
elif x == -1:
205-
r = pi / -2 # pi * -1/2 radians
204+
r = atan(Decimal(1)) * -2 # pi * -1/2 radians
206205
else:
207206
r = atan(x / (1 - x * x).sqrt())
208207
return r / 1
@@ -227,7 +226,7 @@ def acos(x, context=None):
227226
if x == 1:
228227
r = Decimal(0) # 0 radians
229228
elif x == -1:
230-
r = Decimal(1).atan() * 4 # pi radians
229+
r = atan(Decimal(1)) * 4 # pi radians
231230
else:
232231
r = atan((1 - x * x).sqrt() / x)
233232
if r < 0:

0 commit comments

Comments
 (0)