There is a minor time and space saving from using
x [EMAIL PROTECTED] y  compared to  ?x$y :

   ts '? 1000 1000 $ 100'
0.0448292 8.38957e6
   ts '1000 1000 [EMAIL PROTECTED] 100'
0.0292618 4.19526e6

More so for y which is a small power of 2, esp.
for y=2 :

   ts '? 1000 1000 $ 2'
0.0143119 5.24365e6
   ts '1000 1000 [EMAIL PROTECTED] 2'
0.00207931 1.04947e6

   ts '? 1000 1000 $ 256'
0.0243048 8.38957e6
   ts '1000 1000 [EMAIL PROTECTED] 256'
0.00988394 4.19526e6



----- Original Message -----
From: John Randall <[EMAIL PROTECTED]>
Date: Monday, January 15, 2007 8:18 am
Subject: Re: [Jgeneral] Invert max  and LAPACK

> The addon structure is being changed from ~addons/lapack to
> ~addons/math/lapack : this may cause confusion.
> 
>      load '~addons/math/lapack/lapack.ijs'
>      load '~addons/math/lapack/dgesv.ijs'
>      dgesv_z_=:dgesv_jlapack_
>      testm=:3 : '(? (y,y) $ 100);=i.y'
> 
> On my computer (32 bit Windows, 1GB) I can get (at least) up to
> 
>   dgesv testm 2000
> 
> before running out of memory.
> 
> You may want to reformulate your problem: calculating inverses and
> determinants is very computationally expensive and potentially 
> inaccurate. For example, if you want to solve Ax=b, finding the 
> inverse of A is not a
> good way to go about it numerically.


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to