Hi Fred,
thanks. Fixed in SVN 972.
/// Jürgen
On 06/24/2017 11:50 PM, Frederick Pitts
wrote:
Hello Jürgen,
I get
¯11J¯1 | ¯10J¯12
modulus (A) is: (-11,-1)
⎕CT is: 1e-13
A=0 is: (0,0)
A+A=0 is: (-11,-1)
B÷A+A=0 is: (1,1)
bif_floor(): area c: x=1, y=1
⌊B÷A+A=0 is: (1,0)
A×⌊B÷A+A=0 is: (-11,-1)
B-A×⌊B÷A+A=0 is: (1,-11)
1J¯11
According to the diagram in Eugene's article, ⌊ 1J1 is 1J0,
not 1J1.
Regards,
Fred
On Sat, 2017-06-24 at 23:12 +0200, Juergen Sauermann wrote:
Hi Fred,
interesting. I get:
¯11J¯1 |
¯10J¯12
modulus (A) is: (-11,-1)
⎕CT is: 1e-13
A=0 is: (0,0)
A+A=0 is: (-11,-1)
B÷A+A=0 is: (1,1)
bif_floor(): area a/d: x=0, y=0
⌊B÷A+A=0 is: (1,1)
A×⌊B÷A+A=0 is: (-10,-12)
B-A×⌊B÷A+A=0 is: (0,0)
0
Attached is a debug variant using SVN 761.
Best Regards,
Jürgen
On 06/24/2017 09:27 PM, Frederick
Pitts wrote:
Jürgen,
Using SVN 971 and testing all possible parings of
Gaussian integers where the real and imaginary parts range
independently from ¯15 to 15, the residue function yields
the following anomalous results
¯11J¯1 | ¯10J¯12 1J¯11
1J¯11 0
¯11J1 | ¯12J¯10 ¯1J¯11
¯1J¯11 0
¯1J¯11 | 10J¯12 11J¯1
11J¯1 0
1J¯11 | 12J¯10 11J1
11J1 0
¯1J11 | ¯12J10 ¯11J¯1
¯11J¯1 0
1J11 | ¯10J12 ¯11J1
¯11J1 0
11J¯1 | 12J10 1J11
1J11 0
11J1 | 10J12 ¯1J11
¯1J11 0
The first item in each test result line is not in the
complete residue system for the given modulus as evidenced
by the second item on the line.
The same test using McDonnell's APL implementations of
floor and residue yields no errors.
Regards,
Fred
On Sat, 2017-06-24 at 20:21 +0200, Juergen Sauermann
wrote:
Hi Fred,
I am glad to hear that. It is in SVN 971 now. It
was Jay who moved us into the right
direction, thanks for that. I had used the Donell paper
earlier (when designing complex
floor) but the borderline cases (i.e. when ⎕CT
makes a difference) were not considered
in the paper, and the descriptions in both ISO and the
APL2 language reference are
entirely misleading in that respect.
Have a nice weekend,
Best Regards,
/// Jürgen
On 06/24/2017 07:55 PM,
Frederick Pitts wrote:
Hello Jürgen,
SUCCESS.
The cut-and-paste below from my platform
is identical to yours
5J3 | ¯7J6
⎕CT is: 1e-13
modulus (A) is: (5,3)
A=0 is: (0,0)
A+A=0 is: (5,3)
B÷A+A=0 is: (-0.5,1.5)
⌊B÷A+A=0 is: (0,1)
A×⌊B÷A+A=0 is: (-3,5)
B-A×⌊B÷A+A=0 is: (-4,1)
¯4J1
and 5J3 | 4J¯1 ¯4J1 give the correct answer too.
If you want, I can patch the undebugged version of
Complex.cc and run a battery of tests. If not, I will
wait and run the tests on the next SVN version.
I think i need to find something useful to do with
Gaussian integers.
Regards,
Fred
|