1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

Optimize libm

libm is now somewhat integrated with gcc's -ffinite-math-only option
and lots of the wrapper functions have been optimized.
This commit is contained in:
Ulrich Drepper
2011-10-12 11:27:51 -04:00
parent a843a204a3
commit 0ac5ae2335
270 changed files with 4557 additions and 5634 deletions

View File

@@ -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. */