Improve extensibility of core numeric procedures
* libguile/numbers.c (scm_quotient, scm_remainder, scm_modulo,
scm_zero_p, scm_positive_p, scm_negative_p, scm_real_part,
scm_imag_part, scm_numerator, scm_denominator, scm_magnitude,
scm_angle, scm_exact_to_inexact): Change from SCM_GPROC to
SCM_PRIMITIVE_GENERIC. As a side effect, all of these procedures now
have documentation strings.
(scm_exact_p, scm_inexact_p, scm_odd_p, scm_even_p, scm_finite_p,
scm_inf_p, scm_nan_p, scm_expt, scm_inexact_to_exact, scm_log,
scm_log10, scm_exp, scm_sqrt): Change from SCM_DEFINE to
SCM_PRIMITIVE_GENERIC, and make sure the code allows these functions
to be extended in practice.
(scm_real_part, scm_imag_part, scm_numerator, scm_denominator,
scm_inexact_to_exact): Simplify type dispatch code.
(scm_sqrt): Rename formal argument from x to z, since complex numbers
are supported.
(scm_abs): Fix empty FUNC_NAME.
* libguile/numbers.h (scm_finite_p): Add missing prototype.
(scm_inf_p, scm_nan_p): Rename formal parameter from n to x, since
the domain is the real numbers.
* test-suite/tests/numbers.test: Test for documentation strings. Change
from `expect-fail' to `pass-if' for several of these, and add tests
for others. Also add other tests for `real-part' and `imag-part',
which previously had none.