1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00

(scm_modulo): Amend fixme comment about negative divisor

with "%", C99 says it's well-defined.
This commit is contained in:
Kevin Ryde 2004-12-10 00:00:27 +00:00
parent 602d32dd48
commit 66b1c775d2

View file

@ -878,8 +878,9 @@ scm_modulo (SCM x, SCM y)
scm_num_overflow (s_modulo);
else
{
/* FIXME: I think this may be a bug on some arches -- results
of % with negative second arg are undefined... */
/* C99 specifies that "%" is the remainder corresponding to a
quotient rounded towards zero, and that's also traditional
for machine division, so z here should be well defined. */
long z = xx % yy;
long result;