The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

strtod (3)
  • strtod (3) ( Solaris man: Библиотечные вызовы )
  • >> strtod (3) ( FreeBSD man: Библиотечные вызовы )
  • strtod (3) ( Русские man: Библиотечные вызовы )
  • strtod (3) ( Linux man: Библиотечные вызовы )
  • strtod (3) ( POSIX man: Библиотечные вызовы )

  • BSD mandoc
     

    NAME

    
    
    strtod , strtof , strtold
    
     - convert
    
    ASCII
    
    string to floating point
     
    

    LIBRARY

    Lb libc
    
     
    

    SYNOPSIS

       #include <stdlib.h>
    double strtod (const char * restrict nptr char ** restrict endptr);
    float strtof (const char * restrict nptr char ** restrict endptr);
    long double strtold (const char * restrict nptr char ** restrict endptr);
     

    DESCRIPTION

    These conversion functions convert the initial portion of the string pointed to by Fa nptr to Vt double , Vt float , and Vt long double representation, respectively.

    The expected form of the string is an optional plus (``+'') or minus sign (``-'') followed by either:

    In both cases, the significand may be optionally followed by an exponent. An exponent consists of an ``E'' or ``e'' (for decimal constants) or a ``P'' or ``p'' (for hexadecimal constants), followed by an optional plus or minus sign, followed by a sequence of decimal digits. For decimal constants, the exponent indicates the power of 10 by which the significand should be scaled. For hexadecimal constants, the scaling is instead done by powers of 2.

    Alternatively, if the portion of the string following the optional plus or minus sign begins with ``INFINITY'' or ``NAN'', ignoring case, it is interpreted as an infinity or a quiet NaN, respectively.

    In any of the above cases, leading white-space characters in the string (as defined by the isspace(3) function) are skipped. The decimal point character is defined in the program's locale (category LC_NUMERIC )  

    RETURN VALUES

    The strtod (,);
    strtof (,);
    and strtold ();
    functions return the converted value, if any.

    If Fa endptr is not NULL a pointer to the character after the last character used in the conversion is stored in the location referenced by Fa endptr .

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

    If the correct value would cause overflow, plus or minus HUGE_VAL HUGE_VALF or HUGE_VALL is returned (according to the sign and type of the return value), and Er ERANGE is stored in errno If the correct value would cause underflow, zero is returned and Er ERANGE is stored in errno  

    ERRORS

    Bq Er ERANGE
    Overflow or underflow occurred.

     

    SEE ALSO

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

    STANDARDS

    The strtod ();
    function conforms to St -isoC-99 , with the exception of the bug noted below.  

    AUTHORS

    The author of this software is An David M. Gay .

    Copyright (c) 1998 by Lucent Technologies
    All Rights Reserved
    
    Permission to use, copy, modify, and distribute this software and
    its documentation for any purpose and without fee is hereby
    granted, provided that the above copyright notice appear in all
    copies and that both that the copyright notice and this
    permission notice and warranty disclaimer appear in supporting
    documentation, and that the name of Lucent or any of its entities
    not be used in advertising or publicity pertaining to
    distribution of the software without specific, written prior
    permission.
    
    LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
    IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
    SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
    IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
    THIS SOFTWARE.
    
     

    BUGS

    These routines do not recognize the C99 ``NaN(...)'' syntax.


     

    Index

    NAME
    LIBRARY
    SYNOPSIS
    DESCRIPTION
    RETURN VALUES
    ERRORS
    SEE ALSO
    STANDARDS
    AUTHORS
    BUGS


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру