Roger Hui <[EMAIL PROTECTED]> wrote: > I suggest you avoid use of _. . Among other things, > certain CPUs slows down by a large factor if your > array contains it. (Sorry, don't have the URL > right now that presents that benchmark.) If you want > to use a datum to indicate missing values perhaps > you can choose an "unlikely" value, such as > _987987987e98 .
Use of "magic" numbers to indicate special values often creates pits that people eventually fall into. Like the old programs that used 9999 as terminators, or court calendars that used "deferred to 1999-12-31" to mean "deferred indefinitely" (causing lots of frenied hysteria at Y2K). There is always the risk that some legitimate value could, under the right circumstances, equal your "magic" value - and such bugs can be very hard to find. "Philip A. Viton" <[EMAIL PROTECTED]> wrote: > but on the other hand I was a bit surprised that > > 1 2 3 <. 1 _. 3 is > 1 2 3 I have read that in some statistical applications (someone please correct me if I am wrong) they may deal with arrays containing unknown values so certain functions, such as maximum, minimum and mean are explicitly defined to ignore such unknown values (otherwise, <./array and >./array would always be _. which is less useful). While J could not define (+/%#) to ignore _. without being inconsistent, <. and >. seem to do so. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
