From: Jean-Christophe Filliatre <filliatr@lri.fr>
To: Alain Frisch <frisch@clipper.ens.fr>
Cc: Caml list <caml-list@inria.fr>
Subject: Re: [Caml-list] Num library
Date: Fri, 11 Oct 2002 16:08:33 +0200 (MEST) [thread overview]
Message-ID: <15782.56161.649922.825529@pc8-123> (raw)
In-Reply-To: <Pine.SOL.4.44.0210101033080.11248-100000@clipper.ens.fr>
Alain Frisch writes:
>
> I'm considering using the Num library (from the standard distribution) for
> implementing numbers in an interpreter. Questions:
>
> - How does the library compare with other large/rational numbers
> implementations ?
I'm not going to comment on the efficiency of Num.
But, for having tried to use it in a serious software and finally
replaced it by mlgmp, I can mention one true weakness of the Num
library: there is no unicity of representation (e.g. 1 can be Int 1,
but also Ratio 1/1, etc.) and consequently you cannot use caml's
comparison and hash functions over it.
Of course, you can use compare_num (hash_num is lacking, though) but
when nums are involved within huge datatypes, you have to write
structural comparison and hash functions for these types. This is a
pain, really.
--
Jean-Christophe
-------------------
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
next prev parent reply other threads:[~2002-10-11 12:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-10 8:42 Alain Frisch
2002-10-10 9:42 ` sebastien FURIC
2002-10-10 14:56 ` Yaron M. Minsky
2002-10-10 17:14 ` Pierre Weis
2002-10-10 18:53 ` Alain Frisch
2002-10-11 20:01 ` Pierre Weis
2002-10-10 19:45 ` Yaron M. Minsky
2002-10-10 17:08 ` Pierre Weis
2002-10-11 9:26 ` Sebastien Furic
2002-10-11 20:17 ` Pierre Weis
2002-10-11 10:22 ` Alessandro Baretta
2002-10-11 13:23 ` Claude Marche
2002-10-11 16:14 ` Sebastien Furic
2002-10-11 14:08 ` Jean-Christophe Filliatre [this message]
2002-10-11 18:35 ` "custom" operators in caml (was: Re: [Caml-list] Num library) Chris Hecker
2002-10-11 20:30 ` [Caml-list] Num library Pierre Weis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15782.56161.649922.825529@pc8-123 \
--to=filliatr@lri.fr \
--cc=Jean-Christophe.Filliatre@lri.fr \
--cc=caml-list@inria.fr \
--cc=frisch@clipper.ens.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox