English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Problem with the old Num implementation of ocaml (fwd)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-12-30 (11:32)
From: Christophe Raffalli <christophe.raffalli@u...>
Subject: Re: [Caml-list] Problem with the Num implementation

I just use this thread to ask again a question ...

How to compute the best or at least a very good float interval 
containing a rational number with the num library ?

The float_of-num function is really not convincing (it is very slow 
because it does a translation to a decimal representation as string and 
look at all the digits !).

Remark: it should be possible to find a very good (may be not always the 
best) float interval in constant time !

This is usefull to implement lazy arithmetics (you compute with floating 
point interval until this is not enough and then you compute the exact 
value. But it is useful in some cases to compute an interval from the
rational number and it needs to be fast to be useful)

Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature