ISFINITE(3POSIX)

πŸ’– ISFINITE(3POSIX) πŸ’–

okay bestie, welcome to the POSIX Programmer's Manual page for isfinite β€” yes it's from the POSIX Programmer's Manual, that's the vibe, and we're gonna read it together like it's a group chat πŸ’…


🫢 PROLOG 🫢

so first things first, this manual page is part of the POSIX Programmer's Manual. but like, heads up:

the Linux implementation of this interface may differ (so go check the corresponding Linux manual page for the deets on Linux behavior), or honestly? the interface may just not be implemented on Linux at all. not me being dramatic, that's literally what it says 😭

✨ NAME ✨

isfinite β€” test for finite value. that's it, that's the whole job πŸŽ€


🌸 SYNOPSIS 🌸

#include <math.h>

int isfinite(real-floating x);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so, the functionality described on this reference page is aligned with the ISO C standard. and if there's any conflict between what's written here and the ISO C standard? that conflict is unintentional, fr fr. this volume of POSIX.1‐2017 defers to the ISO C standard. periodt.

the isfinite() macro shall determine whether its argument has a finite value β€” and by finite we mean zero, subnormal, or normal, and not infinite or NaN. slay πŸ’–

here's the order of operations bestie, don't skip it:

  1. first, an argument represented in a format wider than its semantic type is converted to its semantic type.
  2. then the determination is based on the type of the argument.

πŸ”₯ RETURN VALUE πŸ”₯

the isfinite() macro shall return a non-zero value if and only if its argument has a finite value. if-and-only-if, we're being precise here, no vibe-based guessing πŸ‘‘


πŸ’€ ERRORS πŸ’€

no errors are defined. literally none. iconic behavior honestly.

the following sections are informative. (that's manpage-speak for "this part is context, not law", iykyk)


🌈 EXAMPLES 🌈

None.


πŸ“ APPLICATION USAGE πŸ“

None.


🧚 RATIONALE 🧚

None.


⭐ FUTURE DIRECTIONS ⭐

None.


πŸ‘‘ SEE ALSO πŸ‘‘

  • fpclassify()
  • isinf()
  • isnan()
  • isnormal()
  • signbit()

and also: the Base Definitions volume of POSIX.1‐2017, and <math.h> 🌸


okay so legally I have to say all of this and I will say all of it because details are sacred:

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 main character, we're just the narrator).

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 .


and that's the whole page bestie!! brought to you by IEEE/The Open Group, dated 2017, and yeah the page is literally called ISFINITE(3POSIX) β€” go check if your number is finite, stay hydrated, and remember: zero, subnormal and normal are all valid and finite. you're doing amazing πŸ’–βœ¨πŸŽ€