#13041: Conversion of number field elements to algebraic numbers
-------------------------------------+-------------------------------------
       Reporter:  rbeezer            |        Owner:  AlexGhitza
           Type:  defect             |       Status:  needs_work
       Priority:  minor              |    Milestone:  sage-7.2
      Component:  algebra            |   Resolution:
       Keywords:  sd40.5             |    Merged in:
        Authors:  Marc Mezzarobba    |    Reviewers:  Vincent Delecroix
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/mmezzarobba/NFtoQQbar            |  526e66c778c58e34086efd6ad5871ea84186520d
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by mmezzarobba):

 Replying to [comment:8 vdelecroix]:
 > Why you can not go directly `NumberField -> IntervalField`? (i.e. the
 FIXME in comment).

 For example:

 {{{
 sage: C.<z> = CyclotomicField(7)
 sage: a = 2*z^2 + 5*z^4
 sage: CIF(a)
 ...
 TypeError: unable to coerce to a ComplexIntervalFieldElement
 sage: CIF(CLF(a))
 -4.9498862074248? - 0.2195628712242?*I
 }}}

 > Is there a related ticket?

 I don't know. I needed to convert number field elements to algebraic
 numbers in experimental code of mine, so I wrote a small patch to make
 that work in the cases I was interested in, but I didn't try to go to the
 source of the problem...

 > Indeed, the code will not work in some cases because of the following
 > {{{
 > sage: K = NumberField(x^3 - 2, 'cbrt2', embedding=RIF(1.25,1.26))
 > sage: RLF(K.gen())
 > Traceback (most recent call last):
 > ...
 > RuntimeError: maximum recursion depth exceeded while calling a Python
 object
 > }}}

 Yes, the patch is far from perfect. Even so, I think it is an improvement
 (and I don't have much time to work on a cleaner fix right now), but if
 you disagree, I'll just keep my local patch for now!

--
Ticket URL: <http://trac.sagemath.org/ticket/13041#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to