Another observation:
Running the "15" the density plot is sometimes (I think) correct when
it is created, but subsequent invocations of "v" give different
changing near infinity values (but don't crash).

    load 'plot'
    sinc=:(sin%])`1:@.(=&0)"0
    x=:0.1*i:200
    g=:+&.:*:"0
    y=:g/~ 0.1*i:200
    'density' plot y
    2 2{.v=:sinc y=:g/~ 0.1*i:15
0.401755 0.432062
0.432062 0.463396
     >./,y
2.12132
     >./,v       NB. OK
1
    'density' plot v
    v
4.24399e_314  9.90108e_321 9.33678e_313  4.25248e_311 3.45885e_312 
4.24399e_314 9.90108e_321 1.35808e_312 4.25248e_311 3.24665e_312 
4.24399e_314 9.90108e_321 1.95224e_312 4.25248e_311 2.94957e_312    2

and on one occasion, it changed half "v" on a small "5"

    2 2{.v=:sinc y=:g/~ 0.1*i:5
0.918725 0.933054
0.933054 0.947514
     >./,y
0.707107
     >./,v       NB. OK
1
    'density' plot v
    v
2.54639e_313 5.72939e_313 7.00259e_313 5.72939e_313 2.54639e_313 
2.54639e_313 7.00259e_313 9.12458e_313 9.12458e_313 7.00259e_313 
2.54639e_313
7.00259e_313 1.01856e_312 1.14588e_312 1.01856e_312 7.00259e_313 
5.72939e_313 1.01856e_312 1.25198e_312 1.25198e_312 1.01856e_312 
5.72939e_313
9.12458e_313 1.25198e_312 1.35808e_312 1.25198e_312 9.12458e_313 
7.00259e_313 1.14588e_312 1.35808e_312 1.35808e_312 1.14588e_312 
7.00259e_313
9.12458e_313 1.25198e_312 1.35808e_312 1.25198e_312 9.12458e_313 
5.72939e_313 1.01856e_312 1.25198e_312 1.25198e_312 1.01856e_312 
5.72939e_313
7.00259e_313 1.01856e_312 1.14588e_312 1.01856e_312 7.00259e_313 
2.54639e_313 7.00259e_313 9.12458e_313 9.12458e_313 7.00259e_313 
2.54639e_313
2.54639e_313 5.72939e_313 7.00259e_313 5.72939e_313 2.54639e_313 
0.923077     0.938462     0.953846     0.969231     0.984615            1
     0.957227     0.971907     0.983416     0.991687      0.99667 
0.998334      0.99667     0.991687     0.983416     0.971907     0.957227
     0.952363     0.966998     0.978474      0.98672     0.991687 
0.993347     0.991687      0.98672     0.978474     0.966998     0.952363
     0.944289     0.958851     0.970269     0.978474     0.983416 
0.985067     0.983416     0.978474     0.970269     0.958851     0.944289
     0.933054     0.947514     0.958851     0.966998     0.971907 
0.973546     0.971907     0.966998     0.958851     0.947514     0.933054
     0.918725     0.933054     0.944289     0.952363     0.957227 
0.958851     0.957227     0.952363     0.944289     0.933054     0.918725

Cliff Reiter wrote:
> Hi,
> In trying to create a circularly symmetric sinc 2-d function
> I have run into a surprising, difficult to isolate crash.
> It seems that the array can be created but crashes occur
> if the "v" below is used after the creation line in the examples
> below. It has never crashed for me with size "15", sometimes does
> for "16", and seems to consistently crash for "200".
> Is this a known bug or problem with my system (windows xp64 running
> 32 bit J6.02; J64 seems to hang rather than crash)? BTW, "plot"
> has nothing to do with the problem as far as I know, but it
> illustrates how simple and non threatening the data is.
> Best, Cliff
> 
> load 'plot'
> sinc=:(sin%])`1:@.(=&0)"0
> x=:0.1*i:200
> g=:+&.:*:"0
> y=:g/~ 0.1*i:200
> 'density' plot y
> 2 2{.v=:sinc y=:g/~ 0.1*i:15
>  >./,y
>  >./,v       NB. OK
> 'density' plot v
> 2 2{.v=:sinc y=:g/~ i:16
>  >./,y
>  >./,v       NB. usually crashes
> 2 2{.v=:sinc y=:g/~ 0.1*i:200
>  >./2 2{.v   NB. crashes when v is used
> 
> 

-- 
Clifford A. Reiter
Mathematics Department, Lafayette College
Easton, PA 18042 USA,   610-330-5277
http://www.lafayette.edu/~reiterc
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to