summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRelease Manager <release@sagemath.org>2018-07-25 00:53:03 +0200
committerVolker Braun <vbraun.name@gmail.com>2018-07-25 00:53:03 +0200
commite52ff8ba1be28990b03ed04c5bbe580792c14c98 (patch)
treec5d795d9383f2b97ce9b9647f5645c0fa5b22cf7
parentUpdated SageMath version to 8.3.rc2 (diff)
parentAdd a stopgap to DuadicCodeEvenPair/DuadicCodeOddPair (diff)
Trac #25379: random failure in QuadraticResidueCodeOddPair
Reported on [[https://groups.google.com/forum/#!topic/sage- release/zh04lo8d44U]] and also on some patchbots - [[https://patchbot.sagemath.org/log/24783/Ubuntu/16.04/x86_64/4.4.0-12 4-generic/quasar/2018-05-16%2012:29:14?short|quasar]] {{{ sage -t --long src/sage/coding/code_constructions.py ********************************************************************** File "src/sage/coding/code_constructions.py", line 624, in sage.coding.code_constructions.QuadraticResidueCodeOddPair Failed example: codes.QuadraticResidueCodeOddPair(17, GF(13)) Exception raised: Traceback (most recent call last): File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site- packages/sage/doctest/forker.py", line 562, in _run self.compile_and_execute(example, compiler, test.globs) File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site- packages/sage/doctest/forker.py", line 972, in compile_and_execute exec(compiled, globs) File "<doctest sage.coding.code_constructions.QuadraticResidueCodeOddPair[0]>", line 1, in <module> codes.QuadraticResidueCodeOddPair(Integer(17), GF(Integer(13))) File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site- packages/sage/coding/code_constructions.py", line 666, in QuadraticResidueCodeOddPair return DuadicCodeOddPair(F,Q,N) File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site- packages/sage/coding/code_constructions.py", line 425, in DuadicCodeOddPair gg1 = P2(coeffs1) File "sage/structure/parent.pyx", line 920, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9734) return mor._call_(x) File "sage/structure/coerce_maps.pyx", line 145, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4555) raise File "sage/structure/coerce_maps.pyx", line 140, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4423) return C._element_constructor(x) File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site- packages/sage/rings/polynomial/polynomial_ring.py", line 404, in _element_constructor_ return C(self, x, check=check, is_gen=False, construct=construct) File "sage/rings/polynomial/polynomial_zmod_flint.pyx", line 100, in sage.rings.polynomial.polynomial_zmod_flint.Polynomial_zmod_flint.__i nit__ (build/cythonized/sage/rings/polynomial/polynomial_zmod_flint.cpp:14356) lst = [k(i) for i in x] File "sage/structure/parent.pyx", line 920, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9734) return mor._call_(x) File "sage/rings/finite_rings/hom_prime_finite_field.pyx", line 46, in sage.rings.finite_rings.hom_prime_finite_field.SectionFiniteField Homomorphism_prime._call_ (build/cythonized/sage/rings/finite_rings/hom_prime_finite_field.c:3457) raise ValueError("%s is not in the image of %s" % (x, self._inverse)) ValueError: 10*z^3 + 9*z^2 + z is not in the image of (map internal to coercion system -- copy before use) Ring morphism: From: Finite Field of size 13 To: Finite Field in z of size 13^4 ********************************************************************** 1 item had failures: 1 of 13 in sage.coding.code_constructions.QuadraticResidueCodeOddPair [146 tests, 1 failure, 2.83 s] ---------------------------------------------------------------------- sage -t --long src/sage/coding/code_constructions.py # 1 doctest failed ---------------------------------------------------------------------- }}} URL: https://trac.sagemath.org/25379 Reported by: vdelecroix Ticket author(s): Jeroen Demeyer Reviewer(s): Frédéric Chapoton
-rw-r--r--src/sage/coding/code_constructions.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/sage/coding/code_constructions.py b/src/sage/coding/code_constructions.py
index e9cd3eb..2d50c9b 100644
--- a/src/sage/coding/code_constructions.py
+++ b/src/sage/coding/code_constructions.py
@@ -353,6 +353,9 @@ def DuadicCodeEvenPair(F,S1,S2):
([11, 5] Cyclic Code over GF(3),
[11, 5] Cyclic Code over GF(3))
"""
+ from sage.misc.stopgap import stopgap
+ stopgap("The function DuadicCodeEvenPair has several issues which may cause wrong results", 25896)
+
from .cyclic_code import CyclicCode
n = len(S1) + len(S2) + 1
if not _is_a_splitting(S1,S2,n):
@@ -400,6 +403,9 @@ def DuadicCodeOddPair(F,S1,S2):
This is consistent with Theorem 6.1.3 in [HP2003]_.
"""
+ from sage.misc.stopgap import stopgap
+ stopgap("The function DuadicCodeOddPair has several issues which may cause wrong results", 25896)
+
from .cyclic_code import CyclicCode
n = len(S1) + len(S2) + 1
if not _is_a_splitting(S1,S2,n):
@@ -553,13 +559,13 @@ def QuadraticResidueCodeEvenPair(n,F):
EXAMPLES::
- sage: codes.QuadraticResidueCodeEvenPair(17, GF(13))
+ sage: codes.QuadraticResidueCodeEvenPair(17, GF(13)) # known bug (#25896)
([17, 8] Cyclic Code over GF(13),
[17, 8] Cyclic Code over GF(13))
sage: codes.QuadraticResidueCodeEvenPair(17, GF(2))
([17, 8] Cyclic Code over GF(2),
[17, 8] Cyclic Code over GF(2))
- sage: codes.QuadraticResidueCodeEvenPair(13,GF(9,"z"))
+ sage: codes.QuadraticResidueCodeEvenPair(13,GF(9,"z")) # known bug (#25896)
([13, 6] Cyclic Code over GF(9),
[13, 6] Cyclic Code over GF(9))
sage: C1,C2 = codes.QuadraticResidueCodeEvenPair(7,GF(2))
@@ -617,13 +623,13 @@ def QuadraticResidueCodeOddPair(n,F):
EXAMPLES::
- sage: codes.QuadraticResidueCodeOddPair(17, GF(13))
+ sage: codes.QuadraticResidueCodeOddPair(17, GF(13)) # known bug (#25896)
([17, 9] Cyclic Code over GF(13),
[17, 9] Cyclic Code over GF(13))
sage: codes.QuadraticResidueCodeOddPair(17, GF(2))
([17, 9] Cyclic Code over GF(2),
[17, 9] Cyclic Code over GF(2))
- sage: codes.QuadraticResidueCodeOddPair(13, GF(9,"z"))
+ sage: codes.QuadraticResidueCodeOddPair(13, GF(9,"z")) # known bug (#25896)
([13, 7] Cyclic Code over GF(9),
[13, 7] Cyclic Code over GF(9))
sage: C1 = codes.QuadraticResidueCodeOddPair(17, GF(2))[1]