Closed christianp closed 11 years ago
Yes - please change - I wasn't aware of this!
From: Christian Perfect [notifications@github.com] Sent: 20 February 2013 16:21 To: numbas/Numbas Subject: [Numbas] mod(a,b) should always return a positive number (#257)
Currently, mod(a,b) follows javascript and returns a negative number for negative a, i.e. mod(-5,9) = -5. I think we should always return a positive number, because that's the convention in maths. What do you think?
— Reply to this email directly or view it on GitHubhttps://github.com/numbas/Numbas/issues/257.
Currently,
mod(a,b)
follows javascript and returns a negative number for negativea
, i.e.mod(-5,9) = -5
. I think we should always return a positive number, because that's the convention in maths. What do you think?