[CLN-list] Bug in F_2[X] comparisson

Remco Bloemen remco.bloemen at gmail.com
Wed Oct 31 01:16:32 CET 2007


Dear all,

Lately i have been implementing a few algorithms from "Modern Computer 
Algebra". In the process of implementing Z[x] factorization i noticed the 
following strange behavior:

  cl_modint_ring basering = find_modint_ring(2);
  cl_univpoly_modint_ring ring = find_univpoly_ring(basering);
  cl_UP_MI x= ring->zero();

  (x != ring->zero()) returns false (correct)
  (x == ring->zero()) returns false (incorrect)

If i first compare  x == x the behavior changes:

  (x == x) returns true (correct)
  (x != ring->zero()) returns true (incorrect)
  (x == ring->zero()) returns false (incorrect)

Attached is a demonstrational program. I'm using cln version 1.1.13 compiled 
with gcc-4.2.2 on x86 (prescott).

Could someone please tell me if this is fixed in cvs or being worked on?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.cpp
Type: text/x-c++src
Size: 823 bytes
Desc: not available
Url : http://www.cebix.net/pipermail/cln-list/attachments/20071031/b47eb476/bug.bin


More information about the CLN-list mailing list