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: Exposing more math functionality Date: Thu, 19 Aug 2010 09:04:22 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1282233978 23194 80.91.229.12 (19 Aug 2010 16:06:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 19 Aug 2010 16:06:18 +0000 (UTC) Cc: guile-devel To: No Itisnt Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Aug 19 18:06:17 2010 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 1Om7d1-00082t-78 for guile-devel@m.gmane.org; Thu, 19 Aug 2010 18:06:16 +0200 Original-Received: from localhost ([127.0.0.1]:43779 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Om7cl-0004iI-QN for guile-devel@m.gmane.org; Thu, 19 Aug 2010 12:05:51 -0400 Original-Received: from [140.186.70.92] (port=41283 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Om7ZK-0003EW-CY for guile-devel@gnu.org; Thu, 19 Aug 2010 12:02:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Om7ZH-0004w2-UE for guile-devel@gnu.org; Thu, 19 Aug 2010 12:02:18 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:57286 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Om7ZH-0004nD-SN for guile-devel@gnu.org; Thu, 19 Aug 2010 12:02:15 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 8F4F9CEB2C; Thu, 19 Aug 2010 12:01:15 -0400 (EDT) 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=GvCshgIxdGKcDQgz+XX1asR+e7U=; b=IYzsW8 HPF/tgafxRDaVAaPwdi1mqt0qV/qVZ87bhF2wf8QrWHMP6k6bMYeA1ypbcL0+daM mZCl/U9eChLP3B+AkU69FiPNvqjURLb2Gws65sFlymNPsO9kxA6T2MMNvRDbPk8X tnblEbHY+qKMPP88baKQzlOaBgS4ElfyXSfS8= 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=usC+ObCIgEyGf+0fSt0mupHhkZcOSEU4 X6ETEXR1/zdfieylvb1Evhun1eGcKG9yILHt1faf+ZemByFEDm2TQzKDslJW6Hjn jUHyWPTh0gWuc0nih1gB0c1s1Ta8071PHOcmz+atbtZVVmFhL64HQY74+aA9uRLx ns2KcxGoO/c= Original-Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 7D981CEB2B; Thu, 19 Aug 2010 12:01:14 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [75.16.62.19]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 0729BCEB2A; Thu, 19 Aug 2010 12:01:12 -0400 (EDT) In-Reply-To: (No Itisnt's message of "Fri, 23 Jul 2010 22:46:03 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: FE5ED8E2-ABAA-11DF-9F05-9056EE7EF46B-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) 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:10777 Archived-At: Heya, On Fri 23 Jul 2010 20:46, No Itisnt writes: > I'd like to patch Guile's math functionality to expose M_PI, modf, and > probably other things as well. Before I started I thought I'd ask -- > would such a patch be accepted? And is there any policy on where they > should go? It seems a little crass to clutter up the (guile) namespace > any more, but I don't see anywhere else those could go. Hum, I think the right thing is to talk about these one by one. For pi, I think I'd like to avoid adding it to the namespace, partly because I can't think of a good name. M_PI is ugly :) You can always define it as (define pi (* 4 (atan 1))) or something. Actually my schooling was in engineering, so I'd say (define pi 3). ;-) Regarding modf -- it seems that the R6RS extends the definition of `modulo' (called `mod') to be defined over the real numbers. (mod 10 3) => 1 (mod 10 3.0) => 1.0 (mod 10 3.1) => 0.7 This appears to be a compatible extension of the R5RS' `modulo', so we should just extend our definition. That way we can avoid adding another symbol. Let me know if you're interested in doing this, otherwise I'll get around to it eventually. But perhaps someone who is less fast-and-loose with accuracy should do it ;-) Cheers, Andy -- http://wingolog.org/