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 34 35 36 37 38 39 40 41
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.09">
<LINK rel="stylesheet" type="text/css" href="manual.css">
<TITLE>The num library: arbitrary-precision rational arithmetic</TITLE>
</HEAD>
<BODY >
<A HREF="manual035.html"><IMG SRC="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
<A HREF="manual037.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
<HR>
<H1 CLASS="chapter"><A NAME="htoc254">Chapter22</A>The num library: arbitrary-precision rational arithmetic</H1><P>The <TT>num</TT> 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
Valrie Mnissier-Morain, technical report 141, INRIA, july 1992
(available electronically,
<TT>ftp://ftp.inria.fr/INRIA/publication/RT/RT-0141.ps.gz</TT>).</P><P>Programs that use the <TT>num</TT> library must be linked as follows:
</P><PRE>
ocamlc <I>other options</I> nums.cma <I>other files</I>
ocamlopt <I>other options</I> nums.cmxa <I>other files</I>
</PRE><P>
For interactive use of the <TT>nums</TT> 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 <TT>ocaml</TT> and type <TT>#load "nums.cma";;</TT>.</P><UL CLASS="ftoc2"><LI CLASS="li-links">
<A HREF="libref/Num.html">Module <TT>Num</TT>: operation on arbitrary-precision numbers</A>
</LI><LI CLASS="li-links"><A HREF="libref/Big_int.html">Module <TT>Big_int</TT>: operations on arbitrary-precision integers</A>
</LI><LI CLASS="li-links"><A HREF="libref/Arith_status.html">Module <TT>Arith_status</TT>: flags that control rational arithmetic</A>
</LI></UL><HR>
<A HREF="manual035.html"><IMG SRC="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
<A HREF="manual037.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
|