FREXP(3P)
β¨ FREXP(3P) β the POSIX girlie's guide β¨
okay so bestie, this is a page from the POSIX Programmer's Manual π (yes, that POSIX, the one that's always in the group chat). Heads up tho: the Linux implementation of this interface may be different from what's written here β so if you're on Linux, go check the corresponding Linux manual page for the actual tea. Orβ¦ it might not even be implemented on Linux at all π vibe check failed, sorry.
πΈ PROLOG πΈ
ok so real talk: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (so pls consult the corresponding Linux manual page for the Linux behavior, bestie), or the interface might justβ¦ not be implemented on Linux at all. π
π NAME π
frexp, frexpf, frexpl β extract mantissa and exponent from a double precision number β¨ (it's giving "math girlie takes a number apart and shows you its bones", we love her)
π SYNOPSIS π
#include <math.h>
double frexp(double num, int *exp);
float frexpf(float num, int *exp);
long double frexpl(long double num, int *exp);
π¦ DESCRIPTION π¦
okay so the functionality described on this reference page is aligned with the ISO C standard. If there's any conflict between what's required here and what the ISO C standard says, that conflict is unintentional β not a girlboss move, just an oopsie. This volume of POSIX.1β2017 defers to the ISO C standard, periodt.
These functions shall break a floating-point number num into a normalized fraction and an integral power of 2. The integer exponent shall be stored in the int object pointed to by exp. π«Ά
π₯ RETURN VALUE π₯
For finite arguments, these functions shall return the value x, such that x has a magnitude in the interval [Β½,1) or 0, and num equals x times 2 raised to the power *exp. (yes that's a half-open interval, no she's not messy, she's precise π
)
- If
numisNaN, aNaNshall be returned, and the value of*expis unspecified π (we simply do not know her) - If
numisΒ±0,Β±0shall be returned, and the value of*expshall be0 - If
numisΒ±Inf,numshall be returned, and the value of*expis unspecified π
π ERRORS π
No errors are defined. Not a single one. She's flawless. β¨
The following sections are informative. (translation: the tea is optional but we're drinking it anyway π)
π EXAMPLES π
None. π (iconic of her honestly)
π APPLICATION USAGE π
None. π§ (again, no notes)
β RATIONALE β
None. π
πΈ FUTURE DIRECTIONS πΈ
None. (she's not going anywhere, she's eternal π)
π«Ά SEE ALSO π«Ά
isnan()ldexp()modf()
The Base Definitions volume of POSIX.1β2017, <math.h> π
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document (she's the main character, no cap). The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format π. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
ngl the only thing I edited was the vibe π every single fact, flag, value and reference is exactly where it was. we do not gatekeep, we do not spread misinformation. periodt.
okay bye bestie, go forth and split those floating-point numbers πβ¨π¦πΈπ
β with love from the IEEE / The Open Group, 2017, page FREXP(3P) π«Άππ
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- 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-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms