logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

atof - convert a string to a double

Attributes

       For an explanation of the terms used in this section, see attributes(7).
       ┌──────────────────────────────────────────────────────────────────────┬───────────────┬────────────────┐
       │ InterfaceAttributeValue          │
       ├──────────────────────────────────────────────────────────────────────┼───────────────┼────────────────┤
       │ atof()                                                               │ Thread safety │ MT-Safe locale │
       └──────────────────────────────────────────────────────────────────────┴───────────────┴────────────────┘

Description

       The  atof()  function  converts  the  initial  portion  of  the string pointed to by nptr to double.  The
       behavior is the same as

           strtod(nptr, NULL);

       except that atof() does not detect errors.

History

       POSIX.1-2001, C89, C99, SVr4, 4.3BSD.

Library

       Standard C library (libc, -lc)

Name

       atof - convert a string to a double

Return Value

       The converted value.

See Also

atoi(3), atol(3), strfromd(3), strtod(3), strtol(3), strtoul(3)

Linux man-pages 6.9.1                              2024-05-02                                            atof(3)

Standards

       C11, POSIX.1-2008.

Synopsis

#include<stdlib.h>doubleatof(constchar*nptr);
return

See Also