DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 60K92aJC629084
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 60K92aJC629084
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=gxVGOk8R
X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF6CF4BC7ECE
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1768899755;
	bh=cujEAa9XgyJZUuneEX5Yp8peaCRK5i/syz9M5yIDf4c=;
	h=Date:To:Cc:In-Reply-To:Subject:References:List-Id:
	 List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
	 From:Reply-To:From;
	b=gxVGOk8RvLPiZMRT8oN8TJbxgo6wwpwAKu3d7nazOTXI1U/nhOE3h46UJJTqW1G93
	 Jvd9ABiy/6lQbeEv6+VbhhlkvPIpngVv1xTWX15UUFuksRLck0ypsQDSeGd57KBMma
	 9iCIOx5OPJbegpj1yJRn+zWaoxxZu7bRzRe+rL3k=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8A4654BA9001
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8A4654BA9001
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1768899736; cv=none;
 b=aSTlwFuZ8J6L748UjB5czE4y8jdOaoQWPQCe3Eld4NJUWXvtB4LczTZE6xo7fAsK30mvsNgR5VbUscoNcrLAf5jJ9rDh+Yke1MhQVBVHLlH3i5ZpfUxGNfliX51+ds94Od7UMsOBM6YfLYI/TK8Tsi/sNGaHn9P/7HGivY9NS3k=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1768899736; c=relaxed/simple;
 bh=B5qW2BbJK4BP3/+P+tCfictP4rp9BpcNagfCcuu9YLA=;
 h=DKIM-Signature:Date:Message-Id:From:To:Subject;
 b=CrbdhyL+zQXFwP41s3IsF+ip42Dd5aFjMte+bx/evmNT0sVWhBTfErqpWJYuLOgJ64HKlNICHmMWqqwbLMHIqlon3dbSlR8ERLdwgDVEyIywqrtG0PJpkJMWCA0SAGgpPJu7Molp+uYEj8dCKcAKTkzvW4ZaKPnTxC4vNzVXa9I=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A4654BA9001
X-CSE-ConnectionGUID: GxblrEIfSQyLMhcpSkGclQ==
X-CSE-MsgGUID: bpjN4TOdTPG1R+xqm8vMsQ==
Received-SPF: SoftFail (mail2-relais-roc.national.inria.fr:
 domain of Paul.Zimmermann@inria.fr is inclined to not
 designate 152.81.2.78 as permitted sender) identity=mailfrom;
 client-ip=152.81.2.78;
 receiver=mail2-relais-roc.national.inria.fr;
 envelope-from="Paul.Zimmermann@inria.fr";
 x-sender="Paul.Zimmermann@inria.fr"; x-conformance=spf_only;
 x-record-type="v=spf1"; x-record-text="v=spf1
 include:mailout.safebrands.com a:basic-mail.safebrands.com
 a:basic-mail01.safebrands.com a:basic-mail02.safebrands.com
 ip4:128.93.142.0/24 ip4:192.134.164.0/24 ip4:128.93.162.160
 ip4:128.93.162.3 ip4:128.93.162.88 ip4:89.107.174.7 mx ~all"
Received-SPF: None (mail2-relais-roc.national.inria.fr: no sender
 authenticity information available from domain of
 postmaster@araignee) identity=helo; client-ip=152.81.2.78;
 receiver=mail2-relais-roc.national.inria.fr;
 envelope-from="Paul.Zimmermann@inria.fr";
 x-sender="postmaster@araignee"; x-conformance=spf_only
X-IronPort-AV: E=Sophos;i="6.21,240,1763420400"; d="scan'208";a="259395971"
Date: Tue, 20 Jan 2026 10:02:13 +0100
Message-Id: <p9u01pjkveqy.fsf@araignee.loria.fr>
To: KENNON J CONRAD <kennonconrad@comcast.net>
Cc: cygwin@cygwin.com
In-Reply-To: <335671721.621101.1768877396354@connect.xfinity.com> (message
 from KENNON J CONRAD on Mon, 19 Jan 2026 18:49:56 -0800 (PST))
Subject: Re: Log2 seems inefficient
References: <226987210.591128.1768766440723@connect.xfinity.com>
 <3c56778a-870c-4bae-a855-6b96392870c8@SystematicSW.ab.ca>
 <p9u0ikcyugor.fsf@araignee.loria.fr>
 <335671721.621101.1768877396354@connect.xfinity.com>
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: Paul Zimmermann via Cygwin <cygwin@cygwin.com>
Reply-To: Paul Zimmermann <Paul.Zimmermann@inria.fr>
MIME-Version: 1.0
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>

       Hi Kennon,

> Thank you, Paul.  It looks like it would be worth a try as the current log2 implementation from Cygwin is clearly not optimal for either speed or accuracy.  This may be a stupid question, but what would be the easiest way to incorporate this into open source software?  Should I rename the function and copy the (slightly modified) source code into the distribution?

yes, the file is self-content, just rename cr_log2() into log2(),
making sure you keep the copyright paragraph at the beginning.

For ease of maintenance, also indicate which commit of CORE-MATH you used,
and document changes if you need some.

Feel free to contact us (core-math@inria.fr) in case of problem.

Best regards,
Paul

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