Reduce code size of division operators
authorMark H Weaver <mhw@netris.org>
Sun, 13 Feb 2011 12:25:28 +0000 (07:25 -0500)
committerAndy Wingo <wingo@pobox.com>
Mon, 14 Feb 2011 19:31:25 +0000 (20:31 +0100)
commita8da6d9338e2236742e95a0f7337796078f9e2a3
tree520385af437cbff338d22ae7e61c758c0053a8aa
parent8b56bcec442b203fcde509b40bd5866e62aaa111
Reduce code size of division operators

* libguile/numbers.c (scm_quotient): Reimplement in terms of
  scm_truncate_quotient.

  (scm_remainder): Reimplement in terms of scm_truncate_remainder.

  (scm_modulo): Reimplement in terms of scm_floor_remainder.

  (scm_euclidean_quotient, scm_euclidean_remainder,
  scm_euclidean_divide): Reimplement in terms of floor and ceiling.
  Make them non-extensible, because there is no need; they will work
  with any objects that implement the floor and ceiling division
  operators, and that can be tested using `negative?'.
libguile/numbers.c