Ticket #4469 (closed defect: fixed)

Opened 17 months ago

Last modified 16 months ago

[with patch, positive review] Sage 3.2.a3: output ordering randomness in sage/rings/number_field/number_field.py

Reported by: mabshoff Owned by: tbd
Priority: blocker Milestone: sage-3.2
Component: algebra Keywords:
Cc: Author(s):
Report Upstream: Reviewer(s):
Merged in: Work issues:

Description

eno:

sage -t  devel/sage/sage/rings/number_field/number_field.py
**********************************************************************
File "/home/wstein/eno/sage-3.2.alpha3/tmp/number_field.py", line 1025:
    sage: [phi(k.0^2) for phi in v]
Expected:
    [2.97572074038...,
     -2.40889943716 + 1.90254105304*I,
     -2.40889943716 - 1.90254105304*I,
     0.921039066973 + 3.07553311885*I,
     0.921039066973 - 3.07553311885*I]
Got:
    [2.97572074038, 
     -2.40889943716 + 1.90254105304*I, 
     -2.40889943716 - 1.90254105304*I, 
     0.921039066973 - 3.07553311885*I, 
     0.921039066973 + 3.07553311885*I]
**********************************************************************

cicero:

sage -t  devel/sage/sage/rings/number_field/number_field.py
**********************************************************************
File "/home/wstein/cicero/build/sage-3.2.alpha3/tmp/number_field.py", line 1032:
    sage: K.complex_embeddings() 
Expected:
    [
    Ring morphism:
      From: Number Field in a with defining polynomial x^3 + 2
      To:   Complex Double Field 
      Defn: a |--> -1.25992104989...,
    Ring morphism:
      From: Number Field in a with defining polynomial x^3 + 2
      To:   Complex Double Field
      Defn: a |--> 0.629960524947 - 1.09112363597*I,
    Ring morphism:
      From: Number Field in a with defining polynomial x^3 + 2
      To:   Complex Double Field
      Defn: a |--> 0.629960524947 + 1.09112363597*I
    ]
Got:
    [
    Ring morphism:
      From: Number Field in a with defining polynomial x^3 + 2
      To:   Complex Double Field
      Defn: a |--> -1.25992104989 + 2.77555756156e-16*I,
    Ring morphism:
      From: Number Field in a with defining polynomial x^3 + 2      To:   Complex Double Field
      Defn: a |--> 0.629960524947 + 1.09112363597*I,
    Ring morphism:
      From: Number Field in a with defining polynomial x^3 + 2
      To:   Complex Double Field
      Defn: a |--> 0.629960524947 - 1.09112363597*I
    ]
**********************************************************************

menas:

sage -t  devel/sage/sage/rings/number_field/number_field.py 
**********************************************************************
File "/home/wstein/menas/build/sage-3.2.alpha3/tmp/number_field.py", line 1025:
    sage: [phi(k.0^2) for phi in v]
Expected:
    [2.97572074038...,
     -2.40889943716 + 1.90254105304*I,
     -2.40889943716 - 1.90254105304*I,
     0.921039066973 + 3.07553311885*I,
     0.921039066973 - 3.07553311885*I]
Got:
    [2.97572074038, 
     -2.40889943716 + 1.90254105304*I, 
     -2.40889943716 - 1.90254105304*I, 
     0.921039066973 - 3.07553311885*I, 
     0.921039066973 + 3.07553311885*I]
**********************************************************************

Attachments

trac-4469.patch Download (1.2 KB) - added by craigcitro 16 months ago.

Change History

Changed 16 months ago by mabshoff

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

This has gone away in 3.2.rc1. I am not sure which patch is responsible here.

Cheers,

Michael

Changed 16 months ago by mabshoff

  • status changed from closed to reopened
  • resolution fixed deleted

These problems pop up with gcc 4.3.2 and the system compiler on the given system does not show the problem. Reopened.

Cheers,

Michael

Changed 16 months ago by craigcitro

Changed 16 months ago by craigcitro

Patch simply adds #random. The real underlying bug is that we don't have a consistent ordering on elements in CDF: see #4544 for a discussion of this issue.

Changed 16 months ago by craigcitro

  • summary changed from Sage 3.2.a3: output ordering randomness in sage/rings/number_field/number_field.py to [with patch, needs review] Sage 3.2.a3: output ordering randomness in sage/rings/number_field/number_field.py

Changed 16 months ago by mabshoff

  • summary changed from [with patch, needs review] Sage 3.2.a3: output ordering randomness in sage/rings/number_field/number_field.py to [with patch, positive review] Sage 3.2.a3: output ordering randomness in sage/rings/number_field/number_field.py

Looks good.

Cheers,

Michael

Changed 16 months ago by mabshoff

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

Merged in Sage 3.2.rc2

Note: See TracTickets for help on using tickets.