The strtod function converts string into
a floating-point value. The input string is a sequence of characters
that can be interpreted as a floating-point number. Whitespace
characters at the beginning of string are
skipped.
The value of *ptr is set to point to the first
character in string immediately following the
converted part of string. If ptr is NULL, no value is assigned to *ptr. If no conversion is possible, *ptr
is set to the value of string and the value 0 is
returned by the strtod function.
The strtod function requires string to have the following
format:
〚{+|-}〛 digits 〚.digits〛 〚{e|E} 〚{+|-}〛 digits〛
Where
digits
May be one or more decimal digits (0-9).
Return Value
The strtod function returns the floating-point value that
is produced by interpreting the characters in the string as a floating-point number.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.