gettimeofday: port recent C++ fix to Emacs
[gnulib.git] / doc / posix-functions / strtod.texi
1 @node strtod
2 @section @code{strtod}
3 @findex strtod
4
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/strtod.html}
6
7 Gnulib module: strtod or strtod-obsolete
8
9 Portability problems fixed by either Gnulib module @code{strtod} or @code{strtod-obsolete}:
10 @itemize
11 @item
12 This function mis-parses strings with leading @samp{+} on some old platforms:
13 Old versions of Linux.
14
15 @item
16 This function returns a wrong end pointer on some old platforms.
17
18 @item
19 This function consumes whitespace even when there is nothing that should
20 be parsed on some platforms:
21 IRIX 6.5, OSF/1 5.1.
22
23 @item
24 This function allows whitespace between @samp{e} and the exponent on
25 some platforms:
26 HP-UX 11.11, IRIX 6.5, OSF/1 4.0.
27
28 @item
29 This function returns the wrong end pointer for @samp{-0x} on some
30 platforms:
31 glibc 2.4, Mac OS X 10.5, FreeBSD 6.2, AIX 7.1, Cygwin < 1.5.25-11.
32
33 @item
34 This function returns +0.0 (not @minus{}0.0) for @samp{-0} on some platforms:
35 IRIX 6.5, OSF/1 4.0.
36
37 @item
38 This function fails to parse Infinities and plain NaNs on some platforms:
39 OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 9, mingw, MSVC 9.
40
41 @item
42 This function fails to parse @samp{NaN()} on some platforms:
43 glibc-2.3.6, Mac OS X 10.5, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Cygwin < 1.5.25-11, mingw, MSVC 9.
44
45 @item
46 This function fails to parse @samp{NaN(@var{n-char-sequence})} on some
47 platforms:
48 OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw, MSVC 9.
49
50 @item
51 This function parses @samp{NaN(@var{n-char-sequence})}, but returns
52 the wrong end pointer on some platforms:
53 glibc-2.4, AIX 7.1.
54
55 @item
56 This function fails to parse C99 hexadecimal floating point on some
57 platforms:
58 NetBSD 5.0, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1,
59 Solaris 11 2011-11, mingw, MSVC 9.
60
61 @item
62 This function returns the wrong end pointer for @samp{0x1p} on some
63 platforms:
64 AIX 7.1.
65 @end itemize
66
67 Portability problems fixed by Gnulib module @code{strtod-obsolete}:
68 @itemize
69 @item
70 This function is missing on some old platforms.
71 @end itemize
72
73 Portability problems not fixed by Gnulib:
74 @itemize
75 @item
76 This function returns +0.0 (not @minus{}0.0) for negative underflow on some
77 platforms:
78 glibc 2.7, Cygwin 1.5.x, mingw, MSVC 9.
79
80 @item
81 This function cannot distinguish between ``nan'' and ``-nan'' on some
82 platforms:
83 glibc 2.7, IRIX 6.5, OSF/1 5.1, mingw, MSVC 9.
84
85 @item
86 This function fails to correctly parse very long strings on some
87 platforms:
88 Mac OS X 10.5, FreeBSD 6.2, NetBSD 5.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9.
89
90 @item
91 The replacement function does not always return correctly rounded results.
92 @end itemize