"Neil Jerram" wrote: >"Marco Maggi" <[EMAIL PROTECTED]> writes: >> Example: I have two predicates HIT-NAN? and MAP-NAN? >> which one it is better to call NAN? > >I'm afraid I don't understand. Perhaps you could write >the down for the two possibilities that you have in mind.
For a vector of real numbers like this [1 +nan.0 3]: * hit-nan? returns #t because at least one element is nan; * map-nan? returns #(#f #t #f), one boolean for each element; the same for matrices. map-nan? works like the 'isnan' function of GNU Octave, which for the example vector would return [0 1 0]. hit-nan? can be used in the conditional of IF and COND, while map-nan? must be inspected. For this reason I guess that hit-nan? should be the nan?, but, to the best of my knowledge, GNU Octave defines only the map-nan? equivalent so I do not know how useful can be hit-nan? in practice. -- 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