From d2c2c1328b5fa59452a0d7e945abeed2fa72fb58 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Fri, 14 Oct 2005 21:11:39 +0000 Subject: 2005-10-14 Jeff Johnston * libc/include/math.h (HUGE_VALF, HUGE_VALL): New. * libm/common/Makefile.am: Add s_infconst.c support. * libm/common/Makefile.in: Regenerated. * libm/common/s_infconst.c: New file with float and long double infinity support added. * libm/math/Makefile.am: Remove s_infconst.c support. * libm/math/Makefile.in: Regenerated. * libm/math/s_infconst.c: Moved to common directory. * libm/mathfp/Makefile.am: Remove s_infconst.c support. * libm/mathfp/Makefile.in: Regenerated. * libm/mathfp/s_infconst.c: Moved to common directory. --- newlib/libc/include/math.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'newlib/libc/include/math.h') diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h index 36766809e..3eec0e48f 100644 --- a/newlib/libc/include/math.h +++ b/newlib/libc/include/math.h @@ -14,18 +14,34 @@ _BEGIN_STD_C /* Define HUGE_VAL as infinity, unless HUGE_VAL is already defined (which might have been done by something like math-68881.h). */ +union __fmath +{ + __ULong i[1]; + float f; +}; + union __dmath { __ULong i[2]; double d; }; +union __ldmath +{ + __ULong i[4]; + _LONG_DOUBLE ld; +}; + /* Declare this as an array without bounds so that no matter what small data support a port and/or library has, this reference will be via the general method for accessing globals. */ extern __IMPORT const union __dmath __infinity[]; +extern __IMPORT const union __fmath __infinityf[]; +extern __IMPORT const union __ldmath __infinityld[]; #define HUGE_VAL (__infinity[0].d) +#define HUGE_VALF (__infinityf[0].f) +#define HUGE_VALL (__infinityld[0].ld) #endif /* ! defined (HUGE_VAL) */ -- cgit v1.2.3