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]

Possible mistake in expf


Hello everyone,

I believe I may have stumbled across a minor mistake in the expf()
implementation in newlib's libm.

newlib/libm/mathfp/sf_pow.c:99 [1] is:

> x = exp (t);

However, I don't see why the function exp should be used instead of
expf, as x itself is a single-precision float. At a quick glance I don't
see any reason why this would benefit greatly from the increased
precision the double-precision version of exp would provide, but I'm far
from an expert on this sort of thing. If someone could confirm or refute
my suspicions, that would be appreciated!

Thanks,

- ethereal

[1]
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=newlib/libm/mathfp/sf_pow.c;;hb=HEAD#l99


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