|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] Problem with modulo arithmetic on Gaussian integers redux |
Date: | Thu, 15 Jun 2017 14:47:59 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Hi, I have changed the implementation of ComplexCell::bif_residue() to use a more intuitive implementation of integral_within(). (the old one used tolerant_floor() with the dubious half-plane definition from the ISO standard). The new version is SVN 961. If it still does not work then attached is a more verbose variant of the bif_residue() implementation that prints the intermediate results of the computation (so that we can nail down where things go wrong). On my machine I get, for example, this: a ← ¯1J11 b ← ¯12J10 a | b computing (-12,10) modulo (-1,11) ⎕CT is: 1e-13 the quotient B ÷ A is: (1,1) result is 0 because the quotient is integral within ⎕CT 0 Just replace your ComplexCell.cc with the attached one. Thanks, Jürgen On 06/15/2017 10:38 AM, Jay Foad wrote:
|
ComplexCell.cc
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |