unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: "Mikael Djurfeldt" <mikael@djurfeldt.com>
To: "Neil Jerram" <neiljerram@googlemail.com>
Cc: Bill Schottstaedt <bil@ccrma.stanford.edu>, bug-guile@gnu.org
Subject: Re: (gcd -2) -> -2
Date: Tue, 12 Aug 2008 16:28:55 +0200	[thread overview]
Message-ID: <66e540fe0808120728y271405d9v137c71b6613dd985@mail.gmail.com> (raw)
In-Reply-To: <49dd78620808120656t2e6a34d3k202e28e847302daf@mail.gmail.com>

2008/8/12 Neil Jerram <neiljerram@googlemail.com>:
> 2008/8/12 Bill Schottstaedt <bil@ccrma.stanford.edu>:
>> gcd is supposed to ignore factors of -1.
>
> According to?  (I'm not suggesting that you're wrong.  I'd just like
> you to be precise about your references.)

R5RS:

6.2.5 Numerical operations

 -- library procedure: gcd n1 ...,
 -- library procedure: lcm n1 ...,
     These procedures return the greatest common divisor or least common
     multiple of their arguments.  The result is always non-negative.

     (gcd 32 -36)                           ==>  4
     (gcd)                                  ==>  0
     (lcm 32 -36)                           ==>  288
     (lcm 32.0 -36)                         ==>  288.0  ; inexact
     (lcm)                                  ==>  1

>> "<" is restricted to reals -- a complex arg should be an error.
>
> Again, is that specified?
>
> Mathematically, I can't help wondering about Lim(x + iy) as y -> 0.
> Or, in Scheme terms, about inexact numbers.  Does inexactness in
> Scheme pertain only to the real dimension?

Mathematically, < doesn't have a meaning if its arguments complex,
i.e. if y above isn't exactly zero.  In Scheme terms, I guess one has
to consider a number real if the imaginary part is 0.0 even though it
is an inexact real number...




  reply	other threads:[~2008-08-12 14:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-11 18:15 (gcd -2) -> -2 Bill Schottstaedt
2008-08-12  9:14 ` Neil Jerram
2008-08-12 11:27   ` Bill Schottstaedt
2008-08-12 13:56     ` Neil Jerram
2008-08-12 14:28       ` Mikael Djurfeldt [this message]
2008-09-17 20:53         ` [PATCH] " Neil Jerram
2008-09-18  8:05           ` Ludovic Courtès

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=66e540fe0808120728y271405d9v137c71b6613dd985@mail.gmail.com \
    --to=mikael@djurfeldt.com \
    --cc=bil@ccrma.stanford.edu \
    --cc=bug-guile@gnu.org \
    --cc=neiljerram@googlemail.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).