On Thu, 24 Feb 2022, Elijah Stone wrote:
http://www.jsoftware.com/pipermail/programming/2014-March/035754.html
(Incidentally, the note on branches in that thread is nonsense now and was
nonsense in 2014. Branch predictors are quite good and will make
mincemeat of a bounds check in a loop.)
x=. a.{~ 1e7 ?@$ 256
timex'/:~x'
1.09009
y=. 1e7 ?@$ 256
'/:~x' %&timex '/:~y'
30.7846
Alternatives, unreasonably faster:
'/:~x' %&timex 'x{~/:x'
12.1395
'/:~x' %&timex '/:~&.(3&u:)x'
14.7522
(This also affects sorting of booleans and 2-byte characters; 4-byte
characters were
Well... this current behavior contradicts
https://www.jsoftware.com/help/dictionary/d031.htm and
https://code.jsoftware.com/wiki/Vocabulary/underdot
So I think it's unintended behavior.
That said, https://code.jsoftware.com/wiki/Vocabulary/percentdot also
says (for %. monadic): "If the columns o
In my mind the inverse of a non invertible matrix is a domain error.
But I have become aware of otherwise
JVERSION
Engine: j902/j64avx2/windows
Release-a: commercial/2020-12-05T13:36:01
Library: 9.02.08
Qt IDE: 1.9.2s/5.12.10(5.12.10)
Platform: Win 64
Installer: J902 install
InstallPath:
You've not spotted the right difference.
It's not that 'r' has length 1 while 're' has length 2. It's that 'r'
has rank 0 while 're' has rank 1. When you change the rank of the
argument you change the rank of the result.
To make your program behave the same on atoms as on 1-atom lists, appl
Well Henry I didn’t mean that because I didn’t know about it!
It is a test to check if all y is contained in x which worked fine until y had
a length of one! I spent all afternoon debugging it until I somehow managed to
check the shape of things and to my surprise the length-one case is treated
Did you mean
$ (,'r') e./ "1 0 test
2 5 1
? Note that
$ 'r' e. 'a'
$ (,'r') e. 'a'
1
Henry Rich
On 2/24/2022 12:29 PM, Richard Donovan wrote:
J901 Windows
$test
2 5
$ 're' e./ "1 0 test
2 5 2
$ 'rebe' e./ "1 0 test
2 5 4
Etc. BUT
$ 'r' e./ "1 0 test
2 5
This
J901 Windows
$test
2 5
$ 're' e./ "1 0 test
2 5 2
$ 'rebe' e./ "1 0 test
2 5 4
Etc. BUT
$ 'r' e./ "1 0 test
2 5
This has caused me no end of problems and appears to be totally inconsistent.
Bug or feature?
Richard Donovan