Can you help me debug this?  It works on Windows and I don't see any problem in the code.

The sections of interest are at va2.c:787 and va2.c:840.  They run the two verbs, either or both of which might be failing.  The earlier is for +/@:*"1  .

This is line 787:

  NAN0;
  D *av=DAV(a),*wv=DAV(w), *zv=DAV(z); DQ(ndpo, I j=ndpi; D *av0=av; while(1){D total=0.0; DQ(dplen, total+=*av++**wv++;); *zv++=total; if(!--j)break; av=av0;})   if(NANTEST){  // if there was an error, it might be 0 * _ which we will turn to 0.  So rerun, checking for that.
   NAN0;
   D *av=DAV(a),*wv=DAV(w), *zv=DAV(z); DQ(ndpo, I j=ndpi; D *av0=av; while(1){D total=0.0; DQ(dplen, D u=*av++; D v=*wv++; if(u&&v)total+=u*v;); *zv++=total; if(!--j)break; av=av0;})
   NAN1;
  }
  break;


Execute

0 _ 1 +/@:*"1 (_ 0 2)

and see why it doesn't go through the first loop, then go through the second loop, and complete without error.  NAN0 clears floating-point status, NANTEST gives TRUE if there is floating-point error status, and NAN1 raises NaN error if there is floating-point error status.

Henry Rich



On 8/6/2018 6:13 PM, Bill Heagy wrote:
32-bit again?

......
1
   'domain error' -: +/@:*"1~ etx u: 'abc'
1

   NB. Test for NaN
   0 _ 1 (+/@:*"1 -: +/@:*"_"1) _ 0 2   NB. removable NaN
|NaN error
|   0 _ 1    (+/@:*"1-:+/@:*"_"1)_ 0 2
|[-189] /home/wheagy/git/jsource/test/g420fg.ijs


   JVERSION
Engine: j806/j32/linux
Beta: GPL3/2018-08-06T17:48:48
Library: 8.05.14
Platform: Linux 32
Installer: unknown
InstallPath: /home/wheagy/tmp/jbld/j32
Contact: [email protected]
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


---
This email has been checked for viruses by AVG.
https://www.avg.com

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

Reply via email to