ISUNORDERED(3POSIX)
β¨ ISUNORDERED β¨
okay bestie, welcome to the POSIX Programmer's Manual π
this page is ISUNORDERED(3POSIX) and it's short, sweet, and honestly a little iconic.
π PROLOG π
okay so real talk before we get into it: this manual page is part of the POSIX Programmer's Manual, periodt. but listen β the Linux implementation of this interface may differ (so like, go consult the corresponding Linux manual page for the deets on Linux behavior), or the interface might not even be implemented on Linux at all. π so don't come for me if your Linux box is like "what is that."
πΈ NAME πΈ
isunordered β test if arguments are unordered
π¦ SYNOPSIS π¦
#include <math.h>
int isunordered(real-floating x, real-floating y);
β¨ DESCRIPTION β¨
okay 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 β not a vibe, just a formatting oopsie. this volume of POSIX.1β2017 defers to the ISO C standard. iykyk.
the isunordered() macro shall determine whether its arguments are unordered. that's it. that's the whole job. π«Ά
π₯ RETURN VALUE π₯
upon successful completion, the isunordered() macro shall return 1 if its arguments are unordered, and 0 otherwise.
and listen β if x or y is NaN, 1 shall be returned. so like, NaN in the mix means it's giving unordered, no cap. π
π ERRORS π
no errors are defined. none. zero. she simply does not miss.
the following sections are informative.
π EXAMPLES π
none. bestie i know, i wanted examples too. π₯²
π APPLICATION USAGE π
okay so 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. slay, standard math behavior.
but here's the tea: 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. she's the chill one. it facilitates writing efficient code that accounts for NaNs without suffering the invalid floating-point exception. obsessed, honestly. π
and just so we're clear: in the SYNOPSIS section, real-floating indicates that the argument shall be an expression of real-floating type. π
π RATIONALE π
none. main character silence.
β FUTURE DIRECTIONS β
none. she's not going anywhere, she's not changing, she's perfect as is.
π§ SEE ALSO π§
isgreater()isgreaterequal()isless()islessequal()islessgreater()
the Base Definitions volume of POSIX.1β2017, <math.h>
π 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 .
k that's the whole page bestie, hope it ate π«Ά
IEEE/The Open Group β 2017 β ISUNORDERED(3POSIX) β¨ bye luv u, go write some NaN-safe code π
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms