2520 |
scm_remember_upto_here_2 (x, y); |
scm_remember_upto_here_2 (x, y); |
2521 |
return SCM_BOOL (0 == cmp); |
return SCM_BOOL (0 == cmp); |
2522 |
} else if (SCM_REALP (y)) { |
} else if (SCM_REALP (y)) { |
2523 |
int cmp = mpz_cmp_d (SCM_I_BIG_MPZ (x), SCM_REAL_VALUE (y)); |
int cmp; |
2524 |
|
if (xisnan (SCM_REAL_VALUE (y))) return SCM_BOOL_F; |
2525 |
|
cmp = mpz_cmp_d (SCM_I_BIG_MPZ (x), SCM_REAL_VALUE (y)); |
2526 |
scm_remember_upto_here_1 (x); |
scm_remember_upto_here_1 (x); |
2527 |
return SCM_BOOL (0 == cmp); |
return SCM_BOOL (0 == cmp); |
2528 |
} else if (SCM_COMPLEXP (y)) { |
} else if (SCM_COMPLEXP (y)) { |
2529 |
int cmp; |
int cmp; |
2530 |
if (0.0 != SCM_COMPLEX_IMAG (y)) return SCM_BOOL_F; |
if (0.0 != SCM_COMPLEX_IMAG (y)) return SCM_BOOL_F; |
2531 |
|
if (xisnan (SCM_COMPLEX_REAL (y))) return SCM_BOOL_F; |
2532 |
cmp = mpz_cmp_d (SCM_I_BIG_MPZ (x), SCM_COMPLEX_REAL (y)); |
cmp = mpz_cmp_d (SCM_I_BIG_MPZ (x), SCM_COMPLEX_REAL (y)); |
2533 |
scm_remember_upto_here_1 (x); |
scm_remember_upto_here_1 (x); |
2534 |
return SCM_BOOL (0 == cmp); |
return SCM_BOOL (0 == cmp); |
2539 |
if (SCM_INUMP (y)) { |
if (SCM_INUMP (y)) { |
2540 |
return SCM_BOOL (SCM_REAL_VALUE (x) == (double) SCM_INUM (y)); |
return SCM_BOOL (SCM_REAL_VALUE (x) == (double) SCM_INUM (y)); |
2541 |
} else if (SCM_BIGP (y)) { |
} else if (SCM_BIGP (y)) { |
2542 |
int cmp = mpz_cmp_d (SCM_I_BIG_MPZ (y), SCM_REAL_VALUE (x)); |
int cmp; |
2543 |
|
if (xisnan (SCM_REAL_VALUE (x))) return SCM_BOOL_F; |
2544 |
|
cmp = mpz_cmp_d (SCM_I_BIG_MPZ (y), SCM_REAL_VALUE (x)); |
2545 |
scm_remember_upto_here_1 (y); |
scm_remember_upto_here_1 (y); |
2546 |
return SCM_BOOL (0 == cmp); |
return SCM_BOOL (0 == cmp); |
2547 |
} else if (SCM_REALP (y)) { |
} else if (SCM_REALP (y)) { |
2559 |
} else if (SCM_BIGP (y)) { |
} else if (SCM_BIGP (y)) { |
2560 |
int cmp; |
int cmp; |
2561 |
if (0.0 != SCM_COMPLEX_IMAG (x)) return SCM_BOOL_F; |
if (0.0 != SCM_COMPLEX_IMAG (x)) return SCM_BOOL_F; |
2562 |
|
if (xisnan (SCM_COMPLEX_REAL (x))) return SCM_BOOL_F; |
2563 |
cmp = mpz_cmp_d (SCM_I_BIG_MPZ (y), SCM_COMPLEX_REAL (x)); |
cmp = mpz_cmp_d (SCM_I_BIG_MPZ (y), SCM_COMPLEX_REAL (x)); |
2564 |
scm_remember_upto_here_1 (y); |
scm_remember_upto_here_1 (y); |
2565 |
return SCM_BOOL (0 == cmp); |
return SCM_BOOL (0 == cmp); |
2609 |
scm_remember_upto_here_2 (x, y); |
scm_remember_upto_here_2 (x, y); |
2610 |
return SCM_BOOL (cmp < 0); |
return SCM_BOOL (cmp < 0); |
2611 |
} else if (SCM_REALP (y)) { |
} else if (SCM_REALP (y)) { |
2612 |
int cmp = mpz_cmp_d (SCM_I_BIG_MPZ (x), SCM_REAL_VALUE (y)); |
int cmp; |
2613 |
|
if (xisnan (SCM_REAL_VALUE (y))) return SCM_BOOL_F; |
2614 |
|
cmp = mpz_cmp_d (SCM_I_BIG_MPZ (x), SCM_REAL_VALUE (y)); |
2615 |
scm_remember_upto_here_1 (x); |
scm_remember_upto_here_1 (x); |
2616 |
return SCM_BOOL (cmp < 0); |
return SCM_BOOL (cmp < 0); |
2617 |
} else { |
} else { |
2621 |
if (SCM_INUMP (y)) { |
if (SCM_INUMP (y)) { |
2622 |
return SCM_BOOL (SCM_REAL_VALUE (x) < (double) SCM_INUM (y)); |
return SCM_BOOL (SCM_REAL_VALUE (x) < (double) SCM_INUM (y)); |
2623 |
} else if (SCM_BIGP (y)) { |
} else if (SCM_BIGP (y)) { |
2624 |
int cmp = mpz_cmp_d (SCM_I_BIG_MPZ (y), SCM_REAL_VALUE (x)); |
int cmp; |
2625 |
|
if (xisnan (SCM_REAL_VALUE (x))) return SCM_BOOL_F; |
2626 |
|
cmp = mpz_cmp_d (SCM_I_BIG_MPZ (y), SCM_REAL_VALUE (x)); |
2627 |
scm_remember_upto_here_1 (y); |
scm_remember_upto_here_1 (y); |
2628 |
return SCM_BOOL (cmp > 0); |
return SCM_BOOL (cmp > 0); |
2629 |
} else if (SCM_REALP (y)) { |
} else if (SCM_REALP (y)) { |