From: "Marco Maggi" <marco.maggi-ipsu@poste.it>
Subject: Re: design advice on predicate name
Date: Sun, 20 Aug 2006 08:29:08 +0200 [thread overview]
Message-ID: <J4AA0K$9E43D610BCB4FB6E68EED3BBAF9AC832@poste.it> (raw)
"Neil Jerram" wrote:
>My intuition is that the NAN? name should be used only
>for a procedure which takes a single number and reports
>whether it is NAN or not (as #t/#f).
Yes. The abstract behind having a NAN? for my custom
vectors and matrices is to let the user write math
functions that work for both numbers and composite
numeric objects. To let him try them out. I am not sure
about how significant it is, though.
"Neil Jerram" wrote:
>Is it a feature of Octave that any predicate can
>automatically map over a vector, or can `isnan' only
>be applied to a vector?
Predicates that act upon numbers can be applied to
numbers, vectors and matrices. And they always work
like MAP-NAN? Using the number/vector/matrix oriented
functions of Octave it is possible to write custom
predicates that behave in the same way.
Octave also has 'all()' and 'any()' which return a single
0/1 result if all or any of the elements of a num/vec/mat
is 0 or 1. So Octave requires two functions call to
achieve the result of HIT-NAN?
--
Marco Maggi
"They say jump!, you say how high?"
Rage Against the Machine - "Bullet in the Head"
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
next reply other threads:[~2006-08-20 6:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-20 6:29 Marco Maggi [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-08-18 19:01 design advice on predicate name Marco Maggi
2006-08-19 10:37 ` Neil Jerram
2006-08-18 5:42 Marco Maggi
2006-08-18 13:49 ` Neil Jerram
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='J4AA0K$9E43D610BCB4FB6E68EED3BBAF9AC832@poste.it' \
--to=marco.maggi-ipsu@poste.it \
/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).