bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Problem with modulo arithmetic on Gaussian integers


From: Juergen Sauermann
Subject: Re: [Bug-apl] Problem with modulo arithmetic on Gaussian integers
Date: Thu, 27 Apr 2017 13:02:27 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

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 <address@hidden>
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

 

    


reply via email to

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