1ECVT_R(3)                  Linux Programmer's Manual                 ECVT_R(3)
2
3
4

NAME

6       ecvt_r, fcvt_r, qecvt_r, qfcvt_r - convert a floating-point number to a
7       string
8

SYNOPSIS

10       #include <stdlib.h>
11
12       int ecvt_r(double number, int ndigits, int *restrict decpt,
13                  int *restrict sign, char *restrict buf, size_t len);
14       int fcvt_r(double number, int ndigits, int *restrict decpt,
15                  int *restrict sign, char *restrict buf, size_t len);
16
17       int qecvt_r(long double number, int ndigits, int *restrict decpt,
18                  int *restrict sign, char *restrict buf, size_t len);
19       int qfcvt_r(long double number, int ndigits, int *restrict decpt,
20                  int *restrict sign, char *restrict buf, size_t len);
21
22   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
23
24       ecvt_r(), fcvt_r(), qecvt_r(), qfcvt_r():
25           /* Glibc since 2.19: */ _DEFAULT_SOURCE
26               || /* Glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
27

DESCRIPTION

29       The functions ecvt_r(), fcvt_r(), qecvt_r(), and qfcvt_r() are  identi‐
30       cal  to  ecvt(3), fcvt(3), qecvt(3), and qfcvt(3), respectively, except
31       that they do not return their result in a static  buffer,  but  instead
32       use the supplied buf of size len.  See ecvt(3) and qecvt(3).
33

RETURN VALUE

35       These functions return 0 on success, and -1 otherwise.
36

ATTRIBUTES

38       For  an  explanation  of  the  terms  used  in  this  section,  see at‐
39       tributes(7).
40
41       ┌────────────────────────────────────────────┬───────────────┬─────────┐
42Interface                                   Attribute     Value   
43       ├────────────────────────────────────────────┼───────────────┼─────────┤
44ecvt_r(), fcvt_r(), qecvt_r(), qfcvt_r()    │ Thread safety │ MT-Safe │
45       └────────────────────────────────────────────┴───────────────┴─────────┘
46

CONFORMING TO

48       These functions are GNU extensions.
49

NOTES

51       These functions are obsolete.  Instead, sprintf(3) is recommended.
52

SEE ALSO

54       ecvt(3), qecvt(3), sprintf(3)
55

COLOPHON

57       This page is part of release 5.13 of the Linux  man-pages  project.   A
58       description  of  the project, information about reporting bugs, and the
59       latest    version    of    this    page,    can     be     found     at
60       https://www.kernel.org/doc/man-pages/.
61
62
63
64GNU                               2021-03-22                         ECVT_R(3)
Impressum