diff --git a/CHANGELOG.md b/CHANGELOG.md index 4af2535d..1cf4e344 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,12 @@ Bug Fixes - Fix from Petr Pražák to avoid compilation errors when using newer versions of LibTomMath. - Avoid cases where bignums are not initialized properly by the runtime and incorrectly retain a value of zero. -- Handle the following edge cases from R7RS: +- Handle the following edge case from R7RS: - > If `z` is a complex number, then `(real? z)` is true if and only if `(zero? (imag-part z))` is true. If `x` is an inexact real number, then `(integer? x)` is true if and only if `(= x (round x))`. + > If `z` is a complex number, then `(real? z)` is true if and only if `(zero? (imag-part z))` is true. + + +TBD: If `x` is an inexact real number, then `(integer? x)` is true if and only if `(= x (round x))`. ## 0.9.8 - February 16, 2019 diff --git a/runtime.c b/runtime.c index 456eaef9..8cacd2c5 100644 --- a/runtime.c +++ b/runtime.c @@ -1699,8 +1699,9 @@ object Cyc_is_integer(object o) { if ((o != NULL) && (obj_is_int(o) || (!is_value_type(o) && type_of(o) == integer_tag) || - (!is_value_type(o) && type_of(o) == bignum_tag) || - (!is_value_type(o) && type_of(o) == double_tag && double_value(o) == round(double_value(o))))) // Per R7RS + (!is_value_type(o) && type_of(o) == bignum_tag) + // || (!is_value_type(o) && type_of(o) == double_tag && double_value(o) == round(double_value(o))) + )) // Per R7RS return boolean_t; return boolean_f; }