icon Top 9 categories map      RocketAware > man pages >


Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.

The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Search all pages


By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Integer, Floating point, Matrix, Statistics, Boolean, ...

Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...


RocketLink!--> Man page versions: OpenBSD FreeBSD RedHat Solaris Others

[ANSI C X3.159-1989]

STRTOD(3)                 OpenBSD Programmer's Manual                STRTOD(3)

     strtod - convert ASCII string to double

     #include <stdlib.h>

     strtod(const char *nptr, char **endptr);

     The strtod() function converts the initial portion of the string pointed
     to by nptr to double representation.

     The expected form of the string is an optional plus (``+'') or minus sign
     (``-'') followed by a sequence of digits optionally containing a decimal-
     point character, optionally followed by an exponent.  An exponent con-
     sists of an ``E'' or ``e'', followed by an optional plus or minus sign,
     followed by a sequence of digits.

     Leading white-space characters in the string (as defined by the iss-
     pace(3) function) are skipped.

     The strtod() function returns the converted value, if any.

     If endptr is not NULL, a pointer to the character after the last charac-
     ter used in the conversion is stored in the location referenced by

     If no conversion is performed, zero is returned and the value of nptr is
     stored in the location referenced by endptr.

     If the correct value would cause overflow, plus or minus HUGE_VAL is re-
     turned (according to the sign of the value), and ERANGE is stored in
     errno. If the correct value would cause underflow, zero is returned and
     ERANGE is stored in errno.

     [ERANGE]      Overflow or underflow occurred.

     atof(3),  atoi(3),  atol(3),  strtol(3),  strtoul(3)

     The strtod() function conforms to ANSI X3.159-1989 (``ANSI C'').

OpenBSD 2.6                      June 29, 1991                               1

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.

(Corrections, notes, and links courtesy of RocketAware.com)

[Detailed Topics]
FreeBSD Sources for strtod(3) functions
OpenBSD sources for strtod(3)

[Overview Topics]

Up to: Floating point math - Floating point math (including complex numbers)
Up to: String-Non-Integer-String conversions - conversion to and from floating point, time, dates, et al.

RocketLink!--> Man page versions: OpenBSD FreeBSD RedHat Solaris Others

[ANSI C X3.159-1989]

Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > strtod.3/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments