Discussion:
[Bug-apl] Bug in ⊤ ?
Elias Mårtenson
2017-03-30 04:25:30 UTC
Permalink
While discussing APL and J on IRC, I discovered a weird behavioural
difference. Is GNU APL doing the right thing here?

* 10 10 10 ⊀ 125 46 789*
┏→━━━━┓
↓1 0 7┃
┃2 4 8┃
┃5 6 9┃
┗━━━━━┛

I'd expect to get the result that I'm getting by applying ⍉ to the result,
in other words, I'd expect the following:

┏→━━━━┓
↓1 2 5┃
┃0 4 6┃
┃7 8 9┃
┗━━━━━┛

Regards,
Elias
Alexey Veretennikov
2017-03-30 08:56:40 UTC
Permalink
Hi,

It was confusing for me as well but it is the right behavior:

http://help.dyalog.com/15.0/Content/Language/Primitive%20Functions/Encode.htm

Br,
/Alexey
Post by Elias MÃ¥rtenson
While discussing APL and J on IRC, I discovered a weird behavioural
difference. Is GNU APL doing the right thing here?
* 10 10 10 ⊀ 125 46 789*
┏→━━━━┓
↓1 0 7┃
┃2 4 8┃
┃5 6 9┃
┗━━━━━┛
I'd expect to get the result that I'm getting by applying ⍉ to the result,
┏→━━━━┓
↓1 2 5┃
┃0 4 6┃
┃7 8 9┃
┗━━━━━┛
Regards,
Elias
Loading...