Hi Frederick, thanks, I will study the paper below in detail. GNU APL uses the Euclidean algorithm in the form optimized by Gabriel Lame. You will find the implementation of it at ComplexCell.cc lines 299 ff in function ComplexCell::bif_residue() (bif stands for built-in function). The cval() function is defined in ComplexCell.hh. Let me point out that all errors detected so far were caused by either faults in the rounding of doubles to ints or by not checking some near-int quotients and not by the algorithm itself. Best Regards, Jürgen On 04/27/2017 01:40 AM, Frederick Pitts
wrote:
Jürgen, SVN 937 works for me.Out of curiosity, is the Euclidean division algorithm described starting at the bottom of page 6 of http://www.math.uconn.edu/~kconrad/ blurbs/ugradnumthy/Zinotes.pdf relevant to how you are performing the modulo function on Gaussian integers? The description is fairly specific about how to select the Gaussian integer for the quotient. Regards, Fred On Wed, 2017-04-26 at 22:08 +0200, Juergen Sauermann wrote:Hi, thanks a lot. I believe I found it now. The check for near-int in the complex modulo was still incorrect (and interestingy correct in the non-complex case). SVN 937. /// Jürgen On 04/26/2017 09:08 PM, Peter Teeson wrote:In which header is cval() defined?On Apr 26, 2017, at 3:00 PM, Kacper Gutowski <mwgam...@gmail.com> wrote: On Wed, Apr 26, 2017 at 06:30:34PM +0200, Juergen Sauermann wrote:For those of you that can reproduce the problem on their machine, please let me know if the problem has not disappeared.I just compiled 934 and 3J1|23J1 gives 3J1 for me too. My g++ version is 6.3.0 20170415 on debian sid. -k |
- [Bug-apl] Problem with modulo arithmetic on Gaussian int... Frederick Pitts
- Re: [Bug-apl] Problem with modulo arithmetic on Gau... Juergen Sauermann
- Re: [Bug-apl] Problem with modulo arithmetic on Gau... Frederick Pitts
- Re: [Bug-apl] Problem with modulo arithmetic on... Frederick Pitts
- Re: [Bug-apl] Problem with modulo arithmeti... Jay Foad
- Re: [Bug-apl] Problem with modulo arith... Juergen Sauermann
- Re: [Bug-apl] Problem with modulo ... Kacper Gutowski
- Re: [Bug-apl] Problem with mod... Peter Teeson
- Re: [Bug-apl] Problem with... Juergen Sauermann
- Re: [Bug-apl] Problem with... Frederick Pitts
- Re: [Bug-apl] Problem with... Juergen Sauermann
- Re: [Bug-apl] Problem with... Juergen Sauermann
- Re: [Bug-apl] Problem with... Peter Teeson
- Re: [Bug-apl] Problem with modulo arithmeti... Peter Teeson
- Re: [Bug-apl] Problem with modulo arith... enztec
- Re: [Bug-apl] Problem with modulo arith... Juergen Sauermann
- Re: [Bug-apl] Problem with modulo ... Peter Teeson