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] 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: 2004-10-22 (09:26)
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 Archives:
Bug reports: FAQ:
Beginner's list: