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> πŸ“š


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