DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 656N7oAN4023195
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 656N7oAN4023195
Authentication-Results: delorie.com;
	dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=jB8BluQ/
X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 376A94C31828
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1780787269;
	bh=w1pk878SchrVYBaW0GhfzvqCr+uvSTUKNs4B3Vb2cWY=;
	h=Date:To:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=jB8BluQ/seDcgjWFscOjPDuIIVmWdveDAF/nm3y5HZbjR1zrrEWe3P6MosBEUlF3o
	 cFj8HBTK5G16Ywr3yirYqI442R6xCxcc3oyrE89ciZp+q4g6SPyryqB6r7Dr4xWmqI
	 L9EE6nON6o/SnI9WazcqyNtoWZcyKv1mJ8OdyUeg=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2264D4C3185D
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2264D4C3185D
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780787218; cv=none;
 b=l9dfTeY49zts+2VEJsw6HDWI0FJ085GFs4FlKxY7tnBzA9TD67mbOcrMT1bFe7EmnTF6bWUWLu1d7JBgs86Z2iCrLNH7ywuDP+ewuF6Cerhmi803vxMrBQ6LJxzAi/aouzP2DDWbuvrp+QcDgrVxdH2CSPy1MeEY4iwpC7Q555s=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1780787218; c=relaxed/simple;
 bh=4TWMJ0dySm1OmLQKGHZ/mnayE8ds8rd+1y8ScGGtpgk=;
 h=DKIM-Signature:Date:From:To:Message-ID:Subject:MIME-Version;
 b=tiQjzwa+08CYikXK8GbnfNwBDsB2jUnm7CnVXOvj8CK04922uIE92iOOoJmRYiFtWCe9r1HxOPwh1Bh+x+cvVDmvyvSujO5E2W213tGb2FG3ASH+1Jsk19QbPDgz5zKybfqKrv96YewnxxWrmvqpf5qeAYRGC2KtivPLHQ8zlzI=
ARC-Authentication-Results: i=1; sourceware.org;
 dkim=pass (2048-bit key, unprotected)
 header.d=comcast.net header.i=@comcast.net header.a=rsa-sha256
 header.s=20190202a header.b=fTry22E9
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2264D4C3185D
Xfinity-QID: W06Owc9ZPWpeiW06OwE8ge
Xfinity-Graffiti: 22101420686
Date: Sat, 6 Jun 2026 16:06:52 -0700 (PDT)
To: "Carlo B." <carlo.bramini@gmail.com>,
        "Carlo B. via Cygwin" <cygwin@cygwin.com>,
        Dimitry Andric <dimitry@unified-streaming.com>
Message-ID: <1640804308.295932.1780787212417@connect.xfinity.com>
In-Reply-To: <CADt9576meHrk_QGyqrXYZuOky_9uA478+tehwjGg38_R6R9xTA@mail.gmail.com>
References: <CADt9577cpSu1Ke7xu6mMQgfyfdOg8qFg1YFWRXQ_4NbmJto2Ug@mail.gmail.com>
 <C907B908-9877-431C-B9AA-50F63ABA581C@unified-streaming.com>
 <CADt9576meHrk_QGyqrXYZuOky_9uA478+tehwjGg38_R6R9xTA@mail.gmail.com>
Subject: Re: log2() is not called for C code, a bug into math.h ?
MIME-Version: 1.0
X-Priority: 3
Importance: Normal
X-Mailer: Open-Xchange Mailer v7.10.6-Rev83
X-Originating-IP: ::ffff:50.47.202.14
X-Originating-Port: 24414
X-Originating-Client: open-xchange-appsuite
X-CMAE-Envelope: MS4xfJeo117uLDG4P4ZpkcgzeTlNheFJ7pIVDu23MYU3QfEULPR43FURwUil81gDNlbXwFq5GnWsKm0iMU16pQFpU61IyNgK25KB8MzSwDR/jy+UFWL4nWv7
 QPgJbvatgIqELoq4Dgr4Fs2o/IeP0Oe2F95e3MDodz5Gy34qAXbQOSe/JsQleQbvhBlG0yI78QWueICDVdJ6YcLd4YU0LkzNX3aQHBtObGFKuqZW7RsCkY9r
 PfReOWeoNlSpsoGuEnq/dg+fMDX84AnD8HcYyDCd/XZJL7pMKcMJxh+lrGfgWLmu
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: KENNON J CONRAD via Cygwin <cygwin@cygwin.com>
Reply-To: KENNON J CONRAD <kennonconrad@comcast.net>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cygwin-bounces~archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie.com@cygwin.com>

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 <cygwin@cygwin.com> wrote:
> 
>  
> Hello,
> 
> Il Sab 6 Giu 2026, 14:19 Dimitry Andric <dimitry@unified-streaming.com> 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
