mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Make fma use of Dekker and Knuth algorithms use round-to-nearest (bug 14796).
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/* Clear given exceptions in current floating-point environment.
|
||||
Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -39,4 +39,5 @@ strong_alias (__feclearexcept, __old_feclearexcept)
|
||||
compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
|
||||
#endif
|
||||
|
||||
libm_hidden_ver (__feclearexcept, feclearexcept)
|
||||
versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
|
||||
|
@ -13,6 +13,15 @@ libc_feholdexcept (fenv_t *e)
|
||||
__fenv_ldfsr(etmp);
|
||||
}
|
||||
|
||||
static __always_inline void
|
||||
libc_fesetround (int r)
|
||||
{
|
||||
fenv_t etmp;
|
||||
__fenv_stfsr(etmp);
|
||||
etmp = (etmp & ~__FE_ROUND_MASK) | (r);
|
||||
__fenv_ldfsr(etmp);
|
||||
}
|
||||
|
||||
static __always_inline void
|
||||
libc_feholdexcept_setround (fenv_t *e, int r)
|
||||
{
|
||||
@ -79,6 +88,7 @@ libc_feresetround (fenv_t *e)
|
||||
}
|
||||
|
||||
#define libc_feholdexceptf libc_feholdexcept
|
||||
#define libc_fesetroundf libc_fesetround
|
||||
#define libc_feholdexcept_setroundf libc_feholdexcept_setround
|
||||
#define libc_fetestexceptf libc_fetestexcept
|
||||
#define libc_fesetenvf libc_fesetenv
|
||||
@ -87,6 +97,7 @@ libc_feresetround (fenv_t *e)
|
||||
#define libc_feholdsetroundf libc_feholdsetround
|
||||
#define libc_feresetroundf libc_feresetround
|
||||
#define libc_feholdexcept libc_feholdexcept
|
||||
#define libc_fesetround libc_fesetround
|
||||
#define libc_feholdexcept_setround libc_feholdexcept_setround
|
||||
#define libc_fetestexcept libc_fetestexcept
|
||||
#define libc_fesetenv libc_fesetenv
|
||||
@ -95,6 +106,7 @@ libc_feresetround (fenv_t *e)
|
||||
#define libc_feholdsetround libc_feholdsetround
|
||||
#define libc_feresetround libc_feresetround
|
||||
#define libc_feholdexceptl libc_feholdexcept
|
||||
#define libc_fesetroundl libc_fesetround
|
||||
#define libc_feholdexcept_setroundl libc_feholdexcept_setround
|
||||
#define libc_fetestexceptl libc_fetestexcept
|
||||
#define libc_fesetenvl libc_fesetenv
|
||||
|
Reference in New Issue
Block a user