Home | Notes | Languages | Programs | Homework |
Re: [CS3304_91312] implementing remainder (was: cs 3304) |
Vincent Vance (vvance@VT.EDU)
Sun, 21 Oct 2001 12:48:18 -0400
Message-ID: <000001c15a50$2f5ca9d0$7a6252c6@omni1> Date: Sun, 21 Oct 2001 12:48:18 -0400 From: Vincent Vance <vvance@VT.EDU> Subject: FW: [CS3304_91312] implementing remainder (was: cs 3304)
-----Original Message-----
From: discussion list [mailto:CS3304_91312@listserv.vt.edu] On Behalf Of
Stephen Edwards
Sent: Wednesday, October 10, 2001 1:54 PM
To: CS3304_91312@LISTSERV.VT.EDU
Subject: Re: [CS3304_91312] implementing remainder (was: cs 3304)
> Use the Scheme numeric function "remainder" to compute the result of
an
> irem command. For the above example, (remainder -13 4) returns -1.
Another clarification: since the built-in remainder function requires
integer arguments, use (remainder (round arg1) (round arg2)) to
implement
irem. "round" is a built-in function that rounds to the nearest
integer.
-- Steve
-- Stephen Edwards 604 McBryde Hall Dept. of Computer Science e-mail : edwards@cs.vt.edu U.S. mail: Virginia Tech (VPI&SU) office phone: (540)-231-5723 Blacksburg, VA 24061-0106 ------------------------------------------------------------------------ -------
Home | Notes | Languages | Programs | Homework |