C examples for math.h:isgreater
macro
<cmath> <ctgmath> <math.h>
Returns whether x is greater than y.
If one or both arguments are NaN, the function returns false.
bool isgreater (float x , float y); bool isgreater (double x , double y); bool isgreater (long double x, long double y); isgreater(x,y)
Parameter | Description |
---|---|
x | Values to be compared. |
y | Values to be compared. |
The same as (x)>(y): true (1)
if x is greater than y. false (0) otherwise.
#include <stdio.h> #include <math.h> /* isgreater, log */ int main ()/* w w w .java2 s . c om*/ { double result = log (10.0); if (isgreater(result,0.0)) printf ("log(10.0) is positive"); else printf ("log(10.0) is not positive"); return 0; }