caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] [Ann] Zarith
@ 2011-08-18  7:34 Xavier Leroy
  2011-08-18  8:02 ` rixed
  0 siblings, 1 reply; 5+ messages in thread
From: Xavier Leroy @ 2011-08-18  7:34 UTC (permalink / raw)
  To: caml-list

Dear list,

It is my pleasure to announce release 1.0 of Zarith, a new OCaml
library for exact, arbitrary-precision arithmetic on integers and
rationals.  Zarith was written by Antoine Miné with a little help from
me and feedback from Pascal Cuoq.

To download:  http://forge.ocamlcore.org/projects/zarith/

The implementation uses GMP (the GNU Multiple Precision arithmetic
library) to compute over big integers.  However, small integers are
represented as unboxed Caml integers, to save space and improve
performance. Big integers are allocated in the Caml heap, bypassing
GMP's memory management and achieving better GC behavior than e.g.
the MLGMP library.  Computations on small integers use a special,
faster path (coded in assembly for some platforms and functions)
eschewing calls to GMP, while computations on large intergers use the
low-level MPN functions from GMP.  As a consequence, Zarith is much
faster and more space-efficient than the Big_int module from OCaml's
standard distribution.

Additional niceties of Zarith include:
- short function names and infix operators, allowing one to write e.g.
    Z.(~$2 + ~$5 * x)
- polymorphic comparisons (=, <, >, etc) work correctly on Zarith's
  big integers, provided OCaml 3.12.1 or later is used.

Feedback is welcome, preferably through the bug tracker at
http://forge.ocamlcore.org/projects/zarith/

Enjoy,

- Xavier Leroy

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-08-18 10:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-18  7:34 [Caml-list] [Ann] Zarith Xavier Leroy
2011-08-18  8:02 ` rixed
2011-08-18  8:49   ` Gerd Stolpmann
2011-08-18  8:58   ` Gabriel Scherer
2011-08-18 10:42     ` Alain Frisch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).