Skip to content

Commit a54c697

Browse files
committed
CHANGE: ARCSINE and ARCCOSINE returns 1.#NaN where they were throwing error before (if supported).
For example: >> arccosine/radians 2.0 == 1.#NaN
1 parent 669f86d commit a54c697

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core/n-math.c

+2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ enum {SINE, COSINE, TANGENT};
9191
REBDEC dval;
9292

9393
dval = AS_DECIMAL(D_ARG(1));
94+
#ifdef USE_NO_INFINITY
9495
if (kind != TANGENT && (dval < -1 || dval > 1)) Trap0(RE_OVERFLOW);
96+
#endif
9597

9698
if (kind == SINE) dval = asin(dval);
9799
else if (kind == COSINE) dval = acos(dval);

0 commit comments

Comments
 (0)