Opened 9 years ago

Closed 6 years ago

#10308 closed defect (fixed)

bug in genus of ideal on 64 bits

Reported by: lftabera Owned by: was
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:

Description (last modified by davidloeffler)

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 lftabera 7 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 9 years ago by davidloeffler

  • Description modified (diff)

Changed 7 years ago by lftabera

comment:2 Changed 7 years ago by lftabera

  • Status changed from new to needs_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 7 years ago by jdemeyer

Please fill in your real name as Author.

comment:4 Changed 7 years ago by lftabera

  • Authors set to Luis Felipe Tabera Alonso

comment:5 Changed 6 years ago by pbruin

  • Reviewers set to Peter Bruin
  • Status changed from needs_review to positive_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 6 years ago by jdemeyer

  • Merged in set to sage-5.11.rc0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.