ISINF(3P)
π ISINF(3P) β the vibe check for infinity π
okay bestie so this is ISINF(3P) from the POSIX Programmer's Manual and it's literally the cutest little macro whose whole entire job is asking "is this an infinity or not" π¦
πΈ PROLOG πΈ
So this manual page is part of the POSIX Programmer's Manual, periodt. But heads up: the Linux implementation of this interface may differ β so if you're on Linux, go consult the corresponding Linux manual page for the deets on Linux behavior π«Ά. And also. Sometimes. The interface may not be implemented on Linux at all. π No cap, that's just how it is.
β¨ NAME β¨
isinf β test for infinity π
π SYNOPSIS π
#include <math.h>
int isinf(real-floating x);
π DESCRIPTION π
So the functionality described on this reference page is aligned with the ISO C standard. If there's any conflict between what's written here and the ISO C standard, that conflict is unintentional β it's not giving "we meant to do that". This volume of POSIX.1β2017 defers to the ISO C standard, so like, ISO C is the main character here π.
Now the actual tea: the isinf() macro shall determine whether its argument value is an infinity (positive or negative β both count, we don't discriminate π«Ά). First, an argument represented in a format wider than its semantic type is converted to its semantic type. Then the determination is based on the type of the argument. That's it, that's the whole ritual β¨.
π₯ RETURN VALUE π₯
The isinf() macro shall return a non-zero value if and only if its argument has an infinite value. "If and only if" is doing so much work there and honestly? slay. π
π ERRORS π
No errors are defined. Zero. None. Not a single one. π
The following sections are informative β aka they're the bonus content, the little extra chapters π.
π EXAMPLES π
None. π
π§ APPLICATION USAGE π§
None. π¦
π RATIONALE π
None. β¨
β FUTURE DIRECTIONS β
None. π«
π SEE ALSO π
fpclassify()isfinite()isnan()isnormal()signbit()
Also: the Base Definitions volume of POSIX.1β2017, <math.h> π
π COPYRIGHT π
okay so this is the part where we give credit because we're not about that plagiarism life:
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 β it's the one holding the whistle, we're just playing the game π«Ά. 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 .
ngl bestie, if you're gonna remember one thing: non-zero means infinity, zero means not infinity. That's the whole vibe check. π
IEEE/The Open Group β¨ 2017 β¨ ISINF(3P) β okay that's the whole page, love u, go check your floats, mwah ππ¦π
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- 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-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms