~ chicken-core (chicken-5) 8a3129a10dc588a492130c29a38b57db4c3498c1
commit 8a3129a10dc588a492130c29a38b57db4c3498c1 Author: felix <felix@call-with-current-continuation.org> AuthorDate: Sun Mar 14 13:17:33 2010 +0100 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Sun Mar 14 13:17:33 2010 +0100 integer? returns #f for nan and inf diff --git a/chicken.h b/chicken.h index 314203b5..9ed726cf 100644 --- a/chicken.h +++ b/chicken.h @@ -2121,6 +2121,8 @@ C_inline C_word C_i_integerp(C_word x) { double dummy; + if(C_isnan(x) || C_isinf(x)) return C_SCHEME_FALSE; + return C_mk_bool((x & C_FIXNUM_BIT) || ((!C_immediatep(x) && C_block_header(x) == C_FLONUM_TAG) && C_modf(C_flonum_magnitude(x), &dummy) == 0.0 ) );Trap