diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-10-12 11:27:51 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-10-12 11:27:51 -0400 |
commit | 0ac5ae2335292908f39031b1ea9fe8edce433c0f (patch) | |
tree | f9d26c8abc0de39d18d4c13e70f6022cdc6b461f /math/math.h | |
parent | a843a204a3e8a0dd53584dad3668771abaec84ac (diff) | |
download | glibc-0ac5ae2335292908f39031b1ea9fe8edce433c0f.tar.gz glibc-0ac5ae2335292908f39031b1ea9fe8edce433c0f.tar.xz glibc-0ac5ae2335292908f39031b1ea9fe8edce433c0f.zip |
Optimize libm
libm is now somewhat integrated with gcc's -ffinite-math-only option and lots of the wrapper functions have been optimized.
Diffstat (limited to 'math/math.h')
-rw-r--r-- | math/math.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/math/math.h b/math/math.h index aeb54d9ed8..8b98ff331e 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 <bits/mathcalls.h> #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 <bits/mathcalls.h> # 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 <bits/mathinline.h> #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 <bits/math-finite.h> +#endif + #ifdef __USE_ISOC99 /* If we've still got undefined comparison macros, provide defaults. */ |