ISGREATER(3) BSD Library Functions Manual ISGREATER(3)NAME
isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered -- compare two floating-point numbers
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <math.h>
int
isgreater(real-floating x, real-floating y);
int
isgreaterequal(real-floating x, real-floating y);
int
isless(real-floating x, real-floating y);
int
islessequal(real-floating x, real-floating y);
int
islessgreater(real-floating x, real-floating y);
int
isunordered(real-floating x, real-floating y);
DESCRIPTION
Each of the macros isgreater(), isgreaterequal(), isless(), islessequal(), and islessgreater() take arguments x and y and return a non-zero
value if and only if its nominal relation on x and y is true. These macros always return zero if either argument is not a number (NaN), but
unlike the corresponding C operators, they never raise a floating point exception.
The isunordered() macro takes arguments x and y and returns non-zero if and only if neither x nor y are NaNs. For any pair of floating-point
values, one of the relationships (less, greater, equal, unordered) holds.
SEE ALSO fpclassify(3), math(3), signbit(3)STANDARDS
The isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), and isunordered() macros conform to ISO/IEC 9899:1999
(``ISO C99'').
HISTORY
The relational macros described above first appeared in FreeBSD 5.1.
BSD February 12, 2003 BSD
Check Out this Related Man Page
ISGREATER(3) BSD Library Functions Manual ISGREATER(3)NAME
isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered -- compare two floating-point numbers
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <math.h>
int
isgreater(real-floating x, real-floating y);
int
isgreaterequal(real-floating x, real-floating y);
int
isless(real-floating x, real-floating y);
int
islessequal(real-floating x, real-floating y);
int
islessgreater(real-floating x, real-floating y);
int
isunordered(real-floating x, real-floating y);
DESCRIPTION
Each of the macros isgreater(), isgreaterequal(), isless(), islessequal(), and islessgreater() take arguments x and y and return a non-zero
value if and only if its nominal relation on x and y is true. These macros always return zero if either argument is not a number (NaN), but
unlike the corresponding C operators, they never raise a floating point exception.
The isunordered() macro takes arguments x and y and returns non-zero if and only if neither x nor y are NaNs. For any pair of floating-point
values, one of the relationships (less, greater, equal, unordered) holds.
SEE ALSO fpclassify(3), math(3), signbit(3)STANDARDS
The isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), and isunordered() macros conform to ISO/IEC 9899:1999
(``ISO C99'').
HISTORY
The relational macros described above first appeared in FreeBSD 5.1.
BSD February 12, 2003 BSD
Hi,
Could any one tell me how to compare to floating point no. using test command. As -eq option works on only intergers.
i=5.4
if
then
echo "equal"
else
echo "not equal"
fi
here output will be equal even though no. are unequal.
Thanks,
ravi (1 Reply)
Hi All,
I got this script that pulls the Amps value from our RPC's , I basiclly want to compare the valued with a "limit" value -- if the numbers match or are greater than the definded value ...do something. My problem is I cant seem to figure out how to compare floating points...
here is... (1 Reply)
Hi I'm not using Korn93 but want to use floating point variable.
Is there any solution to do that ?
thx for help.
---------- Post updated at 02:28 PM ---------- Previous update was at 12:38 PM ----------
I have the following peace of code:
for n in `cat log.January.1.array`
do
... (3 Replies)
I have noticed a few posts asking questions about c shell scripting these past few days. This a good read for those that currently or are thinking about writing a csh script:
Csh Programming Considered Harmful (9 Replies)
for example:
# I want to judge the value of $1 which should be $2<$1<$3.
temp0=`echo "$1 - $2" | bc`
temp1=`echo "$1 - $3" | bc`
if ] ; then
echo OK
else
echo False
fi
Please use code tags, thanks. (6 Replies)
Hello,
How can I multiply two variables that contain floating point numbers.
For example, how can I get the value for c
a=2.165
b=3.234
c=a+3*b
Thanks,
Guss (1 Reply)
Hi,
I need to understand the concept of floating IP and how can I get it working on my system. I am using Itanium boxes.
I am naive so please help me from the very basics. (2 Replies)
Hello,
I have often found bash to be difficult when it comes to floating point numbers. I have data with rows of tab delimited floating point numbers. I need to find the smallest number in each row that is not 0.0. Numbers can be negative and they do not come in any particular order for a given... (9 Replies)