strtod(3C)
_________________________________________________________________
strtod
Convert a string to a double-precision floating-point number.
_________________________________________________________________
Calling Sequence
double strtod();
double x;
char *str, **ptr;
x = strtod(str, ptr);
Description
Use the strtod function to convert an ASCII string into a
double-precision floating-point number. The strtod function
recognizes the following values:
* An optional string of whitespace characters.
* An optional sign ( + or - ).
* A string of digits with an optional decimal point.
* An optional E or e, followed by an optional sign or space,
followed by an integer exponent. Conversion stops when
strtod encounters an invalid character.
The include file dg_stdio.h defines this function.
Returns
If the value of ptr is not (char **)NULL, strtod returns a
pointer to the character that terminates the scan. It returns
this pointer to the location that ptr points to.
If the floating-point value would cause overflow, strtod returns
+HUGE (depending on the sign of the value), and sets errno to
ERANGE. If the value would cause floating-point underflow,
strtod returns zero and sets errno to ERANGE.
Related Functions
See also the atof, sscanf, and strtol functions.
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)