mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-14 17:59:28 +08:00
b7f5fb36f1
* libc/stdlib/gd_qnan.h (f_QNAN, d_QNAN0, d_QNAN1): Add MIPS versions. (ld_QNAN0, ld_QNAN1, ld_QNAN2, ld_QNAN3): Don't define for MIPS. (ldus_QNAN0, ldus_QNAN1, ldus_QNAN2, ldus_QNAN3, ldus_QNAN4): Likewise. * libc/stdlib/ldtoa.c (nan113, nan64, nan53, nan24): Add MIPS versions. (enan): Handle legacy MIPS payloads. * libm/common/s_nan.c (nan): Use __builtin_nan if supported by the compiler. * libm/common/sf_nan.c (nanf): Likewise.
29 lines
365 B
C
29 lines
365 B
C
/*
|
|
* nanf () returns a nan.
|
|
* Added by Cygnus Support.
|
|
*/
|
|
|
|
#include "fdlibm.h"
|
|
|
|
float nanf(const char *unused)
|
|
{
|
|
float x;
|
|
|
|
#if __GNUC_PREREQ (3, 3)
|
|
x = __builtin_nanf("");
|
|
#else
|
|
SET_FLOAT_WORD(x,0x7fc00000);
|
|
#endif
|
|
return x;
|
|
}
|
|
|
|
#ifdef _DOUBLE_IS_32BITS
|
|
|
|
double nan(const char *arg)
|
|
{
|
|
return (double) nanf(arg);
|
|
}
|
|
|
|
#endif /* defined(_DOUBLE_IS_32BITS) */
|
|
|