I have found a bug that this code hits, though it didn't crash for me.
I have fixed it for the next beta.
The bug was when a modifier returns an argument unchanged. Some flag
bits got corrupted & who knows what would happen.
The line in arofmoru
if. L. m do. m
would generate the situation (returning m unchanged). A possible
workaround would be to make this
if. L. m do. {. ,: m
to force a new block to be allocated.
Henry Rich
On 8/6/2022 5:39 PM, Jan-Pieter Jacobs wrote:
It is the file calculus.ijs in the pull request of Raul I referenced in the
first email.
Here's a direct link:
https://raw.githubusercontent.com/jsoftware/math_calculus/796ddac9de3863bf6746861624bb6aad8b70b9a2/calculus.ijs
Jan-Pieter
On Sat, 6 Aug 2022, 23:31 Henry Rich, <[email protected]> wrote:
I cannot reproduce the problem. I get an error on
load'calculus.ijs'
What is this file? I then get a syntax error on
-@% arofmoru armatch a arofmoru
Henry Rich
On 8/6/2022 5:20 PM, Jan-Pieter Jacobs wrote:
Yes,
load'math/calculus' NB. standard
1&o. deriv_jcalculus_ 3
2&o. * _1"0@(1&o.)
load 'calculus.ijs' NB. Raul's PR.
1&o. deriv_jcalculus_ 3
Segmentation fault (core dumped)
Looks like it is in the "matches" conjunction
The following segfaults in ftymes as follows:
load'calculus.ijs'
coinsert 'jcalculus'
a=: '2&o.' arofstringu
-@% matches a 1 1 0 NB. crashes
matches is defined as : 2 : ' y matchsignature u arofmoru armatch v
arofmoru'
-@% arofmoru armatch a arofmoru
Segfault.
This is as far as I get. I hope you can take it from here :).
arofmoru and armatch are defined as follows, arofstringu and arofu are
the same as in the stock math/calculus (I think).
NB. u is an ar, a string or a verb
arofmoru=: {{
if. 0=nc<'m' do.
if. L. m do. m
else. m arofstringu
end.
else. u f. arofu
end.
}}
armatch=: {{
if. 0 e. x,&L. y do. x-:y
elseif. x -:&$ y do. x armatch each y
else. 0
end.
}}
Good night,
Jan-Pieter
Op za 6 aug. 2022 om 22:43 schreef Henry Rich <[email protected]>:
Can you supply a failing testcase?
Henry Rich
On 8/6/2022 4:38 PM, Jan-Pieter Jacobs wrote:
A little dual-purpose post: today I tried out Raul's pull-request of
24-01-2021 (https://github.com/jsoftware/math_calculus/pull/5) for
simplifying expressions like 1&o. deriv 4 (which seems like a great
idea even if it goes slightly above my hat).
However, I couldn't give it a proper test-drive in J904, because it
segfaults my J when used 1&o. deriv n with n >: 3.
JVERSION
Engine: j904/j64avx/linux
Beta-e: commercial/2022-07-16T19:22:33
Library: 9.04.03
Platform: Linux 64
Installer: J904 install
InstallPath: /home/jpjacobs/j904
Contact: www.jsoftware.com
It works in J903.
Best regards,
Jan-Pieter
----------------------------------------------------------------------
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
----------------------------------------------------------------------
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
----------------------------------------------------------------------
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