Added Cyc_is_complex

This commit is contained in:
Justin Ethier 2018-05-10 13:35:11 -04:00
parent 11931bca7d
commit 03f5e35c3a
2 changed files with 8 additions and 0 deletions

View file

@ -406,6 +406,7 @@ object Cyc_is_boolean(object o);
#define Cyc_is_pair(o) ((is_object_type(o) && ((list) o)->tag == pair_tag) ? boolean_t : boolean_f)
object Cyc_is_null(object o);
object Cyc_is_number(object o);
object Cyc_is_complex(object o);
object Cyc_is_real(object o);
object Cyc_is_integer(object o);
object Cyc_is_fixnum(object o);

View file

@ -1581,6 +1581,13 @@ object Cyc_is_real(object o)
return Cyc_is_number(o);
}
object Cyc_is_complex(object o)
{
if ((o != NULL) && !is_value_type(o) && ((list) o)->tag == complex_num_tag)
return boolean_t;
return boolean_f;
}
object Cyc_is_fixnum(object o)
{
if (obj_is_int(o))