bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Incorrect results with unique of 20 or more elements


From: Kacper Gutowski
Subject: Incorrect results with unique of 20 or more elements
Date: Tue, 28 Jan 2020 09:34:06 +0100

Hello,
Unique with argument of 20 or more items gives results in an incorrect order:

      ∪'abbbbbbbbbbbaaaaaaa'
ab
      ∪'abbbbbbbbbbbaaaaaaaa'
ba

Or even with wrong set of distinct elements:

      (A B C)←1+¯1 0 1×(⎕CT←1E¯9)÷2
      ∪19↑B A B C
1 0
      ∪20↑B A B C
0.9999999995 1.000000001 0

Looks like the tie breaker used to stabilize the sort in src/Cell.cc:130 should be A > B instead of A < B if I read it right.

-k



reply via email to

[Prev in Thread] Current Thread [Next in Thread]