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. πβ¨
π«Ά COPYRIGHT π«Ά
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
- 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