On Thu, Mar 19, 2015 at 3:16 AM, Chris Wuthrich
<[email protected]> wrote:
>
>> What about the quadratic case? Would you oppose change the print order
>> just for quadratic number fields (note that we already have a separate class
>> QuadraticNumberField, so the change can easily be made).
>
> And a further subquestion: What about Q[i] ? It seems really strange that
> sage decides to write 3*I + 1. But reverts it for CC(3*I+1).
> No other cas does that, I would think.

Yes, I was also referring specifically to to the special case of QQ[i],

    sage: R.<I> = QQ[sqrt(-1)]
    sage: 3 + R.gen()
    I + 3
    sage: CC(3 + R.gen())
    3.00000000000000 + 1.00000000000000*I

which Maple and Mathematica handle this case differently (better) than
arbitrary number fields. For numerical complex numbers, Pari also does

    sage: pari(CC(1.0, 2.0))
    1.00000000000000 + 2.00000000000000*I

and its "number field element" representation of Mod(poly1, poly2)
isn't very compelling.

Broadening the scope it seems more natural for cyclotomic fields and
quadratic fields as well

    sage: S = QQ[sqrt(5)]
    sage: 2 + S.gen()
    sqrt5 + 2

    sage: R = CyclotomicField(5)
    sage: (R.gen() + 1)^5
    5*zeta5^3 + 5*zeta5^2 - 3

I actually don't think it'd be that bad to print out algebraic number
representations in reverse order than polynomials; that's what we do
for power series (for admittedly even more compelling reasons).

But mine is just one of many opinions.

> While I am at it: Can I ask for a pointer to the discussion why I is
> symbolic ?

Probably because that was an upgrade from I being a member of CC
(precision 53) when symbolics were added. If there's a coercion to
ZZ[i] -> SR, I'd be nice to put it there.

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

Reply via email to