Re: Incorrect results with unique of 20 or more elements

2020-01-28 Thread Dr . Jürgen Sauermann
Hi Kacper, I am aware of the non-transitivity of = when ⎕CT ≠ 0. However, the algorithm used in GNU APL is essentially the same as in the ISO standard. The result is sometimes puzzling. The difference between GNU APL and ISO is that the ISO algorithm has, in the worst case, quadratic runtime, whi

Re: Incorrect results with unique of 20 or more elements

2020-01-28 Thread Kacper Gutowski
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

Revised FIO∆pipeto

2020-01-28 Thread Bill Daly
I'd like to contribute the two attached files to the gnu-apl project. Quad_FIO.tc includes test cases for FIO∆pipeto and FIO∆pipefrom, while FILE_IO.apl has a revised version of FIO∆pipeto discovered during testing. Bill Daly #!/usr/local/bin/apl --script --

Incorrect results with unique of 20 or more elements

2020-01-28 Thread Kacper Gutowski
Hello, Unique with argument of 20 or more items gives results in an incorrect order: ∪'abbbaaa' ab ∪'abbb' 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.95 1.000