isless - C math.h

C examples for math.h:isless

type

macro

From

<cmath>
<ctgmath>
<math.h>

Description

Returns whether x is less than y.

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

Prototype

bool isless (float x      , float y);
bool isless (double x     , double y);
bool isless (long double x, long double y);
     isless (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 less than y. false (0) otherwise.

Example

Demo Code


#include <stdio.h>
#include <math.h> /* isless, log */

int main ()//from w  ww. ja v a  2s .  c  om
{
  double result;
  result = log (10.0);

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

  return 0;
}

Related Tutorials