From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Fast R6RS div/mod; improved extensibility of numerics Date: Sun, 30 Jan 2011 23:24:29 +0100 Message-ID: References: <87lj221hn7.fsf@yeeloong.netris.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1296425982 3037 80.91.229.12 (30 Jan 2011 22:19:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 30 Jan 2011 22:19:42 +0000 (UTC) Cc: guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Jan 30 23:19:38 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PjfcP-0000yh-7j for guile-devel@m.gmane.org; Sun, 30 Jan 2011 23:19:37 +0100 Original-Received: from localhost ([127.0.0.1]:42703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjfcO-0000M1-MK for guile-devel@m.gmane.org; Sun, 30 Jan 2011 17:19:36 -0500 Original-Received: from [140.186.70.92] (port=43099 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjfcL-0000Lw-SL for guile-devel@gnu.org; Sun, 30 Jan 2011 17:19:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjfcK-0002CZ-Ha for guile-devel@gnu.org; Sun, 30 Jan 2011 17:19:33 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:57757 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjfcK-0002CU-Do for guile-devel@gnu.org; Sun, 30 Jan 2011 17:19:32 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id A62E6483D; Sun, 30 Jan 2011 17:20:22 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=Cm2zKZ/7scAXHTv/dVZ0J4AOVKo=; b=AXkMmG aMpa+WPz9orjTR6/B/NO9YccyWS1/x4OTg4mlHxfEfPtGR238bnhM5NLZTTlIdL+ 2OCHfb9274motL/nliCHpgVXlfS9oVxv5OffymhVwc464HKDENpB6I0R+v6rEi32 jxuyGJTvlR/yJ+4BObdJ+6aKjwdjO8DmamzTg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=KgvMSV7ZQXIJaTbvAP9sqyknW+q6Smlg WYSb96FmO93wTm8iEDmDT24tjnVw8ZFcftxLN3vZeHxU07Jmi33oRRXzxIW6wBlc xTqH0YJVB14zazmhJZsaUoLlGZM7nEJt2Vvhmtb7jUXuLZ2Tgokxcw5WY0a2CKfj /xK1AMYTenM= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 92D4F483C; Sun, 30 Jan 2011 17:20:21 -0500 (EST) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id BDD8F483B; Sun, 30 Jan 2011 17:20:19 -0500 (EST) In-Reply-To: <87lj221hn7.fsf@yeeloong.netris.org> (Mark H. Weaver's message of "Sun, 30 Jan 2011 11:27:24 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 206E98BA-2CBF-11E0-AC1D-BC4EF3E828EC-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11439 Archived-At: On Sun 30 Jan 2011 17:27, Mark H Weaver writes: > Here are another four patches of numerics improvements. Applied all up to the last. Sweet! And thank you! > The other three I named `centered/', `centered-quotient', and > `centered-remainder', because the range of their remainder operation is > centered on 0 in a twos-complement sort of way. They are almost the > same as Taylor's `round/' et al, but in my opinion they have superior > properties, as I explained in a recent commentary on this list. I agree they do have some good properties, and am happy to see them in the core, and with non-privileged names (allowing for round_quotient et al to be added, possibly, in the future). If you have time though, I wonder would scm_centered_divide be a better name than scm_centered_quo_and_rem? "Divide" is the pronunciation of the "/" procedure, I think. > The last two patches improve the extensibility of numeric operations, > and as a side effect add documentation strings to many of them. Much appreciated. > The last patch might be slightly controversial. Although it does not > make `integer-expt' a generic function, nonetheless it can now > exponentiate _any_ scheme object that can be multiplied using `*'. To me this is fine, in principle; but I wonder about causing `(expt #t 0)' to produce 1. It seems that in any case the range of the output should be continuous -- i.e. if (expt 1) produces a matrix, and (expt n) for n > 1 makes a matrix, then (expt 0) should also produce a matrix. Or no? Cheers, Andy -- http://wingolog.org/