This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]