NAME
isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered - floating-point relational tests without exception for NaN
SYNOPSIS
#include <math.h> int isgreater(x, y); int isgreaterequal(x, y); int isless(x, y); int islessequal(x, y); int islessgreater(x, y); int isunordered(x, y); Link with -lm. Feature Test Macro Requirements for glibc (see feature_test_macros(7)): All functions described here: _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
DESCRIPTION
The normal relational operations (like <, "less than") will fail if one of the operands is NaN. This will cause an exception. To avoid this, C99 defines the macros listed below. These macros are guaranteed to evaluate their arguments only once. The arguments must be of real floating-point type (note: do not pass integer values as arguments to these macros, since the arguments will not be promoted to real-floating types). isgreater() determines (x) > (y) without an exception if x or y is NaN. isgreaterequal() determines (x) >= (y) without an exception if x or y is NaN. isless() determines (x) < (y) without an exception if x or y is NaN. islessequal() determines (x) <= (y) without an exception if x or y is NaN. islessgreater() determines (x) < (y) || (x) > (y) without an exception if x or y is NaN. This macro is not equivalent to x != y because that expression is true if x or y is NaN. isunordered() determines whether its arguments are unordered, that is, whether at least one of the arguments is a NaN.
RETURN VALUE
The macros other than isunordered() return the result of the relational comparison; these macros return 0 if either argument is a NaN. isunordered() returns 1 if x or y is NaN and 0 otherwise.
ERRORS
No errors occur.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). Interface Attribute Value isgreater(), isgreaterequal(), Thread safety MT-Safe isless(), islessequal(), islessgreater(), isunordered()
CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C99.
NOTES
Not all hardware supports these functions, and where hardware support isn't provided, they will be emulated by macros. This will result in a performance penalty. Don't use these functions if NaN is of no concern for you.
SEE ALSO
fpclassify(3), isnan(3)
COLOPHON
This page is part of release 4.09 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. 2016-03-15 ISGREATER(3)
More Linux Commands
manpages/kill.2.html
kill(2) - send signal to a process - Linux manual page......
The kill() system call can be used to send any signal to any process group or process. If pid is positive, then signal sig is sent to the process with the ID sp
manpages/XML::LibXML::SAX::Generator.3pm.html
XML::LibXML::SAX::Generator(3pm) - Generate SAX events from
THIS CLASS IS DEPRECATED ! Use XML::LibXML::SAX::Parser instead! This helper class allows you to generate SAX events from any XML::LibXML node, and all its sub-
manpages/line.1.html
line(1) - read one line (Commands - Linux manual page)......
The utility line copies one line (up to a newline) from standard input to standard output. It always prints at least a newline and returns an exit status of 1 o
manpages/Tk_Free3DBorder.3.html
Tk_Free3DBorder(3) - draw borders with three-dimensional app
These procedures provide facilities for drawing window borders in a way that produces a three-dimensional appearance. Tk_Alloc3DBorderFromObj allocates colors a
manpages/tgetnum.3ncurses.html
tgetnum(3ncurses) - direct curses interface to the terminfo
These routines are included as a conversion aid for programs that use the termcap library. Their parameters are the same and the routines are emulated using the
manpages/inet_ntop.3.html
inet_ntop(3) - convert IPv4 and IPv6 addresses from binary t
This function converts the network address structure src in the af address family into a character string. The resulting string is copied to the buffer pointed
manpages/pdfunite.1.html
pdfunite(1) - Portable Document Format (PDF) page merger....
pdfunite merges several PDF (Portable Document Format) files in order of their occurence on command line to one PDF result file. Neither of the PDF-sourcefile1
manpages/SDL_WaitEvent.3.html
SDL_WaitEvent(3) - Waits indefinitely for the next available
Waits indefinitely for the next available event, returning 1, or 0 if there was an error while waiting for events. If event is not NULL, the next event is remov
manpages/XcmsTekHVC.3.html
XcmsTekHVC(3) - Xcms color structure - Linux manual page....
The XcmsColor structure contains a union of substructures, each supporting color specification encoding for a particular color space. SEE ALSO XcmsAllocColor(3)
manpages/HUGE_VALL.3.html
HUGE_VALL(3) - floating-point constants - Linux manual page
The macro INFINITY expands to a float constant representing positive infinity. The macro NAN expands to a float constant representing a quiet NaN (when supporte
manpages/setpci.8.html
setpci(8) - configure PCI devices - Linux manual page.......
setpci is a utility for querying and configuring PCI devices. All numbers are entered in hexadecimal notation. Root privileges are necessary for almost all oper
manpages/glGetMapfv.3gl.html
glGetMapfv(3gl) - return evaluator parameters (Man Page)....
glMap1 and glMap2 define evaluators. glGetMap returns evaluator parameters. target chooses a map, query selects a specific parameter, and v points to storage wh
