From f95a4a932476be2ba99e2fd081e8d2bc6ea12813 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 15 Dec 2017 09:38:53 -0500 Subject: Import newlib and create makefile --- newlib/libm/common/sf_nan.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 newlib/libm/common/sf_nan.c (limited to 'newlib/libm/common/sf_nan.c') diff --git a/newlib/libm/common/sf_nan.c b/newlib/libm/common/sf_nan.c new file mode 100644 index 0000000..cb3e1cd --- /dev/null +++ b/newlib/libm/common/sf_nan.c @@ -0,0 +1,23 @@ +/* + * nanf () returns a nan. + * Added by Cygnus Support. + */ + +#include "fdlibm.h" + + float nanf() +{ + float x; + + SET_FLOAT_WORD(x,0x7fc00000); + return x; +} + +#ifdef _DOUBLE_IS_32BITS + + double nan() +{ + return (double) nanf(); +} + +#endif /* defined(_DOUBLE_IS_32BITS) */ -- cgit v1.2.3