Optimize division operators handling of fractions
authorMark H Weaver <mhw@netris.org>
Sun, 13 Feb 2011 11:04:52 +0000 (06:04 -0500)
committerAndy Wingo <wingo@pobox.com>
Mon, 14 Feb 2011 19:30:49 +0000 (20:30 +0100)
commit03ddd15baed49dcfed0d7fc76648778b76df56d3
tree6a4749a112cc1a0a019b0ca39ead3b5d05e84fc2
parent5fbf680be9e98d005bbbd6a598443fca76a6918d
Optimize division operators handling of fractions

* libguile/numbers.c: (scm_euclidean_quotient, scm_euclidean_remainder,
  scm_euclidean_divide, scm_centered_quotient, scm_centered_remainder,
  scm_centered_divide): Optimize case where both arguments are exact and
  at least one is a fraction, by reducing to a subproblem involving only
  integers, and then adjusting the resulting remainder as needed.
libguile/numbers.c