From 0ac5ae2335292908f39031b1ea9fe8edce433c0f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Oct 2011 11:27:51 -0400 Subject: Optimize libm libm is now somewhat integrated with gcc's -ffinite-math-only option and lots of the wrapper functions have been optimized. --- math/math.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'math/math.h') diff --git a/math/math.h b/math/math.h index aeb54d9..8b98ff3 100644 --- a/math/math.h +++ b/math/math.h @@ -1,5 +1,5 @@ /* Declarations for math functions. - Copyright (C) 1991-1993, 1995-1999, 2001, 2002, 2004, 2006, 2009 + Copyright (C) 1991-1993, 1995-1999, 2001, 2002, 2004, 2006, 2009, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -64,10 +64,10 @@ __BEGIN_DECLS #define __MATHDECL_1(type, function,suffix, args) \ extern type __MATH_PRECNAME(function,suffix) args __THROW -#define _Mdouble_ double +#define _Mdouble_ double #define __MATH_PRECNAME(name,r) __CONCAT(name,r) -# define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD -# define _Mdouble_END_NAMESPACE __END_NAMESPACE_STD +#define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD +#define _Mdouble_END_NAMESPACE __END_NAMESPACE_STD #include #undef _Mdouble_ #undef _Mdouble_BEGIN_NAMESPACE @@ -83,7 +83,7 @@ __BEGIN_DECLS # ifndef _Mfloat_ # define _Mfloat_ float # endif -# define _Mdouble_ _Mfloat_ +# define _Mdouble_ _Mfloat_ # ifdef __STDC__ # define __MATH_PRECNAME(name,r) name##f##r # else @@ -130,7 +130,7 @@ extern long double __REDIRECT_NTH (nexttowardl, # ifndef _Mlong_double_ # define _Mlong_double_ long double # endif -# define _Mdouble_ _Mlong_double_ +# define _Mdouble_ _Mlong_double_ # ifdef __STDC__ # define __MATH_PRECNAME(name,r) name##l##r # else @@ -138,10 +138,11 @@ extern long double __REDIRECT_NTH (nexttowardl, # endif # define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99 # define _Mdouble_END_NAMESPACE __END_NAMESPACE_C99 +# define __MATH_DECLARE_LDOUBLE 1 # include # undef _Mdouble_ -# undef _Mdouble_BEGIN_NAMESPACE -# undef _Mdouble_END_NAMESPACE +# undef _Mdouble_BEGIN_NAMESPACE +# undef _Mdouble_END_NAMESPACE # undef __MATH_PRECNAME # endif /* __STDC__ || __GNUC__ */ @@ -416,6 +417,12 @@ extern int matherr (struct exception *__exc); # include #endif +/* Define special entry points to use when the compiler got told to + only expect finite results. */ +#if defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0 +# include +#endif + #ifdef __USE_ISOC99 /* If we've still got undefined comparison macros, provide defaults. */ -- cgit v1.1