Ticket #722 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

GF(100) gives weird error message

Reported by: dmharvey Owned by: somebody
Priority: minor Milestone: sage-2.8.5.1
Component: basic arithmetic Keywords:
Cc: Author(s):
Report Upstream: Reviewer(s):
Merged in: Work issues:

Description

sage: GF(100)
---------------------------------------------------------------------------
<type 'exceptions.TypeError'>             Traceback (most recent call last)

/home/dmharvey/<ipython console> in <module>()

/home/was/s/local/lib/python2.5/site-packages/sage/rings/finite_field.py in FiniteField(order, name, modulus, names, elem_cache, check_irreducible, *args, **kwds)
    184                 raise ValueError, "finite field modulus must be irreducible but it is not"
    185         if name is None:
--> 186             raise TypeError, "you must specify the generator name"
    187         if order < 2**16:  
    188             # DO *NOT* use for prime subfield, since that would lead to

<type 'exceptions.TypeError'>: you must specify the generator name

Attachments

6516.patch Download (1.2 KB) - added by was 3 years ago.

Change History

Changed 3 years ago by mabshoff

  • milestone set to sage-2.8.5.1

Changed 3 years ago by mhansen

This happens because of the order of the checks in GF. See below:

sage: GF(13)
Finite Field of size 13

sage: GF(2^5)
Traceback (most recent call last):
...
TypeError: you must specify the generator name

sage: GF(2^5, 'a')
Finite Field in a of size 2^5
sage: GF(12)
Traceback (most recent call last):
...
TypeError: you must specify the generator name

sage: GF(12, 'a')
Traceback (most recent call last):
...
ArithmeticError: q must be a prime power


I guess it's a matter of deciding which of the two errors should come up first.

Changed 3 years ago by was

  • priority changed from major to minor

Changed 3 years ago by was

Changed 3 years ago by was

  • status changed from new to closed
  • resolution set to fixed

fixed.

Note: See TracTickets for help on using tickets.