2009-08-24 Ulrich Drepper <drepper@redhat.com>
+ * math/math.h: Define math_errhandling of __FAST_MATH__ is not defined.
+ * sysdeps/i386/fpu/bits/mathinline.h: Undefine math_errhandling if we
+ are using the inline optimizations.
+
* sysdeps/x86_64/fpu/bits/mathinline.h (__signbit): Optimize.
(__signbitf): Likewise.
/* Declarations for math functions.
- Copyright (C) 1991-1993, 1995-1999, 2001, 2002, 2004, 2006
+ Copyright (C) 1991-1993, 1995-1999, 2001, 2002, 2004, 2006, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
&& (!defined __NO_LONG_DOUBLE_MATH || defined __LDBL_COMPAT)
# ifdef __LDBL_COMPAT
-# ifdef __USE_ISOC99
+# ifdef __USE_ISOC99
extern float __nldbl_nexttowardf (float __x, long double __y)
__THROW __attribute__ ((__const__));
# ifdef __REDIRECT_NTH
# define MATH_ERRNO 1 /* errno set by math functions. */
# define MATH_ERREXCEPT 2 /* Exceptions raised by math functions. */
+/* By default all functions support both errno and exception handling.
+ In gcc's fast math mode and if inline functions are defined this
+ might not be true. */
+# ifndef __FAST_MATH__
+# define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)
+# endif
+
#endif /* Use ISO C99. */
#ifdef __USE_MISC
/* Inline math functions for i387.
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2003,2004,2006,2007
+ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2003,2004,2006,2007,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by John C. Bowman <bowman@math.ualberta.ca>, 1995.
#if ((!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
&& defined __OPTIMIZE__)
+/* The inline functions do not set errno or raise necessarily the
+ correct exceptions. */
+# undef math_errhandling
+
/* A macro to define float, double, and long double versions of various
math functions for the ix87 FPU. FUNC is the function name (which will
be suffixed with f and l for the float and long double version,