Re: [sage-support] Matrices and Cyclotomics

21 views
Skip to first unread message

William Stein

unread,
Apr 26, 2012, 6:38:50 PM4/26/12
to sage-s...@googlegroups.com, sage-release
On Wed, Apr 25, 2012 at 8:45 AM, Graham Gerrard
<graham....@gmail.com> wrote:
> Finding occasional inconsistencies when using matrices with cyclotomic
> entries, though works well most of the time...
>
> sage: s=CyclotomicField(24,'s').gen()
> sage: (8*s^6-1)^10
> -1098715216*s^6 - 372960063
> sage: xb=matrix(1,1,[8*s^6-1])
> sage: xb^10
> [1036922553*s^6 - 372960063]
>
> Above example is trivial computation, though problem recurs in several
> contexts.  I believe that scalar multiplication is correct and xb^10
> incorrect. Above example works OK when powers<10.
>
> Any suggestions?

This was already found and fixed (maybe by me?). E.g., in sage-5.0-pre15:

sage: sage: s=CyclotomicField(24,'s').gen()
sage: sage: (8*s^6-1)^10
-1098715216*s^6 - 372960063
sage: sage: xb=matrix(1,1,[8*s^6-1])
sage: sage: xb^10
[-1098715216*s^6 - 372960063]

To sage-release: yet another reason to release Sage-5.0 *ASAP*.

William

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



--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

Keshav Kini

unread,
Apr 26, 2012, 7:22:06 PM4/26/12
to sage-r...@googlegroups.com, sage-s...@googlegroups.com
On Friday, April 27, 2012 6:38:50 AM UTC+8, William Stein wrote:
E.g., in sage-5.0-pre15:

sage: sage: s=CyclotomicField(24,'s').gen()
sage: sage: (8*s^6-1)^10
-1098715216*s^6 - 372960063
sage: sage: xb=matrix(1,1,[8*s^6-1])
sage: sage: xb^10
[-1098715216*s^6 - 372960063]

This statement may become false in the future, because 5.0.beta15 is still under construction.

-Keshav

----
Join us in #sagemath on irc.freenode.net !

leif

unread,
Apr 26, 2012, 7:34:35 PM4/26/12
to sage-r...@googlegroups.com
William Stein wrote:
> On Wed, Apr 25, 2012 at 8:45 AM, Graham Gerrard
> <graham....@gmail.com> wrote:
>> Finding occasional inconsistencies when using matrices with cyclotomic
>> entries, though works well most of the time...
>>
>> sage: s=CyclotomicField(24,'s').gen()
>> sage: (8*s^6-1)^10
>> -1098715216*s^6 - 372960063
>> sage: xb=matrix(1,1,[8*s^6-1])
>> sage: xb^10
>> [1036922553*s^6 - 372960063]
>>
>> Above example is trivial computation, though problem recurs in several
>> contexts. I believe that scalar multiplication is correct and xb^10
>> incorrect. Above example works OK when powers<10.
>>
>> Any suggestions?
>
> This was already found and fixed (maybe by me?). E.g., in sage-5.0-pre15:
>
> sage: sage: s=CyclotomicField(24,'s').gen()
> sage: sage: (8*s^6-1)^10
> -1098715216*s^6 - 372960063
> sage: sage: xb=matrix(1,1,[8*s^6-1])
> sage: sage: xb^10
> [-1098715216*s^6 - 372960063]
>
> To sage-release: yet another reason to release Sage-5.0 *ASAP*.

FWIW, I still get the wrong answer with Sage 5.0.beta11 and #11358
(merged into beta12) applied.

Anyways, you'll *always* find bugs in Sage version N that have already
been fixed in some (N+1).{alpha,beta}K.


Although we [IMHO unfortunately] don't make any bugfix-only releases
[any more]...


-leif

--
() The ASCII Ribbon Campaign
/\ Help Cure HTML E-Mail

leif

unread,
Apr 26, 2012, 8:36:40 PM4/26/12
to sage-r...@googlegroups.com
... and even with beta13, the latest released devel version.
Reply all
Reply to author
Forward
0 new messages