Skip to content

Commit 4f5be4b

Browse files
change asin(-1) result to match math.asin(-1) = -pi/2 radians
```>>> math.asin(-1) -1.5708 >>> Decimal.asin(-1) Decimal('-1.570796326794896619231321692')``` also updated `acos` example; verified other examples, as well
1 parent 5dbf417 commit 4f5be4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jepler_udecimal/utrig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def asin(x, context=None):
202202
if x == 1:
203203
r = pi / 2 # pi * 1/2 radians
204204
elif x == -1:
205-
r = pi * 3 / 2 # pi * -1/2 radians
205+
r = pi / -2 # pi * -1/2 radians
206206
else:
207207
r = atan(x / (1 - x * x).sqrt())
208208
return r / 1

0 commit comments

Comments
 (0)