ISUNORDERED(3P)

πŸ’– ISUNORDERED(3P) β€” the POSIX Programmer's Manual, bestie edition πŸ’–

okay so real quick before we get into it: this page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ β€” so like, go check the corresponding Linux manual page for the deets on Linux behavior. Or, plot twist, the interface might not even be implemented on Linux at all. πŸ™ˆ just a heads up, queen.


✨ NAME ✨

isunordered β€” test if arguments are unordered


πŸŽ€ SYNOPSIS πŸŽ€

#include <math.h>

int isunordered(real-floating x, real-floating y);

πŸ¦‹ DESCRIPTION πŸ¦‹

So the functionality on this reference page is aligned with the ISO C standard. If there's any conflict between what's described here and the ISO C standard, that conflict is unintentional, okay? No drama intended. This volume of POSIX.1‐2017 defers to the ISO C standard. periodt.

The isunordered() macro shall determine whether its arguments are unordered. that's the whole vibe check. πŸ’…


🌸 RETURN VALUE 🌸

Upon successful completion, the isunordered() macro shall return 1 if its arguments are unordered, and 0 otherwise. simple as that, no notes.

And if x or y is NaN? 1 shall be returned. because NaN said "i don't do ordered relationships bestie". 😭


πŸ’€ ERRORS πŸ’€

No errors are defined. literally zero. we're unbothered, moisturized, in our lane.

The following sections are informative. πŸ‘‘


πŸ“ EXAMPLES πŸ“

None. (iconic of them honestly β€” no example needed, the macro speaks for itself.)


🧚 APPLICATION USAGE 🧚

okay this part is actually so important, listen up. πŸ‘‚

The relational and equality operators support the usual mathematical relationships between numeric values. For any ordered pair of numeric values, exactly one of the relationships (less, greater, and equal) is true. no overlap, no chaos, one winner.

But β€” and here's the plot twist β€” relational operators may raise the invalid floating-point exception when argument values are NaNs. 😱 For a NaN and a numeric value, or for two NaNs, just the unordered relationship is true.

This macro is a quiet (non-floating-point exception raising) version of a relational operator. it's giving "i can do the same thing but without the drama." It facilitates writing efficient code that accounts for NaNs without suffering the invalid floating-point exception. so efficient, so clean, so slay. πŸ’–

And in the SYNOPSIS section, real-floating indicates that the argument shall be an expression of real-floating type. don't forget that, iykyk. 🌈


πŸ‘‘ RATIONALE πŸ‘‘

None.


⭐ FUTURE DIRECTIONS ⭐

None.


πŸ’œ SEE ALSO πŸ’œ

  • isgreater()
  • isgreaterequal()
  • isless()
  • islessequal()
  • islessgreater()

And the Base Definitions volume of POSIX.1‐2017, <math.h> β€” go read it, bestie, it's the lore. πŸ“šβœ¨


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. 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 .


IEEE/The Open Group Β· 2017 Β· ISUNORDERED(3P) β€” and that's the whole page bestie, mwah πŸ’‹βœ¨ stay unordered, stay unbothered πŸ¦‹πŸ’–

πŸ“¦ where this page comes from