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

From: Ben Harris <bjh21>
Date: Tue, 17 Apr 2007 20:55:40 +0100 (BST)

---
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
Received on Tue Apr 17 2007 - 15:55:40 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC