Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
1

How to express elements in a field of prime order and power of a prime order using the same function?

asked 4 years ago

MKS gravatar image

updated 2 years ago

FrédéricC gravatar image

When field size is of the form pm, where p is a prime and m>1 is a positive integer, there is no problem. For example

F.<x> = GF(5^2)
print F.fetch_int(4)

It outputs : 4.

But if we take field size is in the form p1, then the above code does not working. For example

F.<x> = GF(5^1)
print F.fetch_int(4)

It gives errors. How can I fix this using the same function in both the cases?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 4 years ago

rburing gravatar image

This method is currently available only for the Givaro and NTL implementations of finite fields.

You can specify the implementation using the impl keyword to GF, e.g.:

sage: F.<x> = GF(5^1, impl='givaro')
sage: F.fetch_int(4)
4

In theory, this method could easily be added to all implementations. You might open a trac ticket for it and/or bring it up on the sage-devel mailing list.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 4 years ago

Seen: 380 times

Last updated: Sep 19 '20