isgreaterequal - C math.h

C examples for math.h:isgreaterequal

type

macro

From

<cmath>
<ctgmath>
<math.h>

Description

Returns whether x is greater than or equal to y.

If one or both arguments are NaN, the function returns false.

Prototype

bool isgreaterequal (float x      , float y);
bool isgreaterequal (double x     , double y);
bool isgreaterequal (long double x, long double y);
     isgreaterequal (x,y)

Parameters

Parameter Description
x Values to be compared.
y Values to be compared.

Return value

The same as (x)>=(y): true (1) if x is greater than or equal to y. false (0) otherwise.

Example

Demo Code

#include <stdio.h>
#include <math.h>

int main ()//  ww  w.  j  a v  a2  s.  c  o  m
{
  double result = log (10.0);

  if (isgreaterequal(result,0.0))
    printf ("log(10.0) is not negative");
  else
    printf ("log(10.0) is negative");

  return 0;
}

Related Tutorials