Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Executable size?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-11-14 (06:04)
From: Christophe Raffalli <Christophe.Raffalli@u...>
Subject: [Caml-list] float_of_num
  What is the property of float_of_num ? How is it computed ?

Given x : num, I need to find two floats a,b such that a <= x <= b.

Changing the rounding mode and calling float_of_num twice doesnot work 
(this was likely, because I do not know the operation done inside 

If I know that c = float_of_num is the nearest float, then I can go for
a = x-e and b = x+e with e = x*1e-n with n well chosen.

I think there should be three float_of_num in num.mli:

float_of_num (nearest)
float_of_num_above(nearest above)
float_of_num_bellow (nearest bellow)

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

te'l: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: