Opened 11 years ago

Closed 10 years ago

# finite field bug

Reported by: Owned by: mariah AlexGhitza major sage-duplicate/invalid/wontfix basic arithmetic Mariah Lenox N/A

### Description

```# Demonstrate a finite field bug in which
# a product of nonzero elements is equal to 0
# (which should not happen in a field)
#
# This is the smallest example I could find. It seems salient that
# the square of p is bigger than a 32-bit C integer. Larger values
# for p also exhibit the bug, smaller ones do not.

p = 2^16 + 1

# Create a quadratic field extension
K.<alpha> = GF(p^2)

# Choose some non-zero element of K, use the random_element
# method.
x = K(0)
while x == K(0):
x = K.random_element()

K.<alpha> = GF(p^2)  # this line is necessary for bug
x_coerce = K(x)
print 2*x_coerce  # prints zero
```

### comment:1 Changed 10 years ago by robertwb

• Milestone set to sage-duplicate/invalid/wontfix
• Resolution set to duplicate
• Status changed from new to closed

Duplicate of #10045 .

Note: See TracTickets for help on using tickets.