Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Name

isinf

Synopsis

Tests whether a given floating point value is an infinity

#include <math.h>
intisinf( float x );
int isinf( double x );
int isinf( long double x );

The macro isinf() yields a nonzero value (that is, true) if its argument is a positive or negative infinity. Otherwise, isinf() yields 0. The argument must be a real floating-point type. The rule that floating-point types are promoted to at least double precision for mathematical calculations does not apply here; the argument's properties are determined based on its representation in its actual semantic type.

Example

This function takes a short cut if it encounters an infinite addend:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


 Â