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