minix/man/man3/islessgreater.3

27 lines
1.1 KiB
Groff
Raw Normal View History

2009-12-24 21:22:41 +01:00
.TH ISLESSGREATER 3 "December 18, 2009"
.UC 4
.SH NAME
2009-12-30 21:35:05 +01:00
islessgreater, isgreater, isgreaterequal, isless, islessequal, isunordered \- order floating point numbers
2009-12-24 21:22:41 +01:00
.SH SYNOPSIS
.nf
.ft B
#include <math.h>
int isgreater(double \fIx\fP, double \fIy\fP);
int isgreaterequal(double \fIx\fP, double \fIy\fP);
int isless(double \fIx\fP, double \fIy\fP);
int islessequal(double \fIx\fP, double \fIy\fP);
int islessgreater(double \fIx\fP, double \fIy\fP);
int isunordered(double \fIx\fP, double \fIy\fP);
.fi
.SH DESCRIPTION
These functions compare the specified floating point numbers \fIx\fP and
\fIy\fP. They differ from the regular comparison operators in that they
recognize and additional 'unordered' relationship between the numbers if one of
them is NaN. As a consequence, these functions do not raise floating point
expceptions and can be safely used with NaN values.
.SH "RETURN VALUE"
The functions return a non-zero value if and only if the relationship specified
in the name holds between \fIx\fP and \fIy\fP. All functions except for
'isunordered' return zero if either of the numbers is NaN.