Add math library defines for nan functions. From Brennan Ashton.
This commit is contained in:
parent
6461f948f2
commit
5066ce6633
|
@ -143,12 +143,6 @@ void do_str(FAR const char *src)
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
float nanf(FAR const char *tagp)
|
||||
{
|
||||
(void)tagp;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* mp_import_stat
|
||||
****************************************************************************/
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue