File: TestNaNAware.c

package info (click to toggle)
plplot 5.9.0-8
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 26,256 kB
  • ctags: 9,353
  • sloc: ansic: 64,079; xml: 22,799; cpp: 8,562; tcl: 8,314; perl: 4,872; python: 4,462; f90: 4,310; java: 4,090; sh: 1,481; makefile: 261; php: 102; fortran: 59; sed: 5
file content (17 lines) | stat: -rw-r--r-- 347 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Test for NaN awareness. */
#include <stdio.h>
#include "nan.h"

int
main()
{
   double x = NaN;
   /* N.B. CMake run-time tests need return of true (1) or false (0) not
    * the usual status code of 0 for success. */
#if defined(_MSC_VER) | defined(__BORLANDC__)
   if (isnan(x)) return 1;
#endif

   if (x != x) return 1;
   else return 0;
}