No empty .Rs/.Re
[netbsd-mini2440.git] / regress / lib / libc / ieeefp / nan / nan.c
blob4dc74c7188984f253c9a48aff2ebba138e2203fc
1 /* $NetBSD: nan.c,v 1.4 2004/03/05 01:00:53 kleink Exp $ */
3 /*
4 * This file is in the Public Domain.
6 * Blatently copied from the infinity test by Ben Harris.
8 * Simon Burge, 2001
9 */
12 * Check that NAN (alias __nanf) really is not-a-number.
13 * Alternatively, check that isnan() minimally works.
16 #include <assert.h>
17 #include <math.h>
19 int
20 main(int argc, char **argv)
23 /* NAN is meant to be a (float) NaN. */
24 assert(isnan(NAN));
25 assert(isnan((double)NAN));
26 return 0;