mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Add math library defines for nan functions. From Brennan Ashton.
This commit is contained in:
@@ -385,6 +385,14 @@ double trunc (double x);
|
||||
long double truncl (long double x);
|
||||
#endif
|
||||
|
||||
#define nanf(x) ((float)(NAN))
|
||||
#ifdef CONFIG_HAVE_DOUBLE
|
||||
#define nan(x) ((double)(NAN))
|
||||
#endif
|
||||
#ifdef CONFIG_HAVE_LONG_DOUBLE
|
||||
#define nanl(x) ((long double)(NAN))
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user