HP-UX 11i Version 1.5 Release Notes, September 2001

Programming
Changes to libc
Chapter 796
to HP-UX 11.0), or, alternatively, with -D_LONG_DOUBLE_STRUCT added to
the compile command.
The HP-UX 11i Version 1.5 (B.11.20) <stdlib.h> header, under the
__ia64 and _INCLUDE_HPUX_SOURCE switches, declares the new function:
extern float strtof(const char *, char **);
and, when compiled with the -fpwidetypes options, also declares these
new functions:
extern __float128 strtoq(const char *, char **);
extern __float80 strtow(const char *, char **);
extern char *_extecvt(__float80, int, int *, int *);
extern char *_extfcvt(__float80, int, int *, int *);
extern int _extecvt_r(__float80, int, int *, int *, char *,
int);
extern int _extfcvt_r(__float80, int, int *, int *, char *,
int);
all of which are defined in libc.
strtoq() is equivalent to strtold()
strtof() and strtow() are float and extended (80-bit
floating-point) versions, respectively, of strtod()
_extecvt(), _extfcvt(), and _extgcvt() are extended versions
of ecvt(), fcvt(), and gcvt() respectively
_extecvt_r() and _extfcvt_r() are extended versions of the
reentrant ecvt_r() and fcvt_r() respectively
The routines which convert between decimal strings representing
floating-point numbers and internal binary floating-point formats are
correctly rounded according to the specification in ISO/IEC C99, to 36
significant decimal digits. (36 is the smallest number of digits that will
distinguish all the numeric values in the 128-bit long double type.)
Corresponding HP-UX 11i routines do not round correctly to the last bit
or digit in all cases. The HP-UX 11i Version 1.5 (B.11.20)
binary-to-decimal conversion (used by printf) produces zeros after the
36th significant digit, for all floating-point precisions; this differs from
the HP-UX 11i conversion which produces zeros after the 17th
significant digit in double and after the 33rd significant digit in long
double.
The long double strtold function for overflow cases returns the value