Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Counting bits in a big_int
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Counting bits in a big_int
> Nice.  The weird thing about the Nat module is that it's completely
> undocumented.  Is there any reason to think it wil be stable between
> revisions?  For instance, does Xavier's reimplementation have the same
> Num module with the same interface as the previous one?

The Nat interface hasn't changed since the beginning of OCaml, and my
recent reimplementation of the low-level primitives preserved its interface.

> I guess my real question is: why is Nat undocumented?

Nat is a very low-level API, based on in-place modification of
sub-numbers of big integers.  Consequently, it's hard to use directly,
and it's also hard to document.  The lack of documentation is both an
encouragement not to use it, and an evidence that we are lazy :-)

If you really want to know what Nat does, the following tech rep is useful:
"The CAML Numbers Reference Manual" by Valerie Menissier-Morain,
technical report 141, INRIA, july 1992, available at
ftp://ftp.inria.fr/INRIA/publication/RT/RT-0141.ps.gz.  It documents
the Caml V3.1 API for exact-precision arithmetic, but the part of it
that deals with the "nat" abstraction still applies to the Nat module
of OCaml.

- Xavier Leroy

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners