ISLESS(3POSIX)
π ISLESS(3POSIX) β the POSIX Programmer's Manual, bestie edition π
okay so before we even start: this page lives in the POSIX Programmer's Manual (yes, that's the 3POSIX up there in the header, hi hello). Buckle up buttercup, we're comparing floats. π¦
πΈ PROLOG πΈ
Heads up, bestie, real talk first:
- This manual page is part of the POSIX Programmer's Manual.
- The Linux implementation of this interface may differ β so pls consult the corresponding Linux manual page for details on Linux behavior.
- Orβ¦ the interface may not be implemented on Linux at all. π
So like. vibe check your platform first. iykyk.
β¨ NAME β¨
isless β test if x is less than y π«Ά
π SYNOPSIS π
#include <math.h>
int isless(real-floating x, real-floating y);
she's short, she's sweet, she's a macro. periodt. π
π DESCRIPTION π
The functionality on this reference page is aligned with the ISO C standard. And listen β any conflict between the requirements described here and the ISO C standard is unintentional, no cap. This volume of POSIX.1β2017 defers to the ISO C standard. the ISO C standard is the main character here, we're just living in her house. π
So what does isless() actually do? The isless() macro shall determine whether its first argument is less than its second argument.
And here's the tea π: the value of isless(x, y) shall be equal to (x) < (y). BUT β and this is the iconic part β unlike (x) < (y), isless(x, y) shall not raise the invalid floating-point exception when x and y are unordered. she's the chill version. she doesn't start drama. π§
π RETURN VALUE π
Upon successful completion, the isless() macro shall return the value of (x) < (y).
And if x or y is NaN? 0 shall be returned. that's it, that's the answer, no exceptions raised, no screaming, just a calm little zero. π
π₯ ERRORS π₯
No errors are defined. (iconic behavior honestly β not a single problem to report π)
The following sections are informative. (translation: the rest is bonus lore, not requirements β¨)
π EXAMPLES π
None. π not a single example, we're thriving on vibes alone.
π APPLICATION USAGE π
okay so here's the lore, bestie, sit down π«Ά
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.
But β 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 facilitates writing efficient code that accounts for NaNs without suffering the invalid floating-point exception. like, she does the same job but she doesn't yell at you. queen shit. π
And in the SYNOPSIS section, real-floating indicates that the argument shall be an expression of real-floating type. noted. π
π¦ RATIONALE π¦
None. (she simply has nothing to justify. flawless. no notes. π )
πΈ FUTURE DIRECTIONS πΈ
None. the future is bright and also empty. β¨
π SEE ALSO π
isgreater()isgreaterequal()islessequal()islessgreater()isunordered()
and the Base Definitions volume of POSIX.1β2017, <math.h> π
(the whole friend group!! go say hi to all of them π«Ά)
π COPYRIGHT π
okay legal bestie moment, don't skip this, it's important:
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 .
and that's the whole page, bestie!! this lil masterpiece dropped in 2017, brought to you by IEEE / The Open Group π thanks for reading all the way to the bottom, you're literally the best, mwah πβ¨π
π¦ 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