qecvt(3)
β¨ qecvt β convert a floating-point number to a string β¨
okay bestie, pull up a chair π«Ά this one's from the Library Functions Manual section 3 of the manual, and it is lowkey a fossil. but we're gonna learn it anyway because i love you π
π¦ NAME π¦
qecvt, qfcvt, qgcvt β convert a floating-point number to a string
π LIBRARY π
Standard C library (libc, -lc)
πΈ SYNOPSIS πΈ
#include <stdlib.h>
[[deprecated]] char *qecvt(long double number, int ndigits,
int *restrict decpt, int *restrict sign);
[[deprecated]] char *qfcvt(long double number, int ndigits,
int *restrict decpt, int *restrict sign);
[[deprecated]] char *qgcvt(long double number, int ndigit, char *buf);
π Feature Test Macro Requirements for glibc π
(if you don't know what a feature test macro is, go read feature_test_macros(7), it's giving β¨required readingβ¨)
qecvt(),qfcvt(),qgcvt():- Since glibc 2.19:
_DEFAULT_SOURCE
- In glibc up to and including 2.19:
_SVID_SOURCE
- Since glibc 2.19:
bestie. all three of these are [[deprecated]]. that's in the synopsis, not me being dramatic. π
π DESCRIPTION π
okay so here's the tea, and it's honestly so simple it's almost funny:
The functions qecvt(), qfcvt(), and qgcvt() are identical to ecvt(3), fcvt(3), and gcvt(3) respectively, except that they use a long double argument number. π
That's it. That's the whole plot. The q is just the "long double era" version of the same trio. Go see ecvt(3) and gcvt(3) for the actual vibes of what they do.
π§ ATTRIBUTES π§
For an explanation of the terms used in this section, see attributes(7). (iykyk π)
qecvt()β Thread safety:MT-Unsafe race:qecvtqfcvt()β Thread safety:MT-Unsafe race:qfcvtqgcvt()β Thread safety:MT-Safe
notqecvt()andqfcvt()being unsafe in a race whileqgcvt()is out here being the well-behaved one π slay i guess,qgcvt().
π STANDARDS π
None.
like. none. the standards committee said "who?" π
π HISTORY π
SVr4, SunOS, GNU.
These functions are obsolete. Instead, snprintf(3) is recommended.
periodt. π
if you were about to use these in new code: don't, bestie. use snprintf(3). i'm literally begging π₯Ί
π₯ SEE ALSO π₯
and that's the whole page!! you absolutely ate that read, no cap π this was Linux man-pages 6.20, dated 2026-02-08, and it lives on your system as qecvt(3). go forth and use snprintf(3) instead, mwah ππ¦β¨
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 2002, Andries E. Brouwer <aeb@cwi.nl>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms