On Jun 17, 2009, at 7:05 AM, John Cremona wrote:

>
> I think is is easier, both on the eye and for a beginner to
> understand:
>
> sage: x = polygen(ZZ)
> sage: f = 2*x**2 - x
> sage: f.factor()
> x * (2*x - 1)
>
> The effect of the first line is that polynomials in x are elements of
> the polynomial ring with integer coefficients.  Note the difference
> when we switch to rational coeffs:
>
> sage: x = polygen(QQ)
> sage: f = 2*x**2 - x
> sage: f.factor()
> (2) * (x - 1/2) * x
>
> Here 2 is the "unit factor" amd the other two are irreducible
> polynomials normalised to be monic, which makes sense over a field.
>
> John Cremona
>

Is there any particular reason why the x comes at the end instead of

(2) * x * (x- 1/2)
or
(2 * x) * (x - 1/2)
or
2 * x * (x - 1/2)

just from a formatting perspective, any of these three I would generally
prefer.



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

Reply via email to