[r6rs-discuss] [Formal] div and mod should have examples with x1 negative

Ben Harris bjh21 at bjh21.me.uk
Tue Apr 17 15:55:40 EDT 2007


---
This message is a formal comment which was submitted to formal-comment at r6rs.org, following the requirements described at: http://www.r6rs.org/process.html
---
submitter: Ben Harris <bjh21 at bjh21.me.uk>
type: Enhancement
priority: Trivial
component: Base Library
version: 5.92
summary: div and mod should have examples with x1 negative

All of the examples of the div and mod operations in section 9.3.3 on
page 40 have x1 positive, which misses an opportunity for readers to
confirm that they've understood the operations correctly.  I would
suggest adding some of the following:

 -5 div 3 = -2
-5 div -3 = 2
 -5 mod 3 = 1
-5 mod -3 = 1

-- 
Ben Harris




More information about the r6rs-discuss mailing list