Hello Carlo B., There was another discussion of this issue back in January. Beware, at the time I found that using log2 directly on my computer was slower than using log2 with the divide (by removing the same lines you mention in math.h). It seems to me that in a perfect world, using log2 should be both more accurate and faster than calling log and dividing the result by a constant.
Best Regards, Kennon Conrad https://cygwin.com/pipermail/cygwin/2026-January/259314.html > On 06/06/2026 9:53 AM PDT Carlo B. via Cygwin <[email protected]> wrote: > > > Hello, > > Il Sab 6 Giu 2026, 14:19 Dimitry Andric <[email protected]> ha > scritto: > > > > > It's been defined like that since the "import newlib-2000-02-17 snapshot", > > so for 26 years: > > > > > > https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/math.h;h=d3f2e99ae4d33596b608225f0349a6d581d265ca;hb=8a0efa53e44919bcf5ccb1d3353618a82afdf8bc#l103 > > > > My guess is that at the time, there wasn't yet a separate log2() > > implementation, so this was an easy way to cover that case. > > > > Thank you very much for the reply. > So, do you think that it would be possible to remove those lines from > math.h and use the log2() now provided? > > Sincerely, > > Carlo Bramini > > > > -Dimitry > > > > > > -- > Problem reports: https://cygwin.com/problems.html > FAQ: https://cygwin.com/faq/ > Documentation: https://cygwin.com/docs.html > Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple

