~ chicken-core (chicken-5) e4f9b851343be7e8a9acd091c7fcaa96121856de
commit e4f9b851343be7e8a9acd091c7fcaa96121856de Author: Jim Ursetto <zbigniewsz@gmail.com> AuthorDate: Mon Apr 23 23:33:31 2012 -0500 Commit: Jim Ursetto <zbigniewsz@gmail.com> CommitDate: Mon Apr 23 23:43:58 2012 -0500 Tiny aesthetic fixes in oddp and arithmetic_shift diff --git a/runtime.c b/runtime.c index 8e96255c..ced344ba 100644 --- a/runtime.c +++ b/runtime.c @@ -4650,7 +4650,7 @@ C_regparm C_word C_fcall C_i_oddp(C_word x) if(C_isnan(val) || C_isinf(val) || C_modf(val, &dummy) != 0.0) barf(C_BAD_ARGUMENT_TYPE_NO_INTEGER_ERROR, "odd?", x); - return C_mk_bool(fmod(C_flonum_magnitude(x), 2.0) != 0.0); + return C_mk_bool(fmod(val, 2.0) != 0.0); } @@ -5151,7 +5151,7 @@ C_regparm C_word C_fcall C_a_i_arithmetic_shift(C_word **a, int c, C_word n1, C_ f = C_flonum_magnitude(n1); - if(C_isnan(f) || C_isinf(f) || modf(f, &m) != 0.0) + if(C_isnan(f) || C_isinf(f) || C_modf(f, &m) != 0.0) barf(C_BAD_ARGUMENT_TYPE_NO_INTEGER_ERROR, "arithmetic-shift", n1); if(f < C_WORD_MIN || f > C_UWORD_MAX)Trap