On Thu, Mar 19, 2015 at 9:11 AM, Robert Bradshaw <[email protected]> wrote:
> 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.

Can you illustrate your claims about Maple and Mathematica with actual
Maple and Mathematica sessions?

> 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.

Well I certainly don't like it either.  However for a system like pari
where the output representation of elements determines the object, it
is the best possible choice.   It would be crazy if it were written
Mod(reversed poly1, poly2).

>
> 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).

I think every single math software system there is prints power series
from lowest to highest degree.

> But mine is just one of many opinions.

I think a really compelling argument that is more than just an opinion
is really important when changing something that will be noticed.  For
example, this will break many of the doctests in my algebraic number
theory book...

You and I co-authored much of the algebraic number theory
functionality in the first place and _you_ implemented like 90% of
QuadraticField.  I wonder, did you think about this exact issue before
when we were implementing things in the first place?

I only remember a similar discussion in Sage coming up once before in
2009 when Gary Furnish wrote his "new symbolics", and switched the
order of printing of polynomials to be from low to high degree, as is
done in Mathematica, but nowhere else in math (e.g., the quadratic
would be written c + b*x + ax^2).  People weren't pleased with that
suggested change at the time...

>
>> 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're right -- we did have CC before Bobby Moretti's symbolics, so
that makes sense...

>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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