1. Home
  2. Computing & Technology
  3. Focus on Linux
Linux / Unix Command: isnan
Command Library

NAME

isinf, isnan, finite - test for infinity or not-a-number (NaN)  

SYNOPSIS

#include <math.h>

int isinf(double value);

int isnan(double value);

int finite(double value);
 

DESCRIPTION

The isinf() function returns -1 if value represents negative infinity, 1 if value represents positive infinity, and 0 otherwise.

The isnan() function returns a non-zero value if value is "not-a-number" (NaN), and 0 otherwise.

The finite() function returns a non-zero value if value is neither infinite nor a "not-a-number" (NaN) value, and 0 otherwise.  

CONFORMING TO

BSD 4.3


Important: Use the man command (% man) to see how a command is used on your particular computer.

>> Linux/Unix Command Library

>> Shell Command Library

Explore Focus on Linux

More from About.com

  1. Home
  2. Computing & Technology
  3. Focus on Linux

©2008 About.com, a part of The New York Times Company.

All rights reserved.