[PATCH v2] New expf, exp2f, logf, log2f and powf implementations

Szabolcs Nagy szabolcs.nagy@arm.com
Tue Oct 17 13:01:00 GMT 2017


On 13/10/17 10:13, Corinna Vinschen wrote:
> 
> Pushed.
> 

sorry, i did not realize that there are internal calls
to __ieee754_logf and __ieee754_expf from various math
functions.

in the new math code i only define logf and expf symbols.
(same for powf, but __ieee754_powf is not used in newlib)

i can reintroduce the __ieee754* symbols as trivial wrappers
or weak aliases or macro redirect.

i think a macro is probably the best since there is no
requirement to make these symbols extern linkable, they are
purely implementation internal so fdlibm.h could have:

#if !__OBSOLETE_MATH
# define __ieee754_expf(x) expf(x)
# define __ieee754_logf(x) logf(x)
# define __ieee754_powf(x,y) powf(x,y)
#endif

this changes the semantics a bit: __ieee754_* symbols didn't
do error handling previously, however the error code paths
should not really matter for internal calls, if they are ever
reached then at worst errno is set spuriously in the new code.

does this sound ok?



More information about the Newlib mailing list