On Sat, 12 Dec 2009 19:12:38 +0100
Burcin Erocal <bur...@erocal.org> wrote:

> I can also reproduce this, on a 32-bit Debian Lenny box, after setting
> SAGE_FORTRAN to /usr/bin/gfortran and rebuilding from scratch. 


On a build without the problem:

sage: Q.<i> = NumberField(x^2+1)
sage: complex(i)
0.99999999999999967j
sage: p = Q.defining_polynomial()
sage: cp = CDF['x'](p)
sage: cp.roots()
[(1.56125112838e-17 - 1.0*I, 1), (1.0*I, 1)]
sage: sorted(cp.roots())
[(1.0*I, 1), (1.56125112838e-17 - 1.0*I, 1)]


Now with the problem:

sage: Q.<i> = NumberField(x^2+1)
sage: complex(i)
(-2.8866882842426556e-18-0.99999999999999989j)
sage: p = Q.defining_polynomial()
sage: cp = CDF['x'](p)
sage: cp.roots()
[(-2.88668828424e-18 - 1.0*I, 1), (1.0*I, 1)]
sage: sorted(cp.roots())
[(-2.88668828424e-18 - 1.0*I, 1), (1.0*I, 1)]


The default embedding just takes the first root in the sorted list. 
AFAICT, we use numpy to compute the roots and that must be the gfortran
connection. Though I still couldn't manage to break an existing build
just by reinstalling packages.

Specifying an embedding while constructing the number field doesn't
seem to work.

Any comments?


Cheers,
Burcin

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to