File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
quaddtype/numpy_quaddtype/src Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 6
6
#define QUAD_ZERO sleef_q (+0x0000000000000LL , 0x0000000000000000ULL , -16383 )
7
7
#define QUAD_ONE sleef_q (+0x1000000000000LL , 0x0000000000000000ULL , 0 )
8
8
#define QUAD_POS_INF sleef_q (+0x1000000000000LL , 0x0000000000000000ULL , 16384 )
9
+ #define QUAD_NAN sleef_q (+0x180000000000LL , 0x0000000000000000ULL , 16384 )
9
10
10
11
// Unary Quad Operations
11
12
typedef Sleef_quad (*unary_op_quad_def)(const Sleef_quad *);
@@ -396,7 +397,7 @@ quad_mod(const Sleef_quad *a, const Sleef_quad *b)
396
397
{
397
398
// division by zero
398
399
if (Sleef_icmpeqq1 (*b, QUAD_ZERO)) {
399
- return Sleef_cast_from_doubleq1 (NAN) ;
400
+ return QUAD_NAN ;
400
401
}
401
402
402
403
// NaN inputs
@@ -406,7 +407,7 @@ quad_mod(const Sleef_quad *a, const Sleef_quad *b)
406
407
407
408
// infinity dividend -> NaN
408
409
if (quad_isinf (a)) {
409
- return Sleef_cast_from_doubleq1 (NAN) ;
410
+ return QUAD_NAN ;
410
411
}
411
412
412
413
// finite % inf
You can’t perform that action at this time.
0 commit comments