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 ๐
fpclassify(3)โ the classification bestie ๐งmath_error(7)โ when math goes wrong ๐
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
- Copyright 2004, Andries E. Brouwer <aeb@cwi.nl>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms