mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-01 01:40:21 +02:00
Use scm_from_bool instead of SCM_BOOL. Thanks to Peter Gavin!
This commit is contained in:
parent
3c55f6f1e2
commit
3a1b45fdf7
1 changed files with 6 additions and 6 deletions
|
@ -3228,9 +3228,9 @@ scm_num_eq_p (SCM x, SCM y)
|
||||||
might be fastest or easiest for the cpu. */
|
might be fastest or easiest for the cpu. */
|
||||||
|
|
||||||
double yy = SCM_REAL_VALUE (y);
|
double yy = SCM_REAL_VALUE (y);
|
||||||
return SCM_BOOL ((double) xx == yy
|
return scm_from_bool ((double) xx == yy
|
||||||
&& (DBL_MANT_DIG >= SCM_I_FIXNUM_BIT-1
|
&& (DBL_MANT_DIG >= SCM_I_FIXNUM_BIT-1
|
||||||
|| xx == (long) yy));
|
|| xx == (long) yy));
|
||||||
}
|
}
|
||||||
else if (SCM_COMPLEXP (y))
|
else if (SCM_COMPLEXP (y))
|
||||||
return scm_from_bool (((double) xx == SCM_COMPLEX_REAL (y))
|
return scm_from_bool (((double) xx == SCM_COMPLEX_REAL (y))
|
||||||
|
@ -3282,9 +3282,9 @@ scm_num_eq_p (SCM x, SCM y)
|
||||||
{
|
{
|
||||||
/* see comments with inum/real above */
|
/* see comments with inum/real above */
|
||||||
long yy = SCM_I_INUM (y);
|
long yy = SCM_I_INUM (y);
|
||||||
return SCM_BOOL (xx == (double) yy
|
return scm_from_bool (xx == (double) yy
|
||||||
&& (DBL_MANT_DIG >= SCM_I_FIXNUM_BIT-1
|
&& (DBL_MANT_DIG >= SCM_I_FIXNUM_BIT-1
|
||||||
|| (long) xx == yy));
|
|| (long) xx == yy));
|
||||||
}
|
}
|
||||||
else if (SCM_BIGP (y))
|
else if (SCM_BIGP (y))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue