On Tue, Apr 15, 2014 at 10:19:25AM -0700, Mark Shimozono wrote: > I find myself in legitimate need of fractional powers of a variable q, > which sage doesn't seem to like. > > Is there a reasonable workaround?
I haven't followed the tickets on Puiseux polynomials, but that's something that could be explored. Other than that, it depends on what kind of operations you want to be doing. If e.g. you don't care about polynomial operations like factorization, you could use the group algebra of the additive group QQ: sage: QQ.algebra(QQ, category=Groups()) Group algebra of Rational Field over Rational Field > I thought about always raising to an extra power (the maximum > denominator is known) but I don't know how to mangle the output > to put the fraction back in. I assume it is dangerous to mess > with _repr_ for a polynomial and the code is assuming that the > user is allowed to specify their own ring with a q in it. In theory, _repr_ is not supposed to be used in calculations; so you could derive your own custom subclass of some class for elements of polynomial rings, and safely redefine _repr_ there to your liking. Requesting a polynomial ring to use a custom subclass for its elements is not as practical as it should be though. Cheers, Nicolas -- Nicolas M. Thiéry "Isil" <nthi...@users.sf.net> http://Nicolas.Thiery.name/ -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/d/optout.