FMIN(3POSIX)
β¨ PROLOG β¨
okay bestie, real talk before we get into it π this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (so like, pls go consult the corresponding Linux manual page for the deets on Linux behavior), or β and this is the messy part β the interface may not even be implemented on Linux at all. π no cap.
π NAME π
fmin, fminf, fminl β determine minimum numeric value of two floating-point numbers
so like, it's giving "which of u two is smaller" but for floats. icon behavior.
πΈ SYNOPSIS πΈ
#include <math.h>
double fmin(double x, double y);
float fminf(float x, float y);
long double fminl(long double x, long double y);
three versions, one vibe: double, float, long double. pick ur fighter. π«Ά
π¦ DESCRIPTION π¦
okay so 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 β like, not on purpose, we promise π. This volume of POSIX.1β2017 defers to the ISO C standard.
These functions shall determine the minimum numeric value of their arguments.
and here's the β¨main characterβ¨ plot twist: NaN arguments shall be treated as missing data. so if one argument is a NaN and the other one is numeric? these functions shall choose the numeric value. the NaN just gets politely ignored. it's giving "we don't see her, she's not here". π
π RETURN VALUE π
Upon successful completion, these functions shall return the minimum numeric value of their arguments.
- If just one argument is a NaN, the other argument shall be returned.
- If
xandyare NaN, a NaN shall be returned.
so like: one NaN β the real one wins π. both NaN β NaN, because there's literally nothing else to give you, bestie.
π ERRORS π
No errors are defined.
The following sections are informative. (translation: the rest is bonus lore, not the rulebook π)
π EXAMPLES π
None.
π APPLICATION USAGE π
None.
π RATIONALE π
None.
β FUTURE DIRECTIONS β
None.
π₯ SEE ALSO π₯
fdim()fmax()
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. (yes, the original is the one holding the whistle π³οΈ)
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 .
fr fr, if u spot a typo it's probably a conversion glitch, not a plot hole. report it at the link above, mwah π
okay that's the whole page bestie, tysm for reading π«Ά this iconic little number came to you from IEEE/The Open Group, 2017, filed under FMIN(3POSIX). stan a float minimum. periodt. π
β¨
π¦ 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