fmin(3)
π fmin(3) β the girlies of libm π
okay so bestie, welcome to the fmin(3) page π
this is a manual page from the Library Functions Manual, and honestly? it's giving "tiny but mighty." no cap.
π NAME π
fmin, fminf, fminl β determine minimum of two floating-point numbers
like, it picks the smaller one. that's the whole job. and it does it flawlessly. periodt. β¨
π LIBRARY π
Math library (libm, -lm)
bestie you HAVE to link -lm or she simply will not show up. that's the vibe check. π₯
πΈ 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);
β¨ Feature Test Macro Requirements for glibc (see feature_test_macros(7)): β¨
fmin(), fminf(), fminl():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
no iykyk moment needed, just define one of these if you're on old glibc energy π«Ά
π DESCRIPTION π
These functions return the lesser value of x and y.
that's it. that's the function. she looks at two numbers, she picks the smaller one, she moves on with her day. main character energy, minimal drama, obsessed. π
π RETURN VALUE π
These functions return the minimum of x and y.
and here's the part that's actually kind of iconic:
- If one argument is a
NaN, the other argument is returned.
yes bestie, she's polite. one friend is having a meltdown (NaN) and she just... hands you the other one. no crash, no nonsense. π§
- If both arguments are
NaN, aNaNis returned.
okay if BOTH of them are in their flop era then it's a NaN and that's just what it is π
π ERRORS π
No errors occur.
literally nothing. zero. she does not fail. she does not complain. she simply is. π
β ATTRIBUTES β
For an explanation of the terms used in this section, see attributes(7).
- Interface:
fmin(),fminf(),fminl() - Attribute: Thread safety
- Value:
MT-Safe
so like, throw her in every thread you want, she's MT-Safe, she's not gonna cause chaos, she's a good influence ππ₯
π¦ STANDARDS π¦
C11, POSIX.1-2008.
standardized. official. certified queen behavior. π
π HISTORY π
glibc 2.1. C99, POSIX.1-2001.
she's been around since glibc 2.1 and honestly she's aged like fine wine β¨
πΈ SEE ALSO πΈ
(fmax is her sister. same energy, opposite direction. go say hi π)
no bugs notes here bestie, that section doesn't exist on this page, so don't go looking for tea that isn't there π
that's the whole page, mwah π β with love from Linux man-pages 6.20, dated 2026-02-08, and obvi titled fmin(3). go forth and take the minimum of things, bestie π«Άβ¨
π¦ 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: GPL-1.0-or-later
- Copyright 2002, Walter Harms <walter.harms@informatik.uni-oldenburg.de>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms