Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] floating point input/conversion
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stefan Ratschan <stefan.ratschan@m...>
Subject: [Caml-list] floating point input/conversion
For the functions float_of_string and read_float the OCaml manual is
very vague: "Convert the given string to a float".

In fact, this sentence is wrong. For example, the number 0.1 does not
have a floating point representation, only approximations to it.

So what is the exact specification of these functions? Which number is
taken if the given string does not have a floating point representation?
The nearest one? The nearest one up to 2ulps? Is the current rounding
mode taken into account?

Stefan Ratschan



-------------------
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