Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!cs.utexas.edu!uunet!s5!hui
From: hui@fid.morgan.com (Roger Hui)
Subject: Re: Questions of the Day (On the identity matrix)
Message-ID: <1993Mar13.135350.468@fid.morgan.com>
Organization: Morgan Stanley & Co., New York, NY
References: <1993Mar5.054012.11402@csi.uottawa.ca> <1993Mar6.062420.17271@csus.edu> <1993Mar12.201727.19981@Lehigh.EDU>
Date: Sat, 13 Mar 1993 13:53:50 GMT
Lines: 12

re: identity matrix.  There is another "old fashioned" way which
is faster, and a "new fashioned" way which is nearly as fast
but is shorter.

   Defn              6!:2 'fx 1000' on a Sparc10

f1 =. e.@i.                5.466
f2 =. (=/ ])@i.            0.490
f3 =. =/~@i.               0.501

f4 =. =@i.                 0.507
f5 =. ,~ $ {.&1@>:         0.076
