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/Tcl_LimitTypeExceeded.3.html
Tcl_LimitTypeExceeded(3) - manage and check resource limits
Tcls interpreter resource limit subsystem allows for close control over how much computation time a script may use, and is useful for cases where a program is d
manpages/grep-changelog.1.html
grep-changelog(1) - print ChangeLog entries matching criteri
grep-changelog searches the named CHANGELOGs (by default files matching the regular expressions ChangeLog and ChangeLog\.[0-9]+) for entries matching the specif
manpages/libnetpbm_ug.3.html
libnetpbm_ug(3) - netpbm sample code - Linux manual page....
The Libnetpbm programming library is part of Netpbm(1) Example Here is an example of a C program that uses libnetpbm to read a Netpbm image input and produce a
manpages/fsck.ext2.8.html
fsck.ext2(8) - check a Linux ext2/ext3/ext4 file system.....
e2fsck is used to check the ext2/ext3/ext4 family of file systems. For ext3 and ext4 filesystems that use a journal, if the system has been shut down uncleanly
manpages/getgid32.2.html
getgid32(2) - get group identity (System - Linux man page)
getgid() returns the real group ID of the calling process. getegid() returns the effective group ID of the calling process. ERRORS These functions are always su
manpages/xterm.html
301 Moved Permanently - xterm
manpages/fsck.vfat.8.html
fsck.vfat(8) - check and repair MS-DOS filesystems (ManPage)
fsck.fat verifies the consistency of MS-DOS filesystems and optionally tries to repair them. The following filesystem problems can be corrected (in this order):
manpages/tnameserv-java-1.8.0-openjdk.1.html
tnameserv-java-1.8.0-openjdk(1) Interface Definition Languag
Java IDL includes the Object Request Broker Daemon (ORBD). ORBD is a daemon process that contains a Bootstrap Service, a Transient Naming Service, a Persistent
manpages/strtol.3.html
strtol(3) - convert a string to a long integer (Man Page)...
The strtol() function converts the initial part of the string in nptr to a long integer value according to the given base, which must be between 2 and 36 inclus
manpages/winnstr.3ncurses.html
winnstr(3ncurses) - get a string of characters from a curses
winnstr.3ncurses - These routines return a string of characters in str, extracted starting at the current cursor position in the named window. Attributes are st
manpages/mpathpersist.8.html
mpathpersist(8) (Administration - Linux man page)..........
Options: --verbose|-v level verbosity level 0 Critical and error messages 1 Warning messages 2 Informational messages 3 Informational messages with trace enable
manpages/snprint_objid.3.html
snprint_objid(3) - netsnmp_mib_api functions (Man Page).....
The functions dealing with MIB modules fall into four groups - those dealing with initialisation and shutdown, with reading in and parsing MIB files, with searc
