From: Phil <theseaisinhere@gmail.com>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: Exposing more math functionality
Date: Thu, 19 Aug 2010 15:37:05 -0500 [thread overview]
Message-ID: <AANLkTinN1XVKK+A0XuKT+14c8j_-LerLzNnqRNjvkpE_@mail.gmail.com> (raw)
In-Reply-To: <m3d3tetwqh.fsf@unquote.localdomain>
On Thu, Aug 19, 2010 at 11:04 AM, Andy Wingo <wingo@pobox.com> wrote:
> Heya,
>
> On Fri 23 Jul 2010 20:46, No Itisnt <theseaisinhere@gmail.com> 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/
I managed to phone it in on these, except for modf, so I don't have
any need for them, although exposing pi might not be a bad idea
anyway.
next prev parent reply other threads:[~2010-08-19 20:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-24 3:46 Exposing more math functionality No Itisnt
2010-08-19 16:04 ` Andy Wingo
2010-08-19 20:37 ` Phil [this message]
2010-08-27 15:44 ` Andy Wingo
2010-08-28 4:02 ` Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinN1XVKK+A0XuKT+14c8j_-LerLzNnqRNjvkpE_@mail.gmail.com \
--to=theseaisinhere@gmail.com \
--cc=guile-devel@gnu.org \
--cc=wingo@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).