Raul wrote:
I don't understand?
What is unexpected here?
Are you surprised that 0 is the fill element for
numeric arrays?
No, but using a numeric fill causes a clearly incorrect answer if 0 is a
possible element of the difference set. I think there is a real problem
with using a fill element of 0 for this case.
(0 2 3) -. /"_1 0 ] 0 2 3
(0 2 3) -. /"_1 0 ] 0 2 4
0
0
3
Clearly the first two items are inconsistent between the two results because
of the necessity for fill.
(0 2 3)(<@ -.) /"_1 0 ] 0 2 4
adds boxing which gives correct results and which I should have realised was
perhaps essential anyway.
Thanks Raul and Henry.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm