www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2026/06/06/19:24:43

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 656NOhRw4030028
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 656NOhRw4030028
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=aHWwXZGO
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E23E4C31847
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1780788282;
bh=K9jeHlOQCIzvW+1AV3XbOzDHNnqTgXFK0WNFNdAxIWc=;
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=aHWwXZGOWaIScvvgFT+J+T6ZYW9/qy2TwasdToyXh0P08GezHcMdVEEAE41LYEB1Z
Zcrs7NpnoRjLSqRj1u37xV0Dah/3Y6tkLB8iKL0obmB9LSAafc32YGqSJ+J3/Yfl82
mTvybDEi0oqBzCfcpLAuACdMCcUwrWNqCQNVO9vo=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 178F64C31836
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 178F64C31836
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780788262; cv=none;
b=kYcPGUV2LD1QdjR1NQIWW8vxyCi4CI00SkVsIzPFxZvkICKU3n9mVYK62bc9TWaaIQcPJXgBLa5i0zVQ26bBaWGf7qYHHtMKqb0KykkB1hsxcbS/j/bpI/Yc/q/DV1Ulki0vFJMqu1BEq4oRE3hGGuj6FWh4onVDHKPMGQdmOZ8=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1780788262; c=relaxed/simple;
bh=ToyRIgN2n1uhuyMQX/ByPQqYRZhiNXAYZPkbmk62bm4=;
h=DKIM-Signature:Date:From:To:Message-ID:Subject:MIME-Version;
b=aSjHT+heCSvV6eJhScHIf4Zosp/Ch+RABIOl3gNBq71969074eB0crijgHjlT2xN2xQLnw/QBZAp6o6ZIY/UMijPa+KrTrZVEPQcH3p+IT7VTuZe45BMWl8/mrOvggvOWQLYtkJcYC9VJeO3NfQ2/8IP5Dyon4C7hwCuGnpdLRI=
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=F/kKnMlf
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 178F64C31836
Xfinity-QID: W0NGwHlTUOcHwW0NGw3r30
Xfinity-Graffiti: 06809030666
Date: Sat, 6 Jun 2026 16:24:18 -0700 (PDT)
To: KENNON J CONRAD via Cygwin <cygwin AT cygwin DOT com>,
"Carlo B." <carlo DOT bramini AT gmail DOT com>,
Dimitry Andric <dimitry AT unified-streaming DOT com>
Message-ID: <2125010483.296244.1780788258493@connect.xfinity.com>
In-Reply-To: <1640804308.295932.1780787212417@connect.xfinity.com>
References: <CADt9577cpSu1Ke7xu6mMQgfyfdOg8qFg1YFWRXQ_4NbmJto2Ug AT mail DOT gmail DOT com>
<C907B908-9877-431C-B9AA-50F63ABA581C AT unified-streaming DOT com>
<CADt9576meHrk_QGyqrXYZuOky_9uA478+tehwjGg38_R6R9xTA AT mail DOT gmail DOT com>
<1640804308 DOT 295932 DOT 1780787212417 AT connect DOT xfinity DOT 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: 9122
X-Originating-Client: open-xchange-appsuite
X-CMAE-Envelope: MS4xfDPpTsrbFxmNkbjiPu3K01UU4PnoFRYfoHf+7VkyORM+EDMcuLTnSBoVOMiMmGELlEk3UoRMhTENx0tM/yTRSSjPdDi3kxHeO7ZCG4BB7G/DqXQeGMyF
wNgwSZVlaMVAK4B9xhVRLZVZPiPkLLqwqEfEi0UszTD1tpwvsp1xYEmrdlV50E+opjJOPMk1Ok5SNa7iFU7m7CQc9SH/R2E1Ej95cwUckM9tsZoOUS+VCTIg
TWlmrKKaeLHg/1oBtkFsfDFfVu7P39Fg2ovJI4NDqzM9zrgfBeg3usRUShtnMZY/
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: KENNON J CONRAD via Cygwin <cygwin AT cygwin DOT com>
Reply-To: KENNON J CONRAD <kennonconrad AT comcast DOT net>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

Should have written "I found that using log2 directly on my computer was slower than using log
with the divide".

> On 06/06/2026 4:06 PM PDT KENNON J CONRAD via Cygwin <cygwin AT cygwin DOT com> wrote:
> 
>  
> 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 AT cygwin DOT com> wrote:
> > 
> >  
> > Hello,
> > 
> > Il Sab 6 Giu 2026, 14:19 Dimitry Andric <dimitry AT unified-streaming DOT 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

-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019