fix internal __ieee754_expf and __ieee754_logf calls

The recently added new math code inlines error handling instead of using
error handling wrappers around __ieee754* internal symbols, and thus the
__ieee754* symbols are no longer provided.

However __ieee754_expf and __ieee754_logf are used in the implementation
of a number of other math functions.  These symbols are safe to redirect
to the external expf and logf symbols, because those names are always
reserved when single precision math functions are reserved and the
additional error handling code is either not reached or there will be
an error in the final result that will override an internal spurious
errno setting.

For consistency all of __ieee754_expf, __ieee754_logf and __ieee754_powf
are redirected using a macro.
This commit is contained in:
Szabolcs Nagy 2017-10-17 12:41:20 +01:00 committed by Corinna Vinschen
parent 3bdd484103
commit 56e494c074
1 changed files with 11 additions and 0 deletions

View File

@ -225,6 +225,17 @@ extern float __ieee754_scalbf __P((float,int));
extern float __ieee754_scalbf __P((float,float));
#endif
#if !__OBSOLETE_MATH
/* The new math code does not provide separate wrapper function
for error handling, so the extern symbol is called directly.
This is valid as long as there are no namespace issues (the
extern symbol is reserved whenever the caller is reserved)
and there are no observable error handling side effects. */
# define __ieee754_expf(x) expf(x)
# define __ieee754_logf(x) logf(x)
# define __ieee754_powf(x,y) powf(x,y)
#endif
/* float versions of fdlibm kernel functions */
extern float __kernel_sinf __P((float,float,int));
extern float __kernel_cosf __P((float,float));