<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <meta name="generator" content="hevea 2.00"> <link rel="stylesheet" type="text/css" href="manual.css"> <title>The num library: arbitrary-precision rational arithmetic</title> </head> <body> <a href="libunix.html"><img src="previous_motif.gif" alt="Previous"></a> <a href="index.html"><img src="contents_motif.gif" alt="Up"></a> <a href="libstr.html"><img src="next_motif.gif" alt="Next"></a> <hr> <h1 class="chapter" id="sec471">Chapter 23  The num library: arbitrary-precision rational arithmetic</h1> <p>The <span class="c007">num</span> library implements integer arithmetic and rational arithmetic in arbitrary precision.</p><p>More documentation on the functions provided in this library can be found in <em>The CAML Numbers Reference Manual</em> by Valérie Ménissier-Morain, technical report 141, INRIA, july 1992 (available electronically, <a href="http://hal.inria.fr/docs/00/07/00/27/PDF/RT-0141.pdf"><span class="c007">http://hal.inria.fr/docs/00/07/00/27/PDF/RT-0141.pdf</span></a>).</p><p>Programs that use the <span class="c007">num</span> library must be linked as follows: </p><pre> ocamlc <span class="c013">other options</span> nums.cma <span class="c013">other files</span> ocamlopt <span class="c013">other options</span> nums.cmxa <span class="c013">other files</span> </pre><p> For interactive use of the <span class="c007">nums</span> library, do: </p><pre> ocamlmktop -o mytop nums.cma ./mytop </pre><p> or (if dynamic linking of C libraries is supported on your platform), start <span class="c007">ocaml</span> and type <span class="c007">#load "nums.cma";;</span>.</p><ul class="ftoc2"><li class="li-links"> <a href="libref/Num.html">Module <span class="c007">Num</span>: operation on arbitrary-precision numbers</a> </li><li class="li-links"><a href="libref/Big_int.html">Module <span class="c007">Big_int</span>: operations on arbitrary-precision integers</a> </li><li class="li-links"><a href="libref/Arith_status.html">Module <span class="c007">Arith_status</span>: flags that control rational arithmetic</a> </li></ul> <hr> <a href="libunix.html"><img src="previous_motif.gif" alt="Previous"></a> <a href="index.html"><img src="contents_motif.gif" alt="Up"></a> <a href="libstr.html"><img src="next_motif.gif" alt="Next"></a> </body> </html>