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, a NaN is 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms