1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
<html>
<head><title>REM.html -- ACL2 Version 3.1</title></head>
<body text=#000000 bgcolor="#FFFFFF">
<h2>REM</h2>remainder using <code><a href="TRUNCATE.html">truncate</a></code>
<pre>Major Section: <a href="PROGRAMMING.html">PROGRAMMING</a>
</pre><p>
<pre>
ACL2 !>(rem 14 3)
2
ACL2 !>(rem -14 3)
-2
ACL2 !>(rem 14 -3)
2
ACL2 !>(rem -14 -3)
-2
ACL2 !>(rem -15 -3)
0
ACL2 !>
</pre>
<code>(Rem i j)</code> is that number <code>k</code> for which <code>(* j (truncate i j))</code> added
to <code>k</code> equals <code>i</code>.
<p>
The <a href="GUARD.html">guard</a> for <code>(rem i j)</code> requires that <code>i</code> and <code>j</code> are rational
(<a href="REAL.html">real</a>, in ACL2(r)) numbers and <code>j</code> is non-zero.<p>
<code>Rem</code> is a Common Lisp function. See any Common Lisp documentation
for more information.
<br><br><br><a href="acl2-doc.html"><img src="llogo.gif"></a> <a href="acl2-doc-index.html"><img src="index.gif"></a>
</body>
</html>
|