mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-10 07:10:06 +00:00
float128: Add strfromf128, strtof128, and wcstof128 to the manual
* manual/math.texi (Mathematics): Add description for _FloatN and _FloatNx types and mentions that they are not support in glibc for any architecture, so far. * manual/arith.texi (wcstof, wcstold): Replace the mention to stdlib.h with wchar.h. (Parsing of Floats): Add descriptions for strtofN and wcstofN. (Printing of Floats): Add description for strfromfN.
This commit is contained in:
parent
45f39d4588
commit
7d641c411d
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2017-06-12 Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
|
||||||
|
|
||||||
|
* manual/math.texi (Mathematics): Add description for _FloatN and
|
||||||
|
_FloatNx types and mentions that they are not support in glibc for
|
||||||
|
any architecture, so far.
|
||||||
|
* manual/arith.texi (wcstof, wcstold): Replace the mention to
|
||||||
|
stdlib.h with wchar.h.
|
||||||
|
(Parsing of Floats): Add descriptions for strtofN and wcstofN.
|
||||||
|
(Printing of Floats): Add description for strfromfN.
|
||||||
|
|
||||||
2017-06-12 Paul E. Murphy <murphyp@linux.vnet.ibm.com>
|
2017-06-12 Paul E. Murphy <murphyp@linux.vnet.ibm.com>
|
||||||
Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
|
Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
|
||||||
Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
|
Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
|
||||||
|
@ -2980,6 +2980,7 @@ examining @var{errno} and @var{tailptr}.
|
|||||||
@comment ISO
|
@comment ISO
|
||||||
@deftypefunx {long double} strtold (const char *@var{string}, char **@var{tailptr})
|
@deftypefunx {long double} strtold (const char *@var{string}, char **@var{tailptr})
|
||||||
@safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}}
|
@safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}}
|
||||||
|
@comment See safety comments for strtod.
|
||||||
These functions are analogous to @code{strtod}, but return @code{float}
|
These functions are analogous to @code{strtod}, but return @code{float}
|
||||||
and @code{long double} values respectively. They report errors in the
|
and @code{long double} values respectively. They report errors in the
|
||||||
same way as @code{strtod}. @code{strtof} can be substantially faster
|
same way as @code{strtod}. @code{strtof} can be substantially faster
|
||||||
@ -2990,23 +2991,52 @@ double} is a separate type).
|
|||||||
These functions have been GNU extensions and are new to @w{ISO C99}.
|
These functions have been GNU extensions and are new to @w{ISO C99}.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
||||||
|
@comment stdlib.h
|
||||||
|
@comment ISO/IEC TS 18661-3
|
||||||
|
@deftypefun _FloatN strtofN (const char *@var{string}, char **@var{tailptr})
|
||||||
|
@comment stdlib.h
|
||||||
|
@comment ISO/IEC TS 18661-3
|
||||||
|
@deftypefunx _FloatNx strtofNx (const char *@var{string}, char **@var{tailptr})
|
||||||
|
@safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}}
|
||||||
|
@comment See safety comments for strtod.
|
||||||
|
These functions are like @code{strtod}, except for the return type.
|
||||||
|
|
||||||
|
They were introduced in @w{ISO/IEC TS 18661-3} and are available on machines
|
||||||
|
that support the related types; @pxref{Mathematics}.
|
||||||
|
@end deftypefun
|
||||||
|
|
||||||
@comment wchar.h
|
@comment wchar.h
|
||||||
@comment ISO
|
@comment ISO
|
||||||
@deftypefun double wcstod (const wchar_t *restrict @var{string}, wchar_t **restrict @var{tailptr})
|
@deftypefun double wcstod (const wchar_t *restrict @var{string}, wchar_t **restrict @var{tailptr})
|
||||||
@comment stdlib.h
|
@comment wchar.h
|
||||||
@comment ISO
|
@comment ISO
|
||||||
@deftypefunx float wcstof (const wchar_t *@var{string}, wchar_t **@var{tailptr})
|
@deftypefunx float wcstof (const wchar_t *@var{string}, wchar_t **@var{tailptr})
|
||||||
@comment stdlib.h
|
@comment wchar.h
|
||||||
@comment ISO
|
@comment ISO
|
||||||
@deftypefunx {long double} wcstold (const wchar_t *@var{string}, wchar_t **@var{tailptr})
|
@deftypefunx {long double} wcstold (const wchar_t *@var{string}, wchar_t **@var{tailptr})
|
||||||
|
@comment wchar.h
|
||||||
|
@comment GNU
|
||||||
|
@deftypefunx _FloatN wcstofN (const wchar_t *@var{string}, wchar_t **@var{tailptr})
|
||||||
|
@comment wchar.h
|
||||||
|
@comment GNU
|
||||||
|
@deftypefunx _FloatNx wcstofNx (const wchar_t *@var{string}, wchar_t **@var{tailptr})
|
||||||
@safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}}
|
@safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}}
|
||||||
The @code{wcstod}, @code{wcstof}, and @code{wcstol} functions are
|
@comment See safety comments for strtod.
|
||||||
equivalent in nearly all aspect to the @code{strtod}, @code{strtof}, and
|
The @code{wcstod}, @code{wcstof}, @code{wcstol}, @code{wcstof@var{N}},
|
||||||
@code{strtold} functions but it handles wide character string.
|
and @code{wcstof@var{N}x} functions are equivalent in nearly all aspects
|
||||||
|
to the @code{strtod}, @code{strtof}, @code{strtold},
|
||||||
|
@code{strtof@var{N}}, and @code{strtof@var{N}x} functions, but they
|
||||||
|
handle wide character strings.
|
||||||
|
|
||||||
The @code{wcstod} function was introduced in @w{Amendment 1} of @w{ISO
|
The @code{wcstod} function was introduced in @w{Amendment 1} of @w{ISO
|
||||||
C90}. The @code{wcstof} and @code{wcstold} functions were introduced in
|
C90}. The @code{wcstof} and @code{wcstold} functions were introduced in
|
||||||
@w{ISO C99}.
|
@w{ISO C99}.
|
||||||
|
|
||||||
|
The @code{wcstof@var{N}} and @code{wcstof@var{N}x} functions are not in
|
||||||
|
any standard, but are added to provide completeness for the
|
||||||
|
non-deprecated interface of wide character string to floating-point
|
||||||
|
conversion functions. They are only available on machines that support
|
||||||
|
the related types; @pxref{Mathematics}.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
||||||
@comment stdlib.h
|
@comment stdlib.h
|
||||||
@ -3033,11 +3063,15 @@ The @samp{strfrom} functions are declared in @file{stdlib.h}.
|
|||||||
@comment stdlib.h
|
@comment stdlib.h
|
||||||
@comment ISO/IEC TS 18661-1
|
@comment ISO/IEC TS 18661-1
|
||||||
@deftypefun int strfromd (char *restrict @var{string}, size_t @var{size}, const char *restrict @var{format}, double @var{value})
|
@deftypefun int strfromd (char *restrict @var{string}, size_t @var{size}, const char *restrict @var{format}, double @var{value})
|
||||||
|
@comment stdlib.h
|
||||||
|
@comment ISO/IEC TS 18661-1
|
||||||
@deftypefunx int strfromf (char *restrict @var{string}, size_t @var{size}, const char *restrict @var{format}, float @var{value})
|
@deftypefunx int strfromf (char *restrict @var{string}, size_t @var{size}, const char *restrict @var{format}, float @var{value})
|
||||||
|
@comment stdlib.h
|
||||||
|
@comment ISO/IEC TS 18661-1
|
||||||
@deftypefunx int strfroml (char *restrict @var{string}, size_t @var{size}, const char *restrict @var{format}, long double @var{value})
|
@deftypefunx int strfroml (char *restrict @var{string}, size_t @var{size}, const char *restrict @var{format}, long double @var{value})
|
||||||
@safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
|
@safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
|
||||||
@comment these functions depend on __printf_fp and __printf_fphex, which are
|
@comment All these functions depend on both __printf_fp and __printf_fphex,
|
||||||
@comment AS-unsafe (ascuheap) and AC-unsafe (acsmem).
|
@comment which are both AS-unsafe (ascuheap) and AC-unsafe (acsmem).
|
||||||
The functions @code{strfromd} (``string-from-double''), @code{strfromf}
|
The functions @code{strfromd} (``string-from-double''), @code{strfromf}
|
||||||
(``string-from-float''), and @code{strfroml} (``string-from-long-double'')
|
(``string-from-float''), and @code{strfroml} (``string-from-long-double'')
|
||||||
convert the floating-point number @var{value} to a string of characters and
|
convert the floating-point number @var{value} to a string of characters and
|
||||||
@ -3064,6 +3098,21 @@ has been completely written if and only if the returned value is less than
|
|||||||
These functions were introduced by ISO/IEC TS 18661-1.
|
These functions were introduced by ISO/IEC TS 18661-1.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
||||||
|
@comment stdlib.h
|
||||||
|
@comment ISO/IEC TS 18661-3
|
||||||
|
@deftypefun int strfromfN (char *restrict @var{string}, size_t @var{size}, const char *restrict @var{format}, _Float@var{N} @var{value})
|
||||||
|
@comment stdlib.h
|
||||||
|
@comment ISO/IEC TS 18661-3
|
||||||
|
@deftypefunx int strfromfNx (char *restrict @var{string}, size_t @var{size}, const char *restrict @var{format}, _Float@var{N}x @var{value})
|
||||||
|
@safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
|
||||||
|
@comment See safety comments for strfromd.
|
||||||
|
These functions are like @code{strfromd}, except for the type of
|
||||||
|
@code{value}.
|
||||||
|
|
||||||
|
They were introduced in @w{ISO/IEC TS 18661-3} and are available on machines
|
||||||
|
that support the related types; @pxref{Mathematics}.
|
||||||
|
@end deftypefun
|
||||||
|
|
||||||
@node System V Number Conversion
|
@node System V Number Conversion
|
||||||
@section Old-fashioned System V number-to-string functions
|
@section Old-fashioned System V number-to-string functions
|
||||||
|
|
||||||
|
@ -53,6 +53,17 @@ usually wise to pick the narrowest type that can accommodate your data.
|
|||||||
Not all machines have a distinct @code{long double} type; it may be the
|
Not all machines have a distinct @code{long double} type; it may be the
|
||||||
same as @code{double}.
|
same as @code{double}.
|
||||||
|
|
||||||
|
On some machines, @theglibc{} also provides @code{_Float@var{N}} and
|
||||||
|
@code{_Float@var{N}x} types. These types are defined in @w{ISO/IEC TS
|
||||||
|
18661-3}, which extends @w{ISO C} and defines floating-point types that
|
||||||
|
are not machine-dependent. When such a type, such as @code{_Float128},
|
||||||
|
is supported by @theglibc{}, extra variants for most of the mathematical
|
||||||
|
functions provided for @code{double}, @code{float}, and @code{long
|
||||||
|
double} are also provided for the supported type.
|
||||||
|
|
||||||
|
Currently, support for @code{_Float@var{N}} or @code{_Float@var{N}x}
|
||||||
|
types is not provided for any machine.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Mathematical Constants:: Precise numeric values for often-used
|
* Mathematical Constants:: Precise numeric values for often-used
|
||||||
constants.
|
constants.
|
||||||
|
Loading…
Reference in New Issue
Block a user