Opened 12 years ago

Closed 9 years ago

#10308 closed defect (fixed)

bug in genus of ideal on 64 bits

Reported by: Luis Felipe Tabera Alonso Owned by: William Stein
Priority: major Milestone: sage-5.11
Component: interfaces Keywords: genus, Singular, 64bits
Cc: Merged in: sage-5.11.rc0
Authors: Luis Felipe Tabera Alonso Reviewers: Peter Bruin
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by David Loeffler)

The following problem was discovered by Victor Miller in Sage-support

http://groups.google.com/group/sage-support/browse_thread/thread/e30af8c695b6a912

sage: T.<t1,t2,u1,u2> = QQ[] 
sage: TJ = Ideal([t1^2 + u1^2 - 1,t2^2 + u2^2 - 1, (t1-t2)^2 + (u1-u2)^2 -1]) 
sage: TJ.genus() 
4294967295 
sage: TJ.dimension() 
1 

I can confirm the bug in debian 64bits. Howeber, in debian 32 bits the answer is

sage: TJ.genus()
-1

So it seems to be a problem with 232-1 in 32 vs 64 bits.

A simpler example (Ubuntu 64-bit):

sage: R.<x, y, z> = QQ[]
sage: C = Curve(x^2 - 2*y^2)
sage: C.is_singular()
True
sage: C.genus()
4294967295

Attachments (1)

10380.patch (1.0 KB) - added by Luis Felipe Tabera Alonso 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 12 years ago by David Loeffler

Description: modified (diff)

Changed 10 years ago by Luis Felipe Tabera Alonso

Attachment: 10380.patch added

comment:2 Changed 10 years ago by Luis Felipe Tabera Alonso

Status: newneeds_review

It seems to me that the bug is solved in linux 64 bits with newer versions of Sage.

I attach a doctest for the record.

comment:3 Changed 10 years ago by Jeroen Demeyer

Please fill in your real name as Author.

comment:4 Changed 10 years ago by Luis Felipe Tabera Alonso

Authors: Luis Felipe Tabera Alonso

comment:5 Changed 9 years ago by Peter Bruin

Reviewers: Peter Bruin
Status: needs_reviewpositive_review

The bug does not appear to be present in 5.11.beta3, the patch applies and the tests that it introduces run correctly. Note that the answer -1 is really the (geometric) genus, not an error code (as one could be led to suspect by the sage-support discussion cited above).

comment:6 Changed 9 years ago by Jeroen Demeyer

Merged in: sage-5.11.rc0
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.