Optimize scm_exact_p by making use of SCM_INEXACTP
authorMark H Weaver <mhw@netris.org>
Wed, 26 Jan 2011 14:36:05 +0000 (09:36 -0500)
committerAndy Wingo <wingo@pobox.com>
Fri, 28 Jan 2011 11:24:24 +0000 (12:24 +0100)
commit41df63cf16f80797e0071705d06e166fd2f62d49
treed2d2d3265cf93417cb6cbfede0ce0dd98c852b85
parent7112615f73bf79197832fd044dc7f7d9d94b5325
Optimize scm_exact_p by making use of SCM_INEXACTP

* libguile/numbers.c (scm_exact_p): Optimize by making use of the
  SCM_INEXACTP macro.
  (scm_inexact_p): Move it next to scm_exact_p, and add else's.

* test-suite/tests/numbers.test: Add test cases for `exact?'
  and `inexact?' applied to infinities and NaNs.
libguile/numbers.c
test-suite/tests/numbers.test