On May 26, 3:04 am, Gaëtan Bisson <[EMAIL PROTECTED]> wrote:
> Carl Witty wrote:
> > You need to explicitly use the field of fractions of R:
>
> > sage: R.<a,b> = QQ[]
> > sage: S.<x> = R.fraction_field()[]
> > sage: xgcd(x^2, a*x+b)
> > (b^2/a^2, 1, ((-1)/a)*x + b/a^2)
>
> Thanks. Is it possible to do the same computation over a number field
> (instead of QQ)?
>
> For instance:
>   R.<a,b> = NumberField(x^2-3,'g')[]
>   S.<y> = R.fraction_field()[]
>   xgcd(y^2, a*y+b)
>
> returns the error: (more below)
>   <type 'exceptions.TypeError'>: unsupported operand type(s) for %: 
> 'sage.rings.number_field.number_field_element_quadratic.NumberFieldElement_quadratic'
>  and 
> 'sage.rings.number_field.number_field_element_quadratic.NumberFieldElement_quadratic'

This should work, but doesn't due to a bug (well, perhaps you could
call it a missing feature instead).  I've posted a patch here,
http://trac.sagemath.org/sage_trac/ticket/3327 so this will work in
some future version of Sage (likely the next version, assuming that
somebody positively reviews my patch).

Carl
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to