Chapter 22 The num library: 任意精度の有理数The Objective Caml system release 3.10 num ライブラリは任意精度での整数と有理数の計算を提供します。 このライブラリ関数の詳細なドキュメントは The CAML Numbers Reference Manual by Val駻ie M駭issier-Morain, technical report 141, INRIA, july 1992 にあります (ftp://ftp.inria.fr/INRIA/publication/RT/RT-0141.ps.gz からオンラインで利用できます)。 num ライブラリを使用するプログラムは以下のようにリンクしてください。 ocamlc other options nums.cma other files
ocamlopt other options nums.cmxa other files
nums ライブラリを対話式システムで使う場合は以下のようにしてください。 ocamlmktop -o mytop nums.cma
./mytop
(C ライブラリのダイナミックリンクをサポートしているプラットフォームでは) ocaml を起動したあと #load "nums.cma";; と打っても構いません。
|