bug-apl
[Top][All Lists]
Advanced

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

Re: Incorrect results with unique of 20 or more elements


From: Kacper Gutowski
Subject: Re: Incorrect results with unique of 20 or more elements
Date: Tue, 28 Jan 2020 18:10:17 +0100

Actually, while the algorithm used for 20≥⍴ works well with characters or integers (once you fix the direction of inequality), I don't think it's actually correct at all for non-zero ⎕CT because tolerant equality is not transitive. Consider this:
      X←1+0 1 2 5 4 3×(⎕CT←1E¯9)÷2
      ∪19↑X
1 1.000000001 1.000000002 0
      ∪20↑X
1.000000001 1.000000002 0

Both expressions should give the same result.
-k



reply via email to

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