INFINITY(3)

๐Ÿ’– INFINITY(3) ๐Ÿ’–

okay bestie so this is a manpage from the Library Functions Manual, and it's literally about the floating-point constants: INFINITY, NAN, HUGE_VAL, HUGE_VALF, HUGE_VALL. yes that's five whole macros. we're eating good today. ๐Ÿ“


โœจ NAME โœจ

INFINITY, NAN, HUGE_VAL, HUGE_VALF, HUGE_VALL โ€” floating-point constants ๐Ÿ‘‘


๐ŸŒธ LIBRARY ๐ŸŒธ

Math library (libm) ๐Ÿงฎ


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

#define _ISOC99_SOURCE      /* See feature_test_macros(7) */
#include <math.h>

INFINITY

NAN

HUGE_VAL
HUGE_VALF
HUGE_VALL

๐Ÿ’… DESCRIPTION ๐Ÿ’…

so basically. the macro INFINITY expands to a float constant that represents positive infinity. yes. infinity. the whole thing. no cap. โ™พ๏ธ

the macro NAN expands to a float constant representing a quiet NaN (when supported, okay, when supported ๐Ÿ™ˆ). and a quiet NaN is a NaN โ€” that's "not-a-number" โ€” that does not raise exceptions when it's used in arithmetic. the opposite of that is a signaling NaN, which is the loud dramatic one. see IEC 60559:1989 for the full lore. ๐Ÿ“š

the macros HUGE_VAL, HUGE_VALF, and HUGE_VALL expand to constants of types double, float, and long double respectively, and they represent a large positive value โ€” possibly positive infinity. so like, "big" or "BIG big", whichever the implementation vibes with. ๐Ÿ”ฅ


๐Ÿ‘‘ STANDARDS ๐Ÿ‘‘

C11. periodt. ๐Ÿ’–


๐ŸŒˆ HISTORY ๐ŸŒˆ

C99, bestie. that's when this whole thing showed up. ๐Ÿซถ

on a glibc system, the macro HUGE_VAL is always available, like the main character it is. but availability of the NAN macro can be tested using #ifdef NAN, and similarly for INFINITY, HUGE_VALF, and HUGE_VALL โ€” you gotta vibe check them one by one, iykyk. ๐Ÿ‘€

they will be defined by <math.h> if _ISOC99_SOURCE or _GNU_SOURCE is defined, or if __STDC_VERSION__ is defined and has a value not less than 199901L. so many ways to get in, all valid. slay. โœจ


๐Ÿ’œ SEE ALSO ๐Ÿ’œ


remember, NAN = quiet, exceptions not raised. don't come for her, she's not here for drama. ๐Ÿ˜ญ

mwah โ€” this was pulled from Linux man-pages 6.20, dated 2026-02-08, and it's the INFINITY(3) page. love her, obsessed, bye 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: Linux-man-pages-copyleft
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms