Discussion:
[Bug-apl] Problem with modulo arithmetic on Gaussian integers
Frederick Pitts
2017-04-25 19:30:41 UTC
Permalink
Jeurgen,

A greatest common divisor of 23J1 and 25J25 is 3J1.
Complex division by of 23J1 and 25J25 by 3J1 yields Gaussian integers

      23J1 25J25 ÷ 3J1
7J¯2 10J5

but mod 3J1 of the same numbers does not consistently yield zeroes

      3J1 | 23J1 25J25
3J1 0

I can provide numerous other examples of this problem if needed.

Regards,

Fred
Juergen Sauermann
2017-04-25 20:05:41 UTC
Permalink
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hi Fred,<br>
<br>
actually it does on my machine:<br>
<br>
<font face="Courier New, Courier, monospace">                   
______ _   __ __  __    ___     ____   __ </font><br>
<font face="Courier New, Courier, monospace"><b>                  
/ ____// | / // / / /   /   |   / __ \ / / </b><b><br>
</b><b>                  / / __ /  |/ // / / /   / /| |  / /_/
// /  </b><b><br>
</b><b>                 / /_/ // /|  // /_/ /   / ___ | / ____//
/___</b><b><br>
</b><b>                 \____//_/ |_/ \____/   /_/  |_|/_/   
/_____/</b><b><br>
</b><b>                                       </b><b><br>
</b><b>                 Welcome to GNU APL version 1.7 /
12784:12785M</b><b><br>
</b><b>                                       </b><b><br>
</b><b>                Copyright (C) 2008-2016  Dr. Jürgen
Sauermann</b><b><br>
</b><b>                       Banner by FIGlet: <a class="moz-txt-link-abbreviated" href="http://www.figlet.org">www.figlet.org</a></b><b><br>
</b><b>                                       </b><b><br>
</b><b>                This program comes with ABSOLUTELY NO
WARRANTY;</b><b><br>
</b><b>                          for details run: apl --gpl.</b><b><br>
</b><b>                                       </b><b><br>
</b><b>     This program is free software, and you are welcome
to redistribute it</b><b><br>
</b><b>         according to the GNU Public License (GPL)
version 3 or later.</b><b><br>
</b><b>                                       </b><b><br>
</b><b>      23J1 25J25 ÷ 3J1</b><b><br>
</b><b>7J¯2 10J5<br>
<br>
</b><b></b><b>      3J1 | 23J1 25J25</b><b><br>
</b><b>0 0</b></font><br>
<br>
<br>
</font>However, if I remember correctly then some of the changes
that I made lately were in<br>
header files (<b>ComplexCell.hh</b> and <b>FloatCell.hh</b>). If
you did<b> ./configure</b> without options, then<br>
your build is probably is a <b>'fast'</b> one, which may not have
detected header file changes.<br>
<br>
Please try <b>make clean</b> at the top level and rebuild GNU APL
to see if the problem persists.<br>
<br>
Best Regards,<br>
Jürgen Sauermann<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 04/25/2017 09:30 PM, Frederick Pitts
wrote:<br>
</div>
<blockquote cite="mid:***@comcast.net"
type="cite">
<pre wrap="">Jeurgen,

A greatest common divisor of 23J1 and 25J25 is 3J1.
Complex division by of 23J1 and 25J25 by 3J1 yields Gaussian integers

      23J1 25J25 ÷ 3J1
7J¯2 10J5

but mod 3J1 of the same numbers does not consistently yield zeroes

      3J1 | 23J1 25J25
3J1 0

I can provide numerous other examples of this problem if needed.

Regards,

Fred




</pre>
</blockquote>
<br>
</body>
</html>
Frederick Pitts
2017-04-26 01:50:53 UTC
Permalink
Juergen,

        I did a 'make clean' followed by 'make' and 'make install'.  I
obtained the same result that caused me to report the problem.

        The version of gnu-apl I'm using is svn rev 933.  From the
banner in your email, I see you're testing with code from your personal
svn.  Is it possible the changes you recently made to (ComplexCell.hh
and FloatCell.hh) are not yet in the svn from which I clone?

Regards,

Fred
Post by Juergen Sauermann
Hi Fred,
 
 
                     ______ _   __ __  __    ___     ____   __ 
                    / ____// | / // / / /   /   |   / __ \ / / 
                   / / __ /  |/ // / / /   / /| |  / /_/ // /  
                  / /_/ // /|  // /_/ /   / ___ | / ____// /___
                  \____//_/ |_/ \____/   /_/  |_|/_/    /_____/
                                        
                  Welcome to GNU APL version 1.7 / 12784:12785M
                                        
                 Copyright (C) 2008-2016  Dr. Jürgen Sauermann
                        Banner by FIGlet: www.figlet.org
                                        
                 This program comes with ABSOLUTELY NO WARRANTY;
                           for details run: apl --gpl.
                                        
      This program is free software, and you are welcome to
redistribute it
          according to the GNU Public License (GPL) version 3 or
later.
                                        
       23J1 25J25 ÷ 3J1
7J¯2 10J5
 
       3J1 | 23J1 25J25
0 0
 
 
However, if I remember correctly then some of the changes that I made
lately were in
header files (ComplexCell.hh and FloatCell.hh). If you did
./configure without options, then
your build is probably is a 'fast' one, which may not have detected
header file changes.
 
Please try make clean at the top level and rebuild GNU APL to see if
the problem persists.
 
Best Regards,
Jürgen Sauermann
 
 
 
Post by Frederick Pitts
Jeurgen,
 
    A greatest common divisor of 23J1 and 25J25 is 3J1.
Complex division by of 23J1 and 25J25 by 3J1 yields Gaussian
integers
 
       23J1 25J25 ÷ 3J1
7J¯2 10J5
 
but mod 3J1 of the same numbers does not consistently yield zeroes
 
       3J1 | 23J1 25J25
3J1 0
 
I can provide numerous other examples of this problem if needed.
 
Regards,
 
Fred
 
 
 
 
  
Frederick Pitts
2017-04-26 05:44:22 UTC
Permalink
To all,

I have 3 machines running 64-bit Fedora 25 Workstation with g++
(GCC) 6.3.1 20161221 (Red Hat 6.3.1-1) and either gnu-apl svn version
889 or 933. Two of the machines are about 8 years old and one less
than a year old.

On all three platforms, gnu-apl gives:

3J1 | 23J1 25J25
3J1 0

Juergen and Xtian (on svn 933) report their setups give the
right answer:

0 0

Am I the only one seeing this problem? BTW, I have about 1500
more examples of the modulo operator failing out of 6765201 tests with
distinct argument values.

Regards,

Fred
Same result as Juergen,
Xtian.
                     ______ _   __ __  __    ___     ____   __
                    / ____// | / // / / /   /   |   / __ \ / /
                   / / __ /  |/ // / / /   / /| |  / /_/ // /
                  / /_/ // /|  // /_/ /   / ___ | / ____// /___
                  \____//_/ |_/ \____/   /_/  |_|/_/    /_____/
                      Welcome to GNU APL version 1.7 / 933M
                 Copyright (C) 2008-2016  Dr. Jürgen Sauermann
                        Banner by FIGlet: www.figlet.org
                 This program comes with ABSOLUTELY NO WARRANTY;
                           for details run: apl --gpl.
      This program is free software, and you are welcome to
redistribute it
          according to the GNU Public License (GPL) version 3 or
later.
SAVED 2017-03-30 22:33:13 (GMT-4)
       23J1 25J25 ÷ 3J1
7J¯2 10J5
       3J1 | 23J1 25J25
0 0
Post by Frederick Pitts
Juergen,
         I did a 'make clean' followed by 'make' and 'make
install'.  I
obtained the same result that caused me to report the problem.
         The version of gnu-apl I'm using is svn rev 933.  From the
banner in your email, I see you're testing with code from your personal
svn.  Is it possible the changes you recently made to
(ComplexCell.hh
and FloatCell.hh) are not yet in the svn from which I clone?
Regards,
Fred
Post by Juergen Sauermann
Hi Fred,
  
  
                      ______ _   __ __  __    ___     ____   __
                     / ____// | / // / / /   /   |   / __ \ / /
                    / / __ /  |/ // / / /   / /| |  / /_/ // /
                   / /_/ // /|  // /_/ /   / ___ | / ____// /___
                   \____//_/ |_/ \____/   /_/  |_|/_/    /_____/
                                         
                   Welcome to GNU APL version 1.7 / 12784:12785M
                                         
                  Copyright (C) 2008-2016  Dr. Jürgen Sauermann
                         Banner by FIGlet: www.figlet.org
                                         
                  This program comes with ABSOLUTELY NO WARRANTY;
                            for details run: apl --gpl.
                                         
       This program is free software, and you are welcome to
redistribute it
           according to the GNU Public License (GPL) version 3 or
later.
                                         
        23J1 25J25 ÷ 3J1
7J¯2 10J5
  
        3J1 | 23J1 25J25
0 0
  
  
However, if I remember correctly then some of the changes that I made
lately were in
header files (ComplexCell.hh and FloatCell.hh). If you did
./configure without options, then
your build is probably is a 'fast' one, which may not have
detected
header file changes.
  
Please try make clean at the top level and rebuild GNU APL to see if
the problem persists.
  
Best Regards,
Jürgen Sauermann
  
  
  
Post by Frederick Pitts
Jeurgen,
  
     A greatest common divisor of 23J1 and 25J25 is 3J1.
Complex division by of 23J1 and 25J25 by 3J1 yields Gaussian
integers
  
        23J1 25J25 ÷ 3J1
7J¯2 10J5
  
but mod 3J1 of the same numbers does not consistently yield zeroes
  
        3J1 | 23J1 25J25
3J1 0
  
I can provide numerous other examples of this problem if
needed.
  
Regards,
  
Fred
  
  
  
  
   
Jay Foad
2017-04-26 08:19:03 UTC
Permalink
I see the wrong result on my machine, just like Fred. JÃŒrgen, the problem
seems to be in this code:

// if ⎕CT != 0 and B ÷ A is close to an integer within ⎕CT then return 0.
//
// Note: In that case, the integer to which A ÷ B is close is either
// floor(A ÷ B) or ceil(A ÷ B).
//
const APL_Float qct = Workspace::get_CT();
if (qct != 0)
{
const APL_Complex quot = cval() / a;
const APL_Float qfr = floor(quot.real());
const APL_Float qfi = floor(quot.imag());
const APL_Float qcr = ceil(quot.real());
const APL_Float qci = ceil(quot.imag());

if (quot.real() > (qcr - qct) && quot.imag() > (qci - qct))
return IntCell::z0(Z); // quot is close to its ceiling

if (quot.real() < (qfr - qct) && quot.imag() < (qfi - qct))
return IntCell::z0(Z); // quot is close to its floor
}

In this case quot is:

(gdb) p quot
$14 = {_M_value = 6.9999999999999991 + -1.9999999999999998 * I}

... which is close to the Gaussian integer 7J¯2. But you only check for it
being close to 7J¯1 and 6J¯2, both of which tests fail.

As for why Fred and I see this problem and you don't: I guess on your
machine the expression cval() / a probably returns an exact (Gaussian)
integer result? If so, I guess it's down to some small change in the
compiler version, or glibc, or whatever provides the implementation of
std::complex<double>::operator/.

Jay.
Post by Frederick Pitts
To all,
I have 3 machines running 64-bit Fedora 25 Workstation with g++
(GCC) 6.3.1 20161221 (Red Hat 6.3.1-1) and either gnu-apl svn version
889 or 933. Two of the machines are about 8 years old and one less
than a year old.
3J1 | 23J1 25J25
3J1 0
Juergen and Xtian (on svn 933) report their setups give the
0 0
Am I the only one seeing this problem? BTW, I have about 1500
more examples of the modulo operator failing out of 6765201 tests with
distinct argument values.
Regards,
Fred
Same result as Juergen,
Xtian.
______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/
Welcome to GNU APL version 1.7 / 933M
Copyright (C) 2008-2016 Dr. JÃŒrgen Sauermann
Banner by FIGlet: www.figlet.org
This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.
This program is free software, and you are welcome to
redistribute it
according to the GNU Public License (GPL) version 3 or
later.
SAVED 2017-03-30 22:33:13 (GMT-4)
23J1 25J25 ÷ 3J1
7J¯2 10J5
3J1 | 23J1 25J25
0 0
Post by Frederick Pitts
Juergen,
I did a 'make clean' followed by 'make' and 'make
install'. I
obtained the same result that caused me to report the problem.
The version of gnu-apl I'm using is svn rev 933. From the
banner in your email, I see you're testing with code from your personal
svn. Is it possible the changes you recently made to
(ComplexCell.hh
and FloatCell.hh) are not yet in the svn from which I clone?
Regards,
Fred
Post by Juergen Sauermann
Hi Fred,
______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/
Welcome to GNU APL version 1.7 / 12784:12785M
Copyright (C) 2008-2016 Dr. JÃŒrgen Sauermann
Banner by FIGlet: www.figlet.org
This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.
This program is free software, and you are welcome to
redistribute it
according to the GNU Public License (GPL) version 3 or
later.
23J1 25J25 ÷ 3J1
7J¯2 10J5
3J1 | 23J1 25J25
0 0
However, if I remember correctly then some of the changes that I made
lately were in
header files (ComplexCell.hh and FloatCell.hh). If you did
./configure without options, then
your build is probably is a 'fast' one, which may not have detected
header file changes.
Please try make clean at the top level and rebuild GNU APL to see if
the problem persists.
Best Regards,
JÃŒrgen Sauermann
Post by Frederick Pitts
Jeurgen,
A greatest common divisor of 23J1 and 25J25 is 3J1.
Complex division by of 23J1 and 25J25 by 3J1 yields Gaussian
integers
23J1 25J25 ÷ 3J1
7J¯2 10J5
but mod 3J1 of the same numbers does not consistently yield zeroes
3J1 | 23J1 25J25
3J1 0
I can provide numerous other examples of this problem if needed.
Regards,
Fred
Juergen Sauermann
2017-04-26 16:30:34 UTC
Permalink
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hi Jay et al,<br>
<br>
thanks for the analysis. I hope this problem is fixed in <b>SVN
934</b>.<br>
<br>
For those of you that can reproduce the problem on their machine,
please let me know<br>
if the problem has not disappeared.<br>
<br>
/// Jürgen<br>
<br>
</font><br>
<div class="moz-cite-prefix">On 04/26/2017 10:19 AM, Jay Foad wrote:<br>
</div>
<blockquote
cite="mid:CANd1uZ=***@mail.gmail.com"
type="cite">
<div dir="ltr">I see the wrong result on my machine, just like
Fred. Jürgen, the problem seems to be in this code:
<div><br>
</div>
<div>
<div>   // if ⎕CT != 0 and B ÷ A is close to an integer within
⎕CT then return 0.</div>
<div>   //</div>
<div>   // Note: In that case, the integer to which A ÷ B is
close is either</div> <div>� �// floor(A � B) or ceil(A � B).</div> <div>� �//</div> <div>const APL_Float qct = Workspace::get_CT();</div> <div>� �if (qct != 0)</div> <div>� � � {</div> <div>� � � � const APL_Complex quot = cval() / a;</div> <div>� � � � const APL_Float qfr = floor(quot.real());</div> <div>� � � � const APL_Float qfi = floor(quot.imag());</div> <div>� � � � const APL_Float qcr = ceil(quot.real());</div> <div>� � � � const APL_Float qci = ceil(quot.imag());</div> <div><br> </div> <div>       if (quot.real() &gt; (qcr - qct) &amp;&amp;
quot.imag() &gt; (qci - qct)) </div>
<div>          return IntCell::z0(Z);   // quot is close to
its ceiling</div>
<div><br>
</div>
<div>       if (quot.real() &lt; (qfr - qct) &amp;&amp;
quot.imag() &lt; (qfi - qct)) </div>
<div>          return IntCell::z0(Z);   // quot is close to
its floor</div>
<div>      }</div>
</div>
<div><br>
</div>
<div>In this case quot is:</div>
<div><br>
</div>
<div>
<div>(gdb) p quot</div>
<div>$14 = {_M_value = 6.9999999999999991 +
-1.9999999999999998 * I}</div>
</div>
<div><br>
</div>
<div>... which is close to the Gaussian integer 7J¯2. But you
only check for it being close to 7J¯1 and 6J¯2, both of which
tests fail.</div>
<div><br>
</div>
<div>As for why Fred and I see this problem and you don't: I
guess on your machine the expression cval() / a probably
returns an exact (Gaussian) integer result? If so, I guess
it's down to some small change in the compiler version, or
glibc, or whatever provides the implementation of
std::complex&lt;double&gt;::operator/.</div>
<div><br>
</div>
<div>Jay.</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 26 April 2017 at 06:44, Frederick
Pitts <span dir="ltr">&lt;<a moz-do-not-send="true"
href="mailto:***@comcast.net" target="_blank">***@comcast.net</a>&gt;</span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">To all,<br>
<br>
        I have 3 machines running 64-bit Fedora 25
Workstation with g++<br>
(GCC) 6.3.1 20161221 (Red Hat 6.3.1-1) and either gnu-apl
svn version<br>
889 or 933.  Two of the machines are about 8 years old and
one less<br>
than a year old.<br>
<br>
        On all three platforms, gnu-apl gives:<br>
<span class=""><br>
        3J1 | 23J1 25J25<br>
3J1 0<br>
<br>
</span>        Juergen and Xtian (on svn 933) report their
setups give the<br>
right answer:<br>
<br>
0 0<br>
<br>
        Am I the only one seeing this problem?  BTW, I have
about 1500<br>
more examples of the modulo operator failing out of 6765201
tests with<br>
distinct argument values.<br>
<br>
Regards,<br>
<br>
Fred<br>
<br>
<br>
On Tue, 2017-04-25 at 23:01 -0400, Christian Robert wrote:<br>
&gt; Same result as Juergen,<br>
&gt;<br>
&gt; Xtian.<br>
&gt;<br>
&gt; [***@centos-7:/home/xtian] $ apl<br> <span class="">&gt;<br>
&gt;                      ______ _   __
__  __    ___     ____   __<br>
&gt;                     / ____// | / // / / /   /   |   /
__ \ / /<br>
&gt;                    / / __ /  |/ // / / /   / /| |  /
/_/ // /<br>
&gt;                   / /_/ // /|  // /_/ /   / ___ | /
____// /___<br>
&gt;                   \____//_/ |_/
\____/   /_/  |_|/_/    /_____<wbr>/<br>
&gt;<br> </span>&gt;                       Welcome to GNU APL version
1.7 / 933M<br> <span class="">&gt;<br>
&gt;                  Copyright (C) 2008-2016  Dr. Jürgen
Sauermann<br>
&gt;                         Banner by FIGlet: <a
moz-do-not-send="true" href="http://www.figlet.org"
rel="noreferrer" target="_blank">www.figlet.org</a><br>
&gt;<br>
&gt;                  This program comes with ABSOLUTELY
NO WARRANTY;<br>
&gt;                            for details run: apl
--gpl.<br>
&gt;<br>
&gt;       This program is free software, and you are
welcome to<br>
&gt; redistribute it<br>
&gt;           according to the GNU Public License (GPL)
version 3 or<br>
&gt; later.<br>
&gt;<br> </span>&gt; SAVED 2017-03-30 22:33:13 (GMT-4)<br> <span class="im HOEnZb">&gt;        23J1 25J25 ÷ 3J1<br>
&gt; 7J¯2 10J5<br>
&gt;        3J1 | 23J1 25J25<br>
&gt; 0 0<br>
&gt;<br>
&gt;<br>
&gt;<br> </span> <div class="HOEnZb"> <div class="h5">&gt; On 2017-04-25 21:50, Frederick Pitts
wrote:<br>
&gt; &gt; Juergen,<br>
&gt; &gt;<br>
&gt; &gt;          I did a 'make clean' followed by
'make' and 'make<br>
&gt; &gt; install'.  I<br>
&gt; &gt; obtained the same result that caused me to
report the problem.<br>
&gt; &gt;<br>
&gt; &gt;          The version of gnu-apl I'm using is
svn rev 933.  From the<br>
&gt; &gt; banner in your email, I see you're testing
with code from your<br>
&gt; &gt; personal<br>
&gt; &gt; svn.  Is it possible the changes you recently
made to<br>
&gt; &gt; (ComplexCell.hh<br>
&gt; &gt; and FloatCell.hh) are not yet in the svn from
which I clone?<br>
&gt; &gt;<br>
&gt; &gt; Regards,<br>
&gt; &gt;<br>
&gt; &gt; Fred<br>
&gt; &gt;<br>
&gt; &gt; On Tue, 2017-04-25 at 22:05 +0200, Juergen
Sauermann wrote:<br>
&gt; &gt; &gt; Hi Fred,<br>
&gt; &gt; &gt;   <br>
&gt; &gt; &gt; actually it does on my machine:<br>
&gt; &gt; &gt;   <br>
&gt; &gt; &gt;                       ______ _   __
__  __    ___     ____   __<br>
&gt; &gt; &gt;                      / ____// | / // / /
/   /   |   / __ \ / /<br>
&gt; &gt; &gt;                     / / __ /  |/ // / /
/   / /| |  / /_/ // /<br>
&gt; &gt; &gt;                    / /_/ // /|  // /_/
/   / ___ | / ____// /___<br>
&gt; &gt; &gt;                    \____//_/ |_/
\____/   /_/  |_|/_/    /_____<wbr>/<br>
&gt; &gt; &gt;                               <wbr>           <br>
&gt; &gt; &gt;                    Welcome to GNU APL
version 1.7 / 12784:12785M<br>
&gt; &gt; &gt;                               <wbr>           <br>
&gt; &gt; &gt;                   Copyright (C)
2008-2016  Dr. Jürgen Sauermann<br>
&gt; &gt; &gt;                          <wbr>Banner by
FIGlet: <a moz-do-not-send="true"
href="http://www.figlet.org" rel="noreferrer"
target="_blank">www.figlet.org</a><br>
&gt; &gt; &gt;                               <wbr>           <br>
&gt; &gt; &gt;                   This program comes with
ABSOLUTELY NO WARRANTY;<br>
&gt; &gt; &gt;                             <wbr>for
details run: apl --gpl.<br>
&gt; &gt; &gt;                               <wbr>           <br>
&gt; &gt; &gt;        This program is free software, and
you are welcome to<br>
&gt; &gt; &gt; redistribute it<br>
&gt; &gt; &gt;            according to the GNU Public
License (GPL) version 3 or<br>
&gt; &gt; &gt; later.<br>
&gt; &gt; &gt;                               <wbr>           <br>
&gt; &gt; &gt;         23J1 25J25 ÷ 3J1<br>
&gt; &gt; &gt; 7J¯2 10J5<br>
&gt; &gt; &gt;   <br>
&gt; &gt; &gt;         3J1 | 23J1 25J25<br>
&gt; &gt; &gt; 0 0<br>
&gt; &gt; &gt;   <br>
&gt; &gt; &gt;   <br>
&gt; &gt; &gt; However, if I remember correctly then
some of the changes that I<br>
&gt; &gt; &gt; made<br>
&gt; &gt; &gt; lately were in<br>
&gt; &gt; &gt; header files (ComplexCell.hh and
FloatCell.hh). If you did<br>
&gt; &gt; &gt; ./configure without options, then<br>
&gt; &gt; &gt; your build is probably is a 'fast' one,
which may not have<br>
&gt; &gt; &gt; detected<br>
&gt; &gt; &gt; header file changes.<br>
&gt; &gt; &gt;   <br>
&gt; &gt; &gt; Please try make clean at the top level
and rebuild GNU APL to see<br>
&gt; &gt; &gt; if<br>
&gt; &gt; &gt; the problem persists.<br>
&gt; &gt; &gt;   <br>
&gt; &gt; &gt; Best Regards,<br>
&gt; &gt; &gt; Jürgen Sauermann<br>
&gt; &gt; &gt;   <br>
&gt; &gt; &gt;   <br>
&gt; &gt; &gt;   <br>
&gt; &gt; &gt; On 04/25/2017 09:30 PM, Frederick Pitts
wrote:<br>
&gt; &gt; &gt; &gt; Jeurgen,<br>
&gt; &gt; &gt; &gt;   <br>
&gt; &gt; &gt; &gt;      A greatest common divisor of
23J1 and 25J25 is 3J1.<br>
&gt; &gt; &gt; &gt; Complex division by of 23J1 and
25J25 by 3J1 yields Gaussian<br>
&gt; &gt; &gt; &gt; integers<br>
&gt; &gt; &gt; &gt;   <br>
&gt; &gt; &gt; &gt;         23J1 25J25 ÷ 3J1<br>
&gt; &gt; &gt; &gt; 7J¯2 10J5<br>
&gt; &gt; &gt; &gt;   <br>
&gt; &gt; &gt; &gt; but mod 3J1 of the same numbers does
not consistently yield<br>
&gt; &gt; &gt; &gt; zeroes<br>
&gt; &gt; &gt; &gt;   <br>
&gt; &gt; &gt; &gt;         3J1 | 23J1 25J25<br>
&gt; &gt; &gt; &gt; 3J1 0<br>
&gt; &gt; &gt; &gt;   <br>
&gt; &gt; &gt; &gt; I can provide numerous other
examples of this problem if<br>
&gt; &gt; &gt; &gt; needed.<br>
&gt; &gt; &gt; &gt;   <br>
&gt; &gt; &gt; &gt; Regards,<br>
&gt; &gt; &gt; &gt;   <br>
&gt; &gt; &gt; &gt; Fred<br>
&gt; &gt; &gt; &gt;   <br>
&gt; &gt; &gt; &gt;   <br>
&gt; &gt; &gt; &gt;   <br>
&gt; &gt; &gt; &gt;   <br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;    <br>
&gt;<br>
&gt;<br>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>
Kacper Gutowski
2017-04-26 19:00:49 UTC
Permalink
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
Peter Teeson
2017-04-26 19:08:19 UTC
Permalink
In which header is cval() defined?
Post by Kacper Gutowski
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
Juergen Sauermann
2017-04-26 20:08:23 UTC
Permalink
<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hi,<br>
<br>
thanks a lot. I believe I found it now.<br>
<br>
The check for near-int in the complex modulo was still incorrect<br>
(and interestingy correct in the non-complex case).  <b>SVN 937</b>.<br>
</font><br>
/// Jürgen<br>
<br>
<br>
<div class="moz-cite-prefix">On 04/26/2017 09:08 PM, Peter Teeson
wrote:<br>
</div>
<blockquote
cite="mid:8A9AEE71-4E10-4B9C-BCA8-***@icloud.com"
type="cite"> <pre wrap="">In which header is cval() defined? </pre> <blockquote type="cite"> <pre wrap="">On Apr 26, 2017, at 3:00 PM, Kacper Gutowski <a class="moz-txt-link-rfc2396E" href="mailto:***@gmail.com">&lt;***@gmail.com&gt;</a> wrote:

On Wed, Apr 26, 2017 at 06:30:34PM +0200, Juergen Sauermann wrote:
</pre>
<blockquote type="cite">
<pre wrap="">For those of you that can reproduce the problem on their machine, please let me
know if the problem has not disappeared.
</pre>
</blockquote>
<pre wrap="">
I just compiled 934 and 3J1|23J1 gives 3J1 for me too.
My g++ version is 6.3.0 20170415 on debian sid.

-k

</pre>
</blockquote>
<pre wrap="">

</pre>
</blockquote>
<br>
</body>
</html>
Frederick Pitts
2017-04-26 23:40:32 UTC
Permalink
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
Post by Juergen Sauermann
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
In which header is cval() defined? 
Post by Kacper Gutowski
Post by Juergen Sauermann
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
 
Juergen Sauermann
2017-04-27 11:02:27 UTC
Permalink
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hi Frederick,<br>
<br>
thanks, I will study the paper below in detail.<br>
<br>
GNU APL uses the Euclidean algorithm in the form optimized by</font>
Gabriel Lame.<br>
<br>
You will find the implementation of it at <b>ComplexCell.cc</b>
lines <b>299</b> ff in function<br>
<b>ComplexCell::bif</b><b>_residue()</b> (bif stands for <b>b</b>uilt-<b>i</b>n
<b>f</b>unction). The <b>cval()</b> function is<br>
defined in <b>ComplexCell.hh.</b> <br>
<br>
Let me point out that all errors detected so far were caused by
either faults in the rounding<br>
of doubles to ints or by not checking some near-int quotients and
not by the algorithm itself.<br>
<br>
Best Regards,<br>
Jürgen<br>
<br>
<br>
<div class="moz-cite-prefix">On 04/27/2017 01:40 AM, Frederick Pitts
wrote:<br>
</div>
<blockquote cite="mid:***@comcast.net"
type="cite">
<pre wrap="">Jürgen,

SVN 937 works for me.

Out of curiosity, is the Euclidean division algorithm described
starting at the bottom of page 6 of <a class="moz-txt-link-freetext" href="http://www.math.uconn.edu/~kconrad/">http://www.math.uconn.edu/~kconrad/</a>
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:
</pre>
<blockquote type="cite">
<pre wrap="">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: </pre> <blockquote type="cite"> <pre wrap="">In which header is cval() defined?� </pre> <blockquote type="cite"> <pre wrap="">On Apr 26, 2017, at 3:00 PM, Kacper Gutowski <a class="moz-txt-link-rfc2396E" href="mailto:***@gmail.com">&lt;***@gmail.com&gt;</a>
wrote:

On Wed, Apr 26, 2017 at 06:30:34PM +0200, Juergen Sauermann
wrote:
</pre>
<blockquote type="cite">
<pre wrap="">For those of you that can reproduce the problem on their
machine, please let me
know if the problem has not disappeared.
</pre>
</blockquote>
<pre wrap="">
I just compiled 934 and 3J1|23J1 gives 3J1 for me too.
My g++ version is 6.3.0 20170415 on debian sid.

-k

</pre>
</blockquote>
</blockquote>
<pre wrap=""> 
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>
Juergen Sauermann
2017-04-27 16:28:37 UTC
Permalink
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hi again,<br>
<br>
I have changed the implementation of <b>A∣B</b> for complex
numbers so that it follows exactly<br>
the wording of the ISO standard, <b>SVN 938</b>.<br>
<br>
I do not think that this changes the result, but it may simplify
the troubleshooting<br>
of this primitive.<br>
<br>
/// Jürgen<br>
<br>
</font><br>
<br>
</body>
</html>
Peter Teeson
2017-04-27 18:09:55 UTC
Permalink
Hi JÃŒrgen:
I just want to express my personal thanks to you for your responsiveness in making GNU APL better.
Your dedication is exemplary and inspiring.

respect
.

Peter
Post by Juergen Sauermann
Hi again,
I have changed the implementation of A∣B for complex numbers so that it follows exactly
the wording of the ISO standard, SVN 938.
I do not think that this changes the result, but it may simplify the troubleshooting
of this primitive.
/// JÃŒrgen
Peter Teeson
2017-04-26 15:28:00 UTC
Permalink
Works OK on my Early 2009 Mac Pro running macOS 10.10.5 Yosemite and APL #svn927

You have different HW but same OS & toolchain?
So how about trying a different toolchain to see if it is the compiler etc?
Or what about trying to disassemble the coded at the point of execution?
Could it be something like missing an overflow?

Just my 0.02¢

Peter
Post by Frederick Pitts
To all,
I have 3 machines running 64-bit Fedora 25 Workstation with g++
(GCC) 6.3.1 20161221 (Red Hat 6.3.1-1) and either gnu-apl svn version
889 or 933. Two of the machines are about 8 years old and one less
than a year old.
3J1 | 23J1 25J25
3J1 0
Juergen and Xtian (on svn 933) report their setups give the
0 0
Am I the only one seeing this problem? BTW, I have about 1500
more examples of the modulo operator failing out of 6765201 tests with
distinct argument values.
Regards,
Fred
Same result as Juergen,
Xtian.
______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/
Welcome to GNU APL version 1.7 / 933M
Copyright (C) 2008-2016 Dr. Jürgen Sauermann
Banner by FIGlet: www.figlet.org
This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.
This program is free software, and you are welcome to
redistribute it
according to the GNU Public License (GPL) version 3 or
later.
SAVED 2017-03-30 22:33:13 (GMT-4)
23J1 25J25 ÷ 3J1
7J¯2 10J5
3J1 | 23J1 25J25
0 0
Post by Frederick Pitts
Juergen,
I did a 'make clean' followed by 'make' and 'make
install'. I
obtained the same result that caused me to report the problem.
The version of gnu-apl I'm using is svn rev 933. From the
banner in your email, I see you're testing with code from your personal
svn. Is it possible the changes you recently made to
(ComplexCell.hh
and FloatCell.hh) are not yet in the svn from which I clone?
Regards,
Fred
Post by Juergen Sauermann
Hi Fred,
______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/
Welcome to GNU APL version 1.7 / 12784:12785M
Copyright (C) 2008-2016 Dr. Jürgen Sauermann
Banner by FIGlet: www.figlet.org
This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.
This program is free software, and you are welcome to
redistribute it
according to the GNU Public License (GPL) version 3 or
later.
23J1 25J25 ÷ 3J1
7J¯2 10J5
3J1 | 23J1 25J25
0 0
However, if I remember correctly then some of the changes that I made
lately were in
header files (ComplexCell.hh and FloatCell.hh). If you did
./configure without options, then
your build is probably is a 'fast' one, which may not have
detected
header file changes.
Please try make clean at the top level and rebuild GNU APL to see if
the problem persists.
Best Regards,
Jürgen Sauermann
Post by Frederick Pitts
Jeurgen,
A greatest common divisor of 23J1 and 25J25 is 3J1.
Complex division by of 23J1 and 25J25 by 3J1 yields Gaussian
integers
23J1 25J25 ÷ 3J1
7J¯2 10J5
but mod 3J1 of the same numbers does not consistently yield zeroes
3J1 | 23J1 25J25
3J1 0
I can provide numerous other examples of this problem if
needed.
Regards,
Fred
e***@gmx.com
2017-04-26 15:30:52 UTC
Permalink
what is his processor?
https://en.wikipedia.org/wiki/Pentium_FDIV_bug

On Wed, 26 Apr 2017 11:28:00 -0400
Post by Peter Teeson
Works OK on my Early 2009 Mac Pro running macOS 10.10.5 Yosemite and APL #svn927
You have different HW but same OS & toolchain?
So how about trying a different toolchain to see if it is the compiler etc?
Or what about trying to disassemble the coded at the point of execution?
Could it be something like missing an overflow?
Just my 0.02¢
Peter
Post by Frederick Pitts
To all,
I have 3 machines running 64-bit Fedora 25 Workstation with g++
(GCC) 6.3.1 20161221 (Red Hat 6.3.1-1) and either gnu-apl svn version
889 or 933. Two of the machines are about 8 years old and one less
than a year old.
3J1 | 23J1 25J25
3J1 0
Juergen and Xtian (on svn 933) report their setups give the
0 0
Am I the only one seeing this problem? BTW, I have about 1500
more examples of the modulo operator failing out of 6765201 tests with
distinct argument values.
Regards,
Fred
Same result as Juergen,
Xtian.
______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/
Welcome to GNU APL version 1.7 / 933M
Copyright (C) 2008-2016 Dr. Jürgen Sauermann
Banner by FIGlet: www.figlet.org
This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.
This program is free software, and you are welcome to
redistribute it
according to the GNU Public License (GPL) version 3 or
later.
SAVED 2017-03-30 22:33:13 (GMT-4)
23J1 25J25 ÷ 3J1
7J¯2 10J5
3J1 | 23J1 25J25
0 0
Post by Frederick Pitts
Juergen,
I did a 'make clean' followed by 'make' and 'make
install'. I
obtained the same result that caused me to report the problem.
The version of gnu-apl I'm using is svn rev 933. From the
banner in your email, I see you're testing with code from your personal
svn. Is it possible the changes you recently made to
(ComplexCell.hh
and FloatCell.hh) are not yet in the svn from which I clone?
Regards,
Fred
Post by Juergen Sauermann
Hi Fred,
______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/
Welcome to GNU APL version 1.7 / 12784:12785M
Copyright (C) 2008-2016 Dr. Jürgen Sauermann
Banner by FIGlet: www.figlet.org
This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.
This program is free software, and you are welcome to
redistribute it
according to the GNU Public License (GPL) version 3 or
later.
23J1 25J25 ÷ 3J1
7J¯2 10J5
3J1 | 23J1 25J25
0 0
However, if I remember correctly then some of the changes that I made
lately were in
header files (ComplexCell.hh and FloatCell.hh). If you did
./configure without options, then
your build is probably is a 'fast' one, which may not have detected
header file changes.
Please try make clean at the top level and rebuild GNU APL to see if
the problem persists.
Best Regards,
Jürgen Sauermann
Post by Frederick Pitts
Jeurgen,
A greatest common divisor of 23J1 and 25J25 is 3J1.
Complex division by of 23J1 and 25J25 by 3J1 yields Gaussian
integers
23J1 25J25 ÷ 3J1
7J¯2 10J5
but mod 3J1 of the same numbers does not consistently yield zeroes
3J1 | 23J1 25J25
3J1 0
I can provide numerous other examples of this problem if
needed.
Regards,
Fred
Juergen Sauermann
2017-04-26 15:45:52 UTC
Permalink
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hi Peter et al,<br>
<br>
I believe the proper way to fix this is to find the root cause of
it, not to find a compiler<br>
under which the problem does not occur. I am currently following
Jays advice, but the<br>
work on it is still ongoing.<br>
<br>
// Jürgen<br>
<br>
<br>
</font><br>
<div class="moz-cite-prefix">On 04/26/2017 05:28 PM, Peter Teeson
wrote:<br>
</div>
<blockquote
cite="mid:2E0B07E5-F4F8-4D93-973D-***@icloud.com"
type="cite">
<pre wrap="">Works OK on my Early 2009 Mac Pro running macOS 10.10.5 Yosemite and APL #svn927

You have different HW but same OS &amp; toolchain?
So how about trying a different toolchain to see if it is the compiler etc?
Or what about trying to disassemble the coded at the point of execution?
Could it be something like missing an overflow?

Just my 0.02¢

Peter </pre> <blockquote type="cite"> <pre wrap="">On Apr 26, 2017, at 1:44 AM, Frederick Pitts <a class="moz-txt-link-rfc2396E" href="mailto:***@comcast.net">&lt;***@comcast.net&gt;</a> wrote:

To all,

I have 3 machines running 64-bit Fedora 25 Workstation with g++
(GCC) 6.3.1 20161221 (Red Hat 6.3.1-1) and either gnu-apl svn version
889 or 933. Two of the machines are about 8 years old and one less
than a year old.

On all three platforms, gnu-apl gives:

3J1 | 23J1 25J25
3J1 0

Juergen and Xtian (on svn 933) report their setups give the
right answer:

0 0

Am I the only one seeing this problem? BTW, I have about 1500
more examples of the modulo operator failing out of 6765201 tests with
distinct argument values.

Regards,

Fred


On Tue, 2017-04-25 at 23:01 -0400, Christian Robert wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Same result as Juergen,

Xtian.

[***@centos-7:/home/xtian] $ apl

______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/

Welcome to GNU APL version 1.7 / 933M

Copyright (C) 2008-2016 Dr. Jürgen Sauermann
Banner by FIGlet: <a class="moz-txt-link-abbreviated" href="http://www.figlet.org">www.figlet.org</a>

This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.

This program is free software, and you are welcome to
redistribute it
according to the GNU Public License (GPL) version 3 or
later.

SAVED 2017-03-30 22:33:13 (GMT-4)
23J1 25J25 ÷ 3J1
7J¯2 10J5
3J1 | 23J1 25J25
0 0



On 2017-04-25 21:50, Frederick Pitts wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Juergen,

I did a 'make clean' followed by 'make' and 'make
install'. I
obtained the same result that caused me to report the problem.

The version of gnu-apl I'm using is svn rev 933. From the
banner in your email, I see you're testing with code from your
personal
svn. Is it possible the changes you recently made to
(ComplexCell.hh
and FloatCell.hh) are not yet in the svn from which I clone?

Regards,

Fred

On Tue, 2017-04-25 at 22:05 +0200, Juergen Sauermann wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Fred,

actually it does on my machine:

______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/

Welcome to GNU APL version 1.7 / 12784:12785M

Copyright (C) 2008-2016 Dr. Jürgen Sauermann
Banner by FIGlet: <a class="moz-txt-link-abbreviated" href="http://www.figlet.org">www.figlet.org</a>

This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.

This program is free software, and you are welcome to
redistribute it
according to the GNU Public License (GPL) version 3 or
later.

23J1 25J25 ÷ 3J1
7J¯2 10J5

3J1 | 23J1 25J25
0 0


However, if I remember correctly then some of the changes that I
made
lately were in
header files (ComplexCell.hh and FloatCell.hh). If you did
./configure without options, then
your build is probably is a 'fast' one, which may not have
detected
header file changes.

Please try make clean at the top level and rebuild GNU APL to see
if
the problem persists.

Best Regards,
Jürgen Sauermann



On 04/25/2017 09:30 PM, Frederick Pitts wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Jeurgen,

A greatest common divisor of 23J1 and 25J25 is 3J1.
Complex division by of 23J1 and 25J25 by 3J1 yields Gaussian
integers

23J1 25J25 ÷ 3J1
7J¯2 10J5

but mod 3J1 of the same numbers does not consistently yield
zeroes

3J1 | 23J1 25J25
3J1 0

I can provide numerous other examples of this problem if
needed.

Regards,

Fred




</pre>
</blockquote>
<pre wrap="">

</pre>
</blockquote>
</blockquote>
<pre wrap="">

</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap="">


</pre>
</blockquote>
<br>
</body>
</html>
Peter Teeson
2017-04-26 18:13:00 UTC
Permalink
Of course
.. I 100% agree.
It was just a suggestion for a differential diagnosis (in medical terms not calculus ones).
Once log ago I had to track down an IBM Fortran 77 Floating point bug
 which I was able to do and send a PTF to them.
Never had to deal with the assembly for complex numbers so it’s all a mystery to me.
Post by Juergen Sauermann
Hi Peter et al,
I believe the proper way to fix this is to find the root cause of it, not to find a compiler
under which the problem does not occur. I am currently following Jays advice, but the
work on it is still ongoing.
// JÃŒrgen
Post by Peter Teeson
Works OK on my Early 2009 Mac Pro running macOS 10.10.5 Yosemite and APL #svn927
You have different HW but same OS & toolchain?
So how about trying a different toolchain to see if it is the compiler etc?
Or what about trying to disassemble the coded at the point of execution?
Could it be something like missing an overflow?
Just my 0.02¢
Peter
Post by Frederick Pitts
To all,
I have 3 machines running 64-bit Fedora 25 Workstation with g++
(GCC) 6.3.1 20161221 (Red Hat 6.3.1-1) and either gnu-apl svn version
889 or 933. Two of the machines are about 8 years old and one less
than a year old.
3J1 | 23J1 25J25
3J1 0
Juergen and Xtian (on svn 933) report their setups give the
0 0
Am I the only one seeing this problem? BTW, I have about 1500
more examples of the modulo operator failing out of 6765201 tests with
distinct argument values.
Regards,
Fred
Same result as Juergen,
Xtian.
______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/
Welcome to GNU APL version 1.7 / 933M
Copyright (C) 2008-2016 Dr. JÃŒrgen Sauermann
Banner by FIGlet: www.figlet.org <http://www.figlet.org/>
This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.
This program is free software, and you are welcome to
redistribute it
according to the GNU Public License (GPL) version 3 or
later.
SAVED 2017-03-30 22:33:13 (GMT-4)
23J1 25J25 ÷ 3J1
7J¯2 10J5
3J1 | 23J1 25J25
0 0
Post by Frederick Pitts
Juergen,
I did a 'make clean' followed by 'make' and 'make
install'. I
obtained the same result that caused me to report the problem.
The version of gnu-apl I'm using is svn rev 933. From the
banner in your email, I see you're testing with code from your personal
svn. Is it possible the changes you recently made to
(ComplexCell.hh
and FloatCell.hh) are not yet in the svn from which I clone?
Regards,
Fred
Post by Juergen Sauermann
Hi Fred,
______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/
Welcome to GNU APL version 1.7 / 12784:12785M
Copyright (C) 2008-2016 Dr. JÃŒrgen Sauermann
Banner by FIGlet: www.figlet.org <http://www.figlet.org/>
This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.
This program is free software, and you are welcome to
redistribute it
according to the GNU Public License (GPL) version 3 or
later.
23J1 25J25 ÷ 3J1
7J¯2 10J5
3J1 | 23J1 25J25
0 0
However, if I remember correctly then some of the changes that I made
lately were in
header files (ComplexCell.hh and FloatCell.hh). If you did
./configure without options, then
your build is probably is a 'fast' one, which may not have detected
header file changes.
Please try make clean at the top level and rebuild GNU APL to see if
the problem persists.
Best Regards,
JÃŒrgen Sauermann
Post by Frederick Pitts
Jeurgen,
A greatest common divisor of 23J1 and 25J25 is 3J1.
Complex division by of 23J1 and 25J25 by 3J1 yields Gaussian
integers
23J1 25J25 ÷ 3J1
7J¯2 10J5
but mod 3J1 of the same numbers does not consistently yield zeroes
3J1 | 23J1 25J25
3J1 0
I can provide numerous other examples of this problem if
needed.
Regards,
Fred
Loading...