Isnan - Analog Devices VISUALDSP++ 3.5 Manual

C/c++ compiler and library for adsp-219x processors
Hide thumbs Also See for VISUALDSP++ 3.5:
Table of Contents

Advertisement

isnan

test for not-a-number (NAN)
Synopsis
#include <math.h>
int isnanf(float x);
int isnan(double x);
Description
The
function returns a zero if the argument is not set to an IEEE
isnan
(Not a Number); otherwise, the function will return a non-zero value.
NaN
Error Conditions
The
function does not return or set any error conditions.
isnan
Example
#include <stdio.h>
#include <math.h>
static int fail=0;
main(){
/* test int isnan(double) */
union {
double d; float f; unsigned long l;
} u;
#ifdef __DOUBLES_ARE_FLOATS__
u.l=0xFF800000L; if ( isnan(u.d)!=0 ) fail++;
u.l=0xFF800001L; if ( isnan(u.d)==0 ) fail++;
u.l=0x7F800000L; if ( isnan(u.d)!=0 ) fail++;
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
C/C++ Run-Time Library
3-79

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Related Products for Analog Devices VISUALDSP++ 3.5

Table of Contents