FREXP(3POSIX)
π FREXP(3POSIX) β the POSIX Programmer's Manual, but make it cute π
okay bestie, welcome to FREXP(3POSIX), part of the POSIX Programmer's Manual. grab a boba, we're doing floating-point math πΈ
π¨ PROLOG (read this first, fr fr)
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ β so like, consult the corresponding Linux manual page for the deets on Linux behavior β or honestly the interface might not even be implemented on Linux at all. π
β¨ NAME β¨
frexp, frexpf, frexpl β extract mantissa and exponent from a double precision number π«Ά
π SYNOPSIS π
#include <math.h>
double frexp(double num, int *exp);
float frexpf(float num, int *exp);
long double frexpl(long double num, int *exp);
three whole flavors of the same vibe, pick your precision babes π
π DESCRIPTION π
The functionality described on this reference page is aligned with the ISO C standard. Any conflict between the requirements described here and the ISO C standard is unintentional β no drama intended, it's giving "we defer". 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. so like, you hand it a number and a lil pointer, and it splits the number into "the cute part" and "the power-of-two part" β¨
π 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.
- If
numisNaN, aNaNshall be returned, and the value of*expis unspecified. π - If
numisΒ±0,Β±0shall be returned, and the value of*expshall be0. - If
numisΒ±Inf,numshall be returned, and the value of*expis unspecified. π
bestie, "unspecified" means the standard is NOT promising you anything about *exp in those cases. do not go reading it and assuming. that's not the move. π«
π ERRORS π
No errors are defined. iconic behavior honestly, zero problems, zero notes.
The following sections are informative.
π EXAMPLES π
None. (yes, really. nothing. empty. a void. the silence is loud. π¦)
π§ APPLICATION USAGE π§
None.
π RATIONALE π
None.
πΈ FUTURE DIRECTIONS πΈ
None.
β 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. 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 .
and that's the whole page bestie!! brought to you by IEEE/The Open Group, 2017 β the year this manual was born, which is lowkey ancient but we respect our elders π go forth and split your floats, you're doing amazing sweetie πβ¨
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms