mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-18 23:32:17 -08:00
parent
4fdaf22bc5
commit
1cfb5016d8
1 changed files with 12 additions and 0 deletions
|
|
@ -79,6 +79,10 @@ ecl_number_compare(cl_object x, cl_object y)
|
|||
case t_doublefloat:
|
||||
#ifdef ECL_LONG_FLOAT
|
||||
case t_longfloat:
|
||||
#endif
|
||||
#ifdef ECL_IEEE_FP
|
||||
if (si_float_infinity_p(y))
|
||||
return(ecl_number_compare(ecl_make_fixnum(0), y));
|
||||
#endif
|
||||
y = cl_rational(y);
|
||||
goto BEGIN;
|
||||
|
|
@ -101,6 +105,10 @@ ecl_number_compare(cl_object x, cl_object y)
|
|||
case t_doublefloat:
|
||||
#ifdef ECL_LONG_FLOAT
|
||||
case t_longfloat:
|
||||
#endif
|
||||
#ifdef ECL_IEEE_FP
|
||||
if (si_float_infinity_p(y))
|
||||
return(ecl_number_compare(ecl_make_fixnum(0), y));
|
||||
#endif
|
||||
y = cl_rational(y);
|
||||
goto BEGIN;
|
||||
|
|
@ -118,6 +126,10 @@ ecl_number_compare(cl_object x, cl_object y)
|
|||
return -double_fix_compare(ecl_fixnum(y), dx);
|
||||
case t_bignum:
|
||||
case t_ratio:
|
||||
#ifdef ECL_IEEE_FP
|
||||
if (si_float_infinity_p(x))
|
||||
return(ecl_number_compare(x, ecl_make_fixnum(0)));
|
||||
#endif
|
||||
x = cl_rational(x);
|
||||
goto BEGIN;
|
||||
case t_singlefloat:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue