Re: [Jprogramming] g420fg NaN error (defining a dyadic verb)

2018-08-07 Thread Linda Alvord
Behalf Of Gilles Kirouac Sent: Tuesday, August 7, 2018 11:25 AM To: programm...@jsoftware.com Subject: Re: [Jprogramming] g420fg NaN error (defining a dyadic verb) To define alpha1 as a dyadic verb, use alpha1=: 4 :'y /: <./x i."1 _ y'   NB. 4 instead of 3 ~ GIlles Le 2018-08

Re: [Jprogramming] g420fg NaN error

2018-08-07 Thread Henry Rich
Curses.  Thanks for checking. Henry On 8/7/2018 12:11 PM, Bill Heagy wrote: Doesn't help, even after changing FE_ALL_EXCEPTS to FE_ALL_EXCEPT (no "S"). On 2018-08-07 11:34 AM, Henry Rich wrote: I pushed something else for you to try. clang reportedly supports feclearexcept from the C standard

Re: [Jprogramming] g420fg NaN error

2018-08-07 Thread Bill Heagy
Doesn't help, even after changing FE_ALL_EXCEPTS to FE_ALL_EXCEPT (no "S"). On 2018-08-07 11:34 AM, Henry Rich wrote: I pushed something else for you to try.  clang reportedly supports feclearexcept from the C standard.  Maybe it supports it better than _clearfp.  I have pushed a version that us

Re: [Jprogramming] g420fg NaN error

2018-08-07 Thread Henry Rich
I pushed something else for you to try.  clang reportedly supports feclearexcept from the C standard.  Maybe it supports it better than _clearfp.  I have pushed a version that uses feclearexcept if the symbol __STDC_IEC_559__ is defined.  I read rumors than clang sets this symbol, but I can't c

Re: [Jprogramming] g420fg NaN error (defining a dyadic verb)

2018-08-07 Thread Gilles Kirouac
To define alpha1 as a dyadic verb, use alpha1=: 4 :'y /: <./x i."1 _ y'   NB. 4 instead of 3 ~ GIlles Le 2018-08-07 à 03:46, Linda Alvord a écrit : I can't seem to get messages to the forum. Here's a problem in J806 a=:'abcdefghijklmnopqrstuvwxyz' A=:'ABCDEFGHIJKLMNOPQRSTUVWXYZ' aA=:

Re: [Jprogramming] g420fg NaN error

2018-08-07 Thread Linda Alvord
s |[-19] c:\users\linda\j64-806-user\temp\32.ijs Linda -Original Message- From: Programming On Behalf Of Henry Rich Sent: Monday, August 6, 2018 11:01 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] g420fg NaN error Thanks.  I guess we have to figure out how to convince

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Bill Heagy
Ok, I won't expect that tonight B-) On 2018-08-06 11:20 PM, Henry Rich wrote: I have reverted the latest push and await a compiler fix. Henry Rich On 8/6/2018 11:01 PM, Bill Heagy wrote: SVN 861 for the gcc/clang tests and the 2-parts test On 2018-08-06 10:59 PM, Henry Rich wrote: Did you c

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Henry Rich
I have reverted the latest push and await a compiler fix. Henry Rich On 8/6/2018 11:01 PM, Bill Heagy wrote: SVN 861 for the gcc/clang tests and the 2-parts test On 2018-08-06 10:59 PM, Henry Rich wrote: Did you check out the latest push to see if that makes any difference? Henry Rich On 8/

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Henry Rich
Thanks.  I guess we have to figure out how to convince clang to create the right code then, eh? Henry Rich On 8/6/2018 10:59 PM, Bill Heagy wrote: And yes, both parts fail (assuming you're talking about the failing line in g420fg) On 2018-08-06 10:50 PM, Bill Heagy wrote: clang with -O0 fix

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Bill Heagy
SVN 861 for the gcc/clang tests and the 2-parts test On 2018-08-06 10:59 PM, Henry Rich wrote: Did you check out the latest push to see if that makes any difference? Henry Rich On 8/6/2018 10:50 PM, Bill Heagy wrote: clang with -O0 fixes it too. On 2018-08-06 10:44 PM, Bill Heagy wrote: Bui

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Bill Heagy
And yes, both parts fail (assuming you're talking about the failing line in g420fg) On 2018-08-06 10:50 PM, Bill Heagy wrote: clang with -O0 fixes it too. On 2018-08-06 10:44 PM, Bill Heagy wrote: Building with gcc works ok.  I'll try clang/-O0 On 2018-08-06 10:01 PM, bill lam wrote: Just a

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Henry Rich
Did you check out the latest push to see if that makes any difference? Henry Rich On 8/6/2018 10:50 PM, Bill Heagy wrote: clang with -O0 fixes it too. On 2018-08-06 10:44 PM, Bill Heagy wrote: Building with gcc works ok.  I'll try clang/-O0 On 2018-08-06 10:01 PM, bill lam wrote: Just a gues

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Bill Heagy
clang with -O0 fixes it too. On 2018-08-06 10:44 PM, Bill Heagy wrote: Building with gcc works ok.  I'll try clang/-O0 On 2018-08-06 10:01 PM, bill lam wrote: Just a guess, recently we switched from gcc to clang. clang is too smart in optimization that it short circuit some code that deals wit

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Bill Heagy
Building with gcc works ok. I'll try clang/-O0 On 2018-08-06 10:01 PM, bill lam wrote: Just a guess, recently we switched from gcc to clang. clang is too smart in optimization that it short circuit some code that deals with NaN, I've put some inline asm to teach clang register flags need checki

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread bill lam
Just a guess, recently we switched from gcc to clang. clang is too smart in optimization that it short circuit some code that deals with NaN, I've put some inline asm to teach clang register flags need checking. This works in the past. Can you try build and test with -O0 or with gcc? On Tue, Aug

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Henry Rich
This baffles me.  I wonder if there is some compiler interaction with _clearfp().  In case so, I have pushed out another change that puts a couple of memory fetches between the clearfp()s. Would you please build that & report back?  If it fails on the same line, please try the two parts individ

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Jimmy Gauvin
If it can be of any help, everything is fine in my older J version in Linux : etx =: 1 : 'x :: (<:@(13!:11)@i.@0: >@{ 9!:8@i.@0:)' NB. error message 'domain error' -: +/@:*"1~ etx u: 'abc' 1 0 _ 1 (+/@:*"1 -: +/@:*"_"1) _ 0 2 NB. removable NaN 1 JVERSION Engine: j701/2011-01-10/11:25 Librar

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Henry Rich
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=D

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Raul Miller
Ah... In that case, etx is from https://github.com/jsoftware/jsource/blob/master/test/tsu.ijs#L62 etx =: 1 : 'x :: (<:@(13!:11)@i.@0: >@{ 9!:8@i.@0:)' NB. error message from error number So, basically, the test is whether +/@:*"1~ u: 'abc' produces a domain error. And, since it does produc

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Bill Heagy
Clarifying, I'm running "RUN1 'g420fg'" or equivalent, and just quoting the end output. On 2018-08-06 06:28 PM, Raul Miller wrote: I get 'domain error' -: +/@:*"1~ etx u: 'abc' |value error: etx FYI, -- For information

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Raul Miller
I get 'domain error' -: +/@:*"1~ etx u: 'abc' |value error: etx FYI, -- Raul On Mon, Aug 6, 2018 at 6:26 PM Bill Heagy wrote: > > Sorry, I was a bit hasty there. I see it on 64-bit linux too. > > On 2018-08-06 06:13 PM, Bill Heagy wrote: > > 32-bit again? > > > > .. > > 1 > > 'do

Re: [Jprogramming] g420fg NaN error

2018-08-06 Thread Bill Heagy
Sorry, I was a bit hasty there. I see it on 64-bit linux too. On 2018-08-06 06: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-:+/@:*"

[Jprogramming] g420fg NaN error

2018-08-06 Thread Bill Heagy
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/201