unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Marius Vollmer <mvo@zagadka.de>
Cc: bug-guile@gnu.org
Subject: Re: generic * and 0
Date: Wed, 06 Dec 2006 17:52:43 +0200	[thread overview]
Message-ID: <873b7tyqb8.fsf@zagadka.de> (raw)
In-Reply-To: <87wt57ky8z.fsf@zip.com.au> (Kevin Ryde's message of "Tue\, 05 Dec 2006 11\:00\:28 +1100")

Kevin Ryde <user42@zip.com.au> writes:

> The only case I can think of where a common zero may not be good is
> with matrices, where "(* 0 matrix) => matrix" could preserve the
> dimensions of the input matrix in the output matrix.

I would have to dig for the specifics (having forgotton most of my
math by now), but 'scaling' matrices and 'multiplying' them are
actually two different operations.  They are unfortunately notated the
same. (* scalar matrix) is scaling, and (* matrix matrix) is
multiplying.  A special case of this is the more familiar vector
scaling versus the vector dot product, I think.

Thus, it makes sense to me to let the 'unknown' object in a call to an
arithmetic operation decide how to interpret it, and not doing any
shortcuts.

In general, it is not guaranteed that (* 0 something) is even
well-defined, it might be an error.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


  parent reply	other threads:[~2006-12-06 15:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29 17:58 generic * and 0 SZAVAI Gyula
2006-12-01 19:56 ` Kevin Ryde
2006-12-01 20:22   ` Mikael Djurfeldt
2006-12-01 21:52     ` Kevin Ryde
2006-12-04  0:26       ` Kevin Ryde
2006-12-04 18:26         ` Mikael Djurfeldt
2006-12-05  0:00           ` Kevin Ryde
2006-12-05 14:07             ` SZAVAI Gyula
2006-12-05 15:33               ` Mikael Djurfeldt
2006-12-05 15:51                 ` Ludovic Courtès
2006-12-05 19:42                   ` Mikael Djurfeldt
2006-12-06 15:52             ` Marius Vollmer [this message]
2006-12-07 15:28               ` Mikael Djurfeldt

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=873b7tyqb8.fsf@zagadka.de \
    --to=mvo@zagadka.de \
    --cc=bug-guile@gnu.org \
    /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).