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] string_of_float -> float_of_string locale dependency bug
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-06-14 (16:04)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] string_of_float -> float_of_string locale dependency bug
> Another approach: write own strtod function which doesn't depend on
> the LC_NUMERIC locale.

Of course, having our own string <-> float conversions would work
around this issue and other issues as well, such as the inability of
the C library functions to print a float *exactly* (i.e. with just
enough decimals that it reads back to the very same float).

This is no small undertaking, however, and one has a feeling of
reinventing the wheel.

The ANSI C standard library is quite small to begin with, but the
addition of locales managed to render it even less useful...

- Xavier Leroy

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