Bill Heagy was able to run valgrind to point out the error.  It afflicted any ;._3-cut that reversed an axis. Fixed for next beta.

Henry Rich

On 6/16/2023 2:03 PM, Jan-Pieter Jacobs wrote:
Hi,
I think I have found a bug in J 9.4 that appears to be present for a while
(e.g. also in the J Playground):

  (1 1,:_2 2) <;._3 i. 3 3 NB. rows reversed
+---+---+
|3 4|4 5|
|0 1|1 2|
+---+---+
|6 7|7 8|
|3 4|4 5|
+---+---+

    (1 1,:2 _2) <;._3 i. 3 3 NB. columns reversed
+---+---+
|1 0|2 1|
|4 3|5 4|
+---+---+
|4 3|5 4|
|7 6|8 7|
+---+---+

    (1 1,:_2 _2) <;._3 i. 3 3 NB. rows and columns reversed?
|limit error, executing dyad <;._3
|a system limit was exceeded
|   (1 1,:_2 _2)    <;._3 i.3 3
    JVERSION
Engine: j9.4.1/j64arm/android
Build: commercial/2023-03-02T04:40:32/clang-14-0-7/SLEEF=1
Library: 9.4.22
J Android: 1.4.60/13/33
Platform: Android 64 (arm64-v8a)
Installer: unknown
InstallPath: /storage/emulated/0/Android/data/com.jsoftware.j.android/files
Contact: www.jsoftware.com

J9.5 beta 3 gives the same result (limit error)

In the J playground, that last one somehow eats rows/columns at the edges:
https://jsoftware.github.io/j-playground/bin/html2/#code=%281%201%2C%3A_2%20_2%29%20%3C%3B._3%20i.%203%203

I expect rather this result:

    (1 1,: 2 2) <@:(|."1)@|.;._3 i. 3 3
+---+---+
|4 3|5 4|
|1 0|2 1|
+---+---+
|7 6|8 7|
|4 3|5 4|
+---+---+


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

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

Reply via email to