[sage-devel] Re: Sage Reference Manual

2014-03-30 Thread Martin Albrecht
Thanks, got it working!

On Sunday 30 Mar 2014 09:11:09 Volker Braun wrote:
> You might have to "make doc-clean" got get rid of stale caches when adding
> new file.
> 
> The most basic UTF8 works, but its far from 100%. If you run into problems
> you have to add a workaround for the codepoint to conf.py latex preamble...

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


[sage-devel] Re: Sage Reference Manual

2014-03-30 Thread Volker Braun
You might have to "make doc-clean" got get rid of stale caches when adding 
new file.

The most basic UTF8 works, but its far from 100%. If you run into problems 
you have to add a workaround for the codepoint to conf.py latex preamble...

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


[sage-devel] Sage Reference Manual

2014-03-30 Thread Martin Albrecht
Hi all,

I have two questions about the Sage reference manual:

1. How do I add a new module to it? That is, I created a new directory 
lattices and I want to add that as a new reference module to the reference 
manual. I did the obvious thing of adding a directory in doc/en/reference and 
added an index.rst + symlinked conf_sub.py to conf.py but now I get:

OSError: [lattices ] /opt/sage-
devel/src/doc/en/reference/lattices/index.rst:5: WARNING: toctree contains 
reference to nonexisting document u'sage/lattices/integer_lattice.py'

The file exists. However, I noticed that my new directory doesn't have a sage 
subdirectory like all the other directories in en/reference so I presume some 
init is missing. What is it? Did I miss this in the documentation?

2. Does the Sage reference manual support UTF-8? I was asked at 
http://trac.sagemath.org/ticket/15976 Any experience?

Cheers,
Martin

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


Re: [sage-devel] Bug with max

2014-03-30 Thread John Cremona
On 30 March 2014 16:01, Vincent Delecroix <20100.delecr...@gmail.com> wrote:
> Dear Paul,
>
> It would be much better if your questions were asked on
> ask.sagemath.org or the sage-support googlegroups. The topic of the
> devel list is about development (and of course include bug reports).
> In particular your question and the previous one about eigenvalues are
> off topic. Moreover, using ask.sagemath.org would benefit to other
> users who, for most of them, does not use sage-devel.
>

I agree -- I think when I first answered I had assumed it was sage-support.

John

> Thanks
> Vincent
>
> 2014-03-30 16:31 UTC+02:00, Paul Mercat :
>> Maybe there is no bug, but the problem is that it take a very very long
>> time to compute the minimal polynomial of the absolute value of an
>> algebraic number.
>>
>>
>> Le dimanche 30 mars 2014 16:21:06 UTC+2, Paul Mercat a écrit :
>>>
>>> I can confirm that the error comes from the comparaison of two elements of
>>>
>>> QQbar, because the comparaison of absolutes values of two complexe
>>> conjugate doesn't work
>>>
>>> sage: a = Automaton([(0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 2, 0), (2, 0,
>>> 0), (2, 3, 1), (3, 4, 1), (3, 7, 0), (4, 1, 1), (4, 5, 0), (5, 0, 0), (5,
>>>
>>> 6, 1), (6, 7, 0), (6, 37, 1), (7, 3, 1), (7, 8, 0), (8, 0, 0), (8, 9, 1),
>>>
>>> (9, 2, 0), (9, 10, 1), (10, 2, 0), (10, 11, 1), (11, 2, 0), (11, 12, 1),
>>> (12, 13, 0), (12, 34, 1), (13, 14, 0), (13, 24, 1), (14, 1, 1), (14, 15,
>>> 0), (15, 16, 0), (15, 33, 1), (16, 0, 0), (16, 17, 1), (17, 1, 1), (17,
>>> 18,
>>> 0), (18, 3, 1), (18, 19, 0), (19, 1, 1), (19, 20, 0), (20, 1, 1), (20, 21,
>>>
>>> 0), (21, 22, 0), (21, 31, 1), (22, 23, 0), (23, 0, 0), (23, 24, 1), (24,
>>> 4,
>>> 1), (24, 25, 0), (25, 26, 1), (25, 29, 0), (26, 7, 0), (26, 27, 1), (27,
>>> 1,
>>> 1), (27, 28, 0), (28, 6, 1), (28, 19, 0), (29, 0, 0), (29, 30, 1), (30,
>>> 10,
>>> 1), (30, 18, 0), (31, 2, 0), (31, 32, 1), (32, 2, 0), (32, 3, 1), (33, 2,
>>>
>>> 0), (33, 17, 1), (34, 35, 1), (35, 1, 1), (35, 36, 0), (36, 16, 0), (36,
>>> 26, 1), (37, 5, 0), (37, 11, 1)])
>>> sage: m = a.graph().adjacency_matrix()
>>> sage: e = m.eigenvalues()
>>> sage: l = [abs(el) for el in e]
>>> sage: l[19]==l[20] #doesn't terminate 
>>>
>>> Le dimanche 30 mars 2014 16:09:28 UTC+2, Paul Mercat a écrit :

 I think I know where is the problem.
 I have tried to reimplemente the function max, and I've see that it
 doesn't terminate when there is a comparaison between two complex
 conjugates.

 The bug with max comes from a bug in the comparaison of two elements of
 QQbar : it should detect when two algebraic numbers are equals, but it
 doesn't and so it try to compute with more and more precision to see
 which
 one is greater, but it doesn't terminates because there are equals.

 Maybe I will try to fix this.

 Paul

 Le dimanche 30 mars 2014 16:00:14 UTC+2, Paul Mercat a écrit :
>
> If I do what you propose, it works.
> But I want the maximum of the list in QQbar, not in RR, and I don't
> understand why the max function take all this time.
> And it also doesn't work with key=abs.
>
> Paul
>
> Le dimanche 30 mars 2014 15:49:45 UTC+2, John Cremona a écrit :
>>
>> m is an integer matrix and its eigenvalues (which are not all rel
>> anyway) are returned as algebraic numbers (try e[0].parent()).
>>
>> Perhaps you want this:
>> sage: max([RR(ei) for ei in e if ei in RR])
>> 1.99801167774722
>>
>> but note that only 22 of the 38 eigenvalues are real.
>>
>> John
>>
>>
>> On 30 March 2014 14:32, Paul Mercat  wrote:
>> > The function max sometimes doesn't work in sage.
>> > Here is an example :
>> >
>> > sage: a = Automaton([(0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 2, 0), (2,
>> >
>> 0, 0),
>> > (2, 3, 1), (3, 4, 1), (3, 7, 0), (4, 1, 1), (4, 5, 0), (5, 0, 0), (5,
>> >
>> 6, 1),
>> > (6, 7, 0), (6, 37, 1), (7, 3, 1), (7, 8, 0), (8, 0, 0), (8, 9, 1),
>> (9, 2,
>> > 0), (9, 10, 1), (10, 2, 0), (10, 11, 1), (11, 2, 0), (11, 12, 1),
>> (12, 13,
>> > 0), (12, 34, 1), (13, 14, 0), (13, 24, 1), (14, 1, 1), (14, 15, 0),
>> (15, 16,
>> > 0), (15, 33, 1), (16, 0, 0), (16, 17, 1), (17, 1, 1), (17, 18, 0),
>> (18, 3,
>> > 1), (18, 19, 0), (19, 1, 1), (19, 20, 0), (20, 1, 1), (20, 21, 0),
>> (21, 22,
>> > 0), (21, 31, 1), (22, 23, 0), (23, 0, 0), (23, 24, 1), (24, 4, 1),
>> (24, 25,
>> > 0), (25, 26, 1), (25, 29, 0), (26, 7, 0), (26, 27, 1), (27, 1, 1),
>> (27, 28,
>> > 0), (28, 6, 1), (28, 19, 0), (29, 0, 0), (29, 30, 1), (30, 10, 1),
>> (30, 18,
>> > 0), (31, 2, 0), (31, 32, 1), (32, 2, 0), (32, 3, 1), (33, 2, 0), (33,
>> >
>> 17,
>> > 1), (34, 35, 1), (35, 1, 1), (35, 36, 0), (36, 16, 0), (36, 26, 1),
>> (37, 5,
>> > 0), (37, 11, 1)])
>> > sage: m = a.graph().adjacency_matrix()
>> > sag

Re: [sage-devel] Bug with max

2014-03-30 Thread John Cremona
Yes, comparison between two algebraic numbers is very slow especially
when they have anything but small degree.  The char poly of your
matrix has irreducible factors of degrees 10 and 17, so for all we
know the field containing all eigenvalues might have degree as large
as 10! * 17!.

John

On 30 March 2014 15:31, Paul Mercat  wrote:
> Maybe there is no bug, but the problem is that it take a very very long time
> to compute the minimal polynomial of the absolute value of an algebraic
> number.
>
>
> Le dimanche 30 mars 2014 16:21:06 UTC+2, Paul Mercat a écrit :
>>
>> I can confirm that the error comes from the comparaison of two elements of
>> QQbar, because the comparaison of absolutes values of two complexe conjugate
>> doesn't work
>>
>> sage: a = Automaton([(0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 2, 0), (2, 0,
>> 0), (2, 3, 1), (3, 4, 1), (3, 7, 0), (4, 1, 1), (4, 5, 0), (5, 0, 0), (5, 6,
>> 1), (6, 7, 0), (6, 37, 1), (7, 3, 1), (7, 8, 0), (8, 0, 0), (8, 9, 1), (9,
>> 2, 0), (9, 10, 1), (10, 2, 0), (10, 11, 1), (11, 2, 0), (11, 12, 1), (12,
>> 13, 0), (12, 34, 1), (13, 14, 0), (13, 24, 1), (14, 1, 1), (14, 15, 0), (15,
>> 16, 0), (15, 33, 1), (16, 0, 0), (16, 17, 1), (17, 1, 1), (17, 18, 0), (18,
>> 3, 1), (18, 19, 0), (19, 1, 1), (19, 20, 0), (20, 1, 1), (20, 21, 0), (21,
>> 22, 0), (21, 31, 1), (22, 23, 0), (23, 0, 0), (23, 24, 1), (24, 4, 1), (24,
>> 25, 0), (25, 26, 1), (25, 29, 0), (26, 7, 0), (26, 27, 1), (27, 1, 1), (27,
>> 28, 0), (28, 6, 1), (28, 19, 0), (29, 0, 0), (29, 30, 1), (30, 10, 1), (30,
>> 18, 0), (31, 2, 0), (31, 32, 1), (32, 2, 0), (32, 3, 1), (33, 2, 0), (33,
>> 17, 1), (34, 35, 1), (35, 1, 1), (35, 36, 0), (36, 16, 0), (36, 26, 1), (37,
>> 5, 0), (37, 11, 1)])
>> sage: m = a.graph().adjacency_matrix()
>> sage: e = m.eigenvalues()
>> sage: l = [abs(el) for el in e]
>> sage: l[19]==l[20] #doesn't terminate 
>>
>> Le dimanche 30 mars 2014 16:09:28 UTC+2, Paul Mercat a écrit :
>>>
>>> I think I know where is the problem.
>>> I have tried to reimplemente the function max, and I've see that it
>>> doesn't terminate when there is a comparaison between two complex
>>> conjugates.
>>>
>>> The bug with max comes from a bug in the comparaison of two elements of
>>> QQbar : it should detect when two algebraic numbers are equals, but it
>>> doesn't and so it try to compute with more and more precision to see which
>>> one is greater, but it doesn't terminates because there are equals.
>>>
>>> Maybe I will try to fix this.
>>>
>>> Paul
>>>
>>> Le dimanche 30 mars 2014 16:00:14 UTC+2, Paul Mercat a écrit :

 If I do what you propose, it works.
 But I want the maximum of the list in QQbar, not in RR, and I don't
 understand why the max function take all this time.
 And it also doesn't work with key=abs.

 Paul

 Le dimanche 30 mars 2014 15:49:45 UTC+2, John Cremona a écrit :
>
> m is an integer matrix and its eigenvalues (which are not all rel
> anyway) are returned as algebraic numbers (try e[0].parent()).
>
> Perhaps you want this:
> sage: max([RR(ei) for ei in e if ei in RR])
> 1.99801167774722
>
> but note that only 22 of the 38 eigenvalues are real.
>
> John
>
>
> On 30 March 2014 14:32, Paul Mercat  wrote:
> > The function max sometimes doesn't work in sage.
> > Here is an example :
> >
> > sage: a = Automaton([(0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 2, 0), (2,
> > 0, 0),
> > (2, 3, 1), (3, 4, 1), (3, 7, 0), (4, 1, 1), (4, 5, 0), (5, 0, 0), (5,
> > 6, 1),
> > (6, 7, 0), (6, 37, 1), (7, 3, 1), (7, 8, 0), (8, 0, 0), (8, 9, 1),
> > (9, 2,
> > 0), (9, 10, 1), (10, 2, 0), (10, 11, 1), (11, 2, 0), (11, 12, 1),
> > (12, 13,
> > 0), (12, 34, 1), (13, 14, 0), (13, 24, 1), (14, 1, 1), (14, 15, 0),
> > (15, 16,
> > 0), (15, 33, 1), (16, 0, 0), (16, 17, 1), (17, 1, 1), (17, 18, 0),
> > (18, 3,
> > 1), (18, 19, 0), (19, 1, 1), (19, 20, 0), (20, 1, 1), (20, 21, 0),
> > (21, 22,
> > 0), (21, 31, 1), (22, 23, 0), (23, 0, 0), (23, 24, 1), (24, 4, 1),
> > (24, 25,
> > 0), (25, 26, 1), (25, 29, 0), (26, 7, 0), (26, 27, 1), (27, 1, 1),
> > (27, 28,
> > 0), (28, 6, 1), (28, 19, 0), (29, 0, 0), (29, 30, 1), (30, 10, 1),
> > (30, 18,
> > 0), (31, 2, 0), (31, 32, 1), (32, 2, 0), (32, 3, 1), (33, 2, 0), (33,
> > 17,
> > 1), (34, 35, 1), (35, 1, 1), (35, 36, 0), (36, 16, 0), (36, 26, 1),
> > (37, 5,
> > 0), (37, 11, 1)])
> > sage: m = a.graph().adjacency_matrix()
> > sage: e = m.eigenvalues()
> > sage: print e
> > sage: max(e) #doesn't terminate !!!
> >
> > Do you know why it doesn't work ?
> >
> > Paul
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups
> > "sage-devel" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an
> > email to sage-devel+...@googlegroups.com.
> > To

Re: [sage-devel] Bug with max

2014-03-30 Thread Vincent Delecroix
Dear Paul,

It would be much better if your questions were asked on
ask.sagemath.org or the sage-support googlegroups. The topic of the
devel list is about development (and of course include bug reports).
In particular your question and the previous one about eigenvalues are
off topic. Moreover, using ask.sagemath.org would benefit to other
users who, for most of them, does not use sage-devel.

Thanks
Vincent

2014-03-30 16:31 UTC+02:00, Paul Mercat :
> Maybe there is no bug, but the problem is that it take a very very long
> time to compute the minimal polynomial of the absolute value of an
> algebraic number.
>
>
> Le dimanche 30 mars 2014 16:21:06 UTC+2, Paul Mercat a écrit :
>>
>> I can confirm that the error comes from the comparaison of two elements of
>>
>> QQbar, because the comparaison of absolutes values of two complexe
>> conjugate doesn't work
>>
>> sage: a = Automaton([(0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 2, 0), (2, 0,
>> 0), (2, 3, 1), (3, 4, 1), (3, 7, 0), (4, 1, 1), (4, 5, 0), (5, 0, 0), (5,
>>
>> 6, 1), (6, 7, 0), (6, 37, 1), (7, 3, 1), (7, 8, 0), (8, 0, 0), (8, 9, 1),
>>
>> (9, 2, 0), (9, 10, 1), (10, 2, 0), (10, 11, 1), (11, 2, 0), (11, 12, 1),
>> (12, 13, 0), (12, 34, 1), (13, 14, 0), (13, 24, 1), (14, 1, 1), (14, 15,
>> 0), (15, 16, 0), (15, 33, 1), (16, 0, 0), (16, 17, 1), (17, 1, 1), (17,
>> 18,
>> 0), (18, 3, 1), (18, 19, 0), (19, 1, 1), (19, 20, 0), (20, 1, 1), (20, 21,
>>
>> 0), (21, 22, 0), (21, 31, 1), (22, 23, 0), (23, 0, 0), (23, 24, 1), (24,
>> 4,
>> 1), (24, 25, 0), (25, 26, 1), (25, 29, 0), (26, 7, 0), (26, 27, 1), (27,
>> 1,
>> 1), (27, 28, 0), (28, 6, 1), (28, 19, 0), (29, 0, 0), (29, 30, 1), (30,
>> 10,
>> 1), (30, 18, 0), (31, 2, 0), (31, 32, 1), (32, 2, 0), (32, 3, 1), (33, 2,
>>
>> 0), (33, 17, 1), (34, 35, 1), (35, 1, 1), (35, 36, 0), (36, 16, 0), (36,
>> 26, 1), (37, 5, 0), (37, 11, 1)])
>> sage: m = a.graph().adjacency_matrix()
>> sage: e = m.eigenvalues()
>> sage: l = [abs(el) for el in e]
>> sage: l[19]==l[20] #doesn't terminate 
>>
>> Le dimanche 30 mars 2014 16:09:28 UTC+2, Paul Mercat a écrit :
>>>
>>> I think I know where is the problem.
>>> I have tried to reimplemente the function max, and I've see that it
>>> doesn't terminate when there is a comparaison between two complex
>>> conjugates.
>>>
>>> The bug with max comes from a bug in the comparaison of two elements of
>>> QQbar : it should detect when two algebraic numbers are equals, but it
>>> doesn't and so it try to compute with more and more precision to see
>>> which
>>> one is greater, but it doesn't terminates because there are equals.
>>>
>>> Maybe I will try to fix this.
>>>
>>> Paul
>>>
>>> Le dimanche 30 mars 2014 16:00:14 UTC+2, Paul Mercat a écrit :

 If I do what you propose, it works.
 But I want the maximum of the list in QQbar, not in RR, and I don't
 understand why the max function take all this time.
 And it also doesn't work with key=abs.

 Paul

 Le dimanche 30 mars 2014 15:49:45 UTC+2, John Cremona a écrit :
>
> m is an integer matrix and its eigenvalues (which are not all rel
> anyway) are returned as algebraic numbers (try e[0].parent()).
>
> Perhaps you want this:
> sage: max([RR(ei) for ei in e if ei in RR])
> 1.99801167774722
>
> but note that only 22 of the 38 eigenvalues are real.
>
> John
>
>
> On 30 March 2014 14:32, Paul Mercat  wrote:
> > The function max sometimes doesn't work in sage.
> > Here is an example :
> >
> > sage: a = Automaton([(0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 2, 0), (2,
> >
> 0, 0),
> > (2, 3, 1), (3, 4, 1), (3, 7, 0), (4, 1, 1), (4, 5, 0), (5, 0, 0), (5,
> >
> 6, 1),
> > (6, 7, 0), (6, 37, 1), (7, 3, 1), (7, 8, 0), (8, 0, 0), (8, 9, 1),
> (9, 2,
> > 0), (9, 10, 1), (10, 2, 0), (10, 11, 1), (11, 2, 0), (11, 12, 1),
> (12, 13,
> > 0), (12, 34, 1), (13, 14, 0), (13, 24, 1), (14, 1, 1), (14, 15, 0),
> (15, 16,
> > 0), (15, 33, 1), (16, 0, 0), (16, 17, 1), (17, 1, 1), (17, 18, 0),
> (18, 3,
> > 1), (18, 19, 0), (19, 1, 1), (19, 20, 0), (20, 1, 1), (20, 21, 0),
> (21, 22,
> > 0), (21, 31, 1), (22, 23, 0), (23, 0, 0), (23, 24, 1), (24, 4, 1),
> (24, 25,
> > 0), (25, 26, 1), (25, 29, 0), (26, 7, 0), (26, 27, 1), (27, 1, 1),
> (27, 28,
> > 0), (28, 6, 1), (28, 19, 0), (29, 0, 0), (29, 30, 1), (30, 10, 1),
> (30, 18,
> > 0), (31, 2, 0), (31, 32, 1), (32, 2, 0), (32, 3, 1), (33, 2, 0), (33,
> >
> 17,
> > 1), (34, 35, 1), (35, 1, 1), (35, 36, 0), (36, 16, 0), (36, 26, 1),
> (37, 5,
> > 0), (37, 11, 1)])
> > sage: m = a.graph().adjacency_matrix()
> > sage: e = m.eigenvalues()
> > sage: print e
> > sage: max(e) #doesn't terminate !!!
> >
> > Do you know why it doesn't work ?
> >
> > Paul
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "sage-devel" group.
>

Re: [sage-devel] Bug with max

2014-03-30 Thread Paul Mercat
Maybe there is no bug, but the problem is that it take a very very long 
time to compute the minimal polynomial of the absolute value of an 
algebraic number.


Le dimanche 30 mars 2014 16:21:06 UTC+2, Paul Mercat a écrit :
>
> I can confirm that the error comes from the comparaison of two elements of 
> QQbar, because the comparaison of absolutes values of two complexe 
> conjugate doesn't work
>
> sage: a = Automaton([(0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 2, 0), (2, 0, 
> 0), (2, 3, 1), (3, 4, 1), (3, 7, 0), (4, 1, 1), (4, 5, 0), (5, 0, 0), (5, 
> 6, 1), (6, 7, 0), (6, 37, 1), (7, 3, 1), (7, 8, 0), (8, 0, 0), (8, 9, 1), 
> (9, 2, 0), (9, 10, 1), (10, 2, 0), (10, 11, 1), (11, 2, 0), (11, 12, 1), 
> (12, 13, 0), (12, 34, 1), (13, 14, 0), (13, 24, 1), (14, 1, 1), (14, 15, 
> 0), (15, 16, 0), (15, 33, 1), (16, 0, 0), (16, 17, 1), (17, 1, 1), (17, 18, 
> 0), (18, 3, 1), (18, 19, 0), (19, 1, 1), (19, 20, 0), (20, 1, 1), (20, 21, 
> 0), (21, 22, 0), (21, 31, 1), (22, 23, 0), (23, 0, 0), (23, 24, 1), (24, 4, 
> 1), (24, 25, 0), (25, 26, 1), (25, 29, 0), (26, 7, 0), (26, 27, 1), (27, 1, 
> 1), (27, 28, 0), (28, 6, 1), (28, 19, 0), (29, 0, 0), (29, 30, 1), (30, 10, 
> 1), (30, 18, 0), (31, 2, 0), (31, 32, 1), (32, 2, 0), (32, 3, 1), (33, 2, 
> 0), (33, 17, 1), (34, 35, 1), (35, 1, 1), (35, 36, 0), (36, 16, 0), (36, 
> 26, 1), (37, 5, 0), (37, 11, 1)])
> sage: m = a.graph().adjacency_matrix()
> sage: e = m.eigenvalues()
> sage: l = [abs(el) for el in e]
> sage: l[19]==l[20] #doesn't terminate 
>
> Le dimanche 30 mars 2014 16:09:28 UTC+2, Paul Mercat a écrit :
>>
>> I think I know where is the problem.
>> I have tried to reimplemente the function max, and I've see that it 
>> doesn't terminate when there is a comparaison between two complex 
>> conjugates.
>>
>> The bug with max comes from a bug in the comparaison of two elements of 
>> QQbar : it should detect when two algebraic numbers are equals, but it 
>> doesn't and so it try to compute with more and more precision to see which 
>> one is greater, but it doesn't terminates because there are equals.
>>
>> Maybe I will try to fix this.
>>
>> Paul
>>
>> Le dimanche 30 mars 2014 16:00:14 UTC+2, Paul Mercat a écrit :
>>>
>>> If I do what you propose, it works.
>>> But I want the maximum of the list in QQbar, not in RR, and I don't 
>>> understand why the max function take all this time.
>>> And it also doesn't work with key=abs.
>>>
>>> Paul
>>>
>>> Le dimanche 30 mars 2014 15:49:45 UTC+2, John Cremona a écrit :

 m is an integer matrix and its eigenvalues (which are not all rel 
 anyway) are returned as algebraic numbers (try e[0].parent()). 

 Perhaps you want this: 
 sage: max([RR(ei) for ei in e if ei in RR]) 
 1.99801167774722 

 but note that only 22 of the 38 eigenvalues are real. 

 John 


 On 30 March 2014 14:32, Paul Mercat  wrote: 
 > The function max sometimes doesn't work in sage. 
 > Here is an example : 
 > 
 > sage: a = Automaton([(0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 2, 0), (2, 
 0, 0), 
 > (2, 3, 1), (3, 4, 1), (3, 7, 0), (4, 1, 1), (4, 5, 0), (5, 0, 0), (5, 
 6, 1), 
 > (6, 7, 0), (6, 37, 1), (7, 3, 1), (7, 8, 0), (8, 0, 0), (8, 9, 1), 
 (9, 2, 
 > 0), (9, 10, 1), (10, 2, 0), (10, 11, 1), (11, 2, 0), (11, 12, 1), 
 (12, 13, 
 > 0), (12, 34, 1), (13, 14, 0), (13, 24, 1), (14, 1, 1), (14, 15, 0), 
 (15, 16, 
 > 0), (15, 33, 1), (16, 0, 0), (16, 17, 1), (17, 1, 1), (17, 18, 0), 
 (18, 3, 
 > 1), (18, 19, 0), (19, 1, 1), (19, 20, 0), (20, 1, 1), (20, 21, 0), 
 (21, 22, 
 > 0), (21, 31, 1), (22, 23, 0), (23, 0, 0), (23, 24, 1), (24, 4, 1), 
 (24, 25, 
 > 0), (25, 26, 1), (25, 29, 0), (26, 7, 0), (26, 27, 1), (27, 1, 1), 
 (27, 28, 
 > 0), (28, 6, 1), (28, 19, 0), (29, 0, 0), (29, 30, 1), (30, 10, 1), 
 (30, 18, 
 > 0), (31, 2, 0), (31, 32, 1), (32, 2, 0), (32, 3, 1), (33, 2, 0), (33, 
 17, 
 > 1), (34, 35, 1), (35, 1, 1), (35, 36, 0), (36, 16, 0), (36, 26, 1), 
 (37, 5, 
 > 0), (37, 11, 1)]) 
 > sage: m = a.graph().adjacency_matrix() 
 > sage: e = m.eigenvalues() 
 > sage: print e 
 > sage: max(e) #doesn't terminate !!! 
 > 
 > Do you know why it doesn't work ? 
 > 
 > Paul 
 > 
 > -- 
 > You received this message because you are subscribed to the Google 
 Groups 
 > "sage-devel" group. 
 > To unsubscribe from this group and stop receiving emails from it, 
 send an 
 > email to sage-devel+...@googlegroups.com. 
 > To post to this group, send email to sage-...@googlegroups.com. 
 > Visit this group at http://groups.google.com/group/sage-devel. 
 > For more options, visit https://groups.google.com/d/optout. 

>>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+un

Re: [sage-devel] Bug with max

2014-03-30 Thread Paul Mercat
I can confirm that the error comes from the comparaison of two elements of 
QQbar, because the comparaison of absolutes values of two complexe 
conjugate doesn't work

sage: a = Automaton([(0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 2, 0), (2, 0, 0), 
(2, 3, 1), (3, 4, 1), (3, 7, 0), (4, 1, 1), (4, 5, 0), (5, 0, 0), (5, 6, 
1), (6, 7, 0), (6, 37, 1), (7, 3, 1), (7, 8, 0), (8, 0, 0), (8, 9, 1), (9, 
2, 0), (9, 10, 1), (10, 2, 0), (10, 11, 1), (11, 2, 0), (11, 12, 1), (12, 
13, 0), (12, 34, 1), (13, 14, 0), (13, 24, 1), (14, 1, 1), (14, 15, 0), 
(15, 16, 0), (15, 33, 1), (16, 0, 0), (16, 17, 1), (17, 1, 1), (17, 18, 0), 
(18, 3, 1), (18, 19, 0), (19, 1, 1), (19, 20, 0), (20, 1, 1), (20, 21, 0), 
(21, 22, 0), (21, 31, 1), (22, 23, 0), (23, 0, 0), (23, 24, 1), (24, 4, 1), 
(24, 25, 0), (25, 26, 1), (25, 29, 0), (26, 7, 0), (26, 27, 1), (27, 1, 1), 
(27, 28, 0), (28, 6, 1), (28, 19, 0), (29, 0, 0), (29, 30, 1), (30, 10, 1), 
(30, 18, 0), (31, 2, 0), (31, 32, 1), (32, 2, 0), (32, 3, 1), (33, 2, 0), 
(33, 17, 1), (34, 35, 1), (35, 1, 1), (35, 36, 0), (36, 16, 0), (36, 26, 
1), (37, 5, 0), (37, 11, 1)])
sage: m = a.graph().adjacency_matrix()
sage: e = m.eigenvalues()
sage: l = [abs(el) for el in e]
sage: l[19]==l[20] #doesn't terminate 

Le dimanche 30 mars 2014 16:09:28 UTC+2, Paul Mercat a écrit :
>
> I think I know where is the problem.
> I have tried to reimplemente the function max, and I've see that it 
> doesn't terminate when there is a comparaison between two complex 
> conjugates.
>
> The bug with max comes from a bug in the comparaison of two elements of 
> QQbar : it should detect when two algebraic numbers are equals, but it 
> doesn't and so it try to compute with more and more precision to see which 
> one is greater, but it doesn't terminates because there are equals.
>
> Maybe I will try to fix this.
>
> Paul
>
> Le dimanche 30 mars 2014 16:00:14 UTC+2, Paul Mercat a écrit :
>>
>> If I do what you propose, it works.
>> But I want the maximum of the list in QQbar, not in RR, and I don't 
>> understand why the max function take all this time.
>> And it also doesn't work with key=abs.
>>
>> Paul
>>
>> Le dimanche 30 mars 2014 15:49:45 UTC+2, John Cremona a écrit :
>>>
>>> m is an integer matrix and its eigenvalues (which are not all rel 
>>> anyway) are returned as algebraic numbers (try e[0].parent()). 
>>>
>>> Perhaps you want this: 
>>> sage: max([RR(ei) for ei in e if ei in RR]) 
>>> 1.99801167774722 
>>>
>>> but note that only 22 of the 38 eigenvalues are real. 
>>>
>>> John 
>>>
>>>
>>> On 30 March 2014 14:32, Paul Mercat  wrote: 
>>> > The function max sometimes doesn't work in sage. 
>>> > Here is an example : 
>>> > 
>>> > sage: a = Automaton([(0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 2, 0), (2, 
>>> 0, 0), 
>>> > (2, 3, 1), (3, 4, 1), (3, 7, 0), (4, 1, 1), (4, 5, 0), (5, 0, 0), (5, 
>>> 6, 1), 
>>> > (6, 7, 0), (6, 37, 1), (7, 3, 1), (7, 8, 0), (8, 0, 0), (8, 9, 1), (9, 
>>> 2, 
>>> > 0), (9, 10, 1), (10, 2, 0), (10, 11, 1), (11, 2, 0), (11, 12, 1), (12, 
>>> 13, 
>>> > 0), (12, 34, 1), (13, 14, 0), (13, 24, 1), (14, 1, 1), (14, 15, 0), 
>>> (15, 16, 
>>> > 0), (15, 33, 1), (16, 0, 0), (16, 17, 1), (17, 1, 1), (17, 18, 0), 
>>> (18, 3, 
>>> > 1), (18, 19, 0), (19, 1, 1), (19, 20, 0), (20, 1, 1), (20, 21, 0), 
>>> (21, 22, 
>>> > 0), (21, 31, 1), (22, 23, 0), (23, 0, 0), (23, 24, 1), (24, 4, 1), 
>>> (24, 25, 
>>> > 0), (25, 26, 1), (25, 29, 0), (26, 7, 0), (26, 27, 1), (27, 1, 1), 
>>> (27, 28, 
>>> > 0), (28, 6, 1), (28, 19, 0), (29, 0, 0), (29, 30, 1), (30, 10, 1), 
>>> (30, 18, 
>>> > 0), (31, 2, 0), (31, 32, 1), (32, 2, 0), (32, 3, 1), (33, 2, 0), (33, 
>>> 17, 
>>> > 1), (34, 35, 1), (35, 1, 1), (35, 36, 0), (36, 16, 0), (36, 26, 1), 
>>> (37, 5, 
>>> > 0), (37, 11, 1)]) 
>>> > sage: m = a.graph().adjacency_matrix() 
>>> > sage: e = m.eigenvalues() 
>>> > sage: print e 
>>> > sage: max(e) #doesn't terminate !!! 
>>> > 
>>> > Do you know why it doesn't work ? 
>>> > 
>>> > Paul 
>>> > 
>>> > -- 
>>> > You received this message because you are subscribed to the Google 
>>> Groups 
>>> > "sage-devel" group. 
>>> > To unsubscribe from this group and stop receiving emails from it, send 
>>> an 
>>> > email to sage-devel+...@googlegroups.com. 
>>> > To post to this group, send email to sage-...@googlegroups.com. 
>>> > Visit this group at http://groups.google.com/group/sage-devel. 
>>> > For more options, visit https://groups.google.com/d/optout. 
>>>
>>

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


Re: [sage-devel] Bug with max

2014-03-30 Thread Paul Mercat
I think I know where is the problem.
I have tried to reimplemente the function max, and I've see that it doesn't 
terminate when there is a comparaison between two complex conjugates.

The bug with max comes from a bug in the comparaison of two elements of 
QQbar : it should detect when two algebraic numbers are equals, but it 
doesn't and so it try to compute with more and more precision to see which 
one is greater, but it doesn't terminates because there are equals.

Maybe I will try to fix this.

Paul

Le dimanche 30 mars 2014 16:00:14 UTC+2, Paul Mercat a écrit :
>
> If I do what you propose, it works.
> But I want the maximum of the list in QQbar, not in RR, and I don't 
> understand why the max function take all this time.
> And it also doesn't work with key=abs.
>
> Paul
>
> Le dimanche 30 mars 2014 15:49:45 UTC+2, John Cremona a écrit :
>>
>> m is an integer matrix and its eigenvalues (which are not all rel 
>> anyway) are returned as algebraic numbers (try e[0].parent()). 
>>
>> Perhaps you want this: 
>> sage: max([RR(ei) for ei in e if ei in RR]) 
>> 1.99801167774722 
>>
>> but note that only 22 of the 38 eigenvalues are real. 
>>
>> John 
>>
>>
>> On 30 March 2014 14:32, Paul Mercat  wrote: 
>> > The function max sometimes doesn't work in sage. 
>> > Here is an example : 
>> > 
>> > sage: a = Automaton([(0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 2, 0), (2, 0, 
>> 0), 
>> > (2, 3, 1), (3, 4, 1), (3, 7, 0), (4, 1, 1), (4, 5, 0), (5, 0, 0), (5, 
>> 6, 1), 
>> > (6, 7, 0), (6, 37, 1), (7, 3, 1), (7, 8, 0), (8, 0, 0), (8, 9, 1), (9, 
>> 2, 
>> > 0), (9, 10, 1), (10, 2, 0), (10, 11, 1), (11, 2, 0), (11, 12, 1), (12, 
>> 13, 
>> > 0), (12, 34, 1), (13, 14, 0), (13, 24, 1), (14, 1, 1), (14, 15, 0), 
>> (15, 16, 
>> > 0), (15, 33, 1), (16, 0, 0), (16, 17, 1), (17, 1, 1), (17, 18, 0), (18, 
>> 3, 
>> > 1), (18, 19, 0), (19, 1, 1), (19, 20, 0), (20, 1, 1), (20, 21, 0), (21, 
>> 22, 
>> > 0), (21, 31, 1), (22, 23, 0), (23, 0, 0), (23, 24, 1), (24, 4, 1), (24, 
>> 25, 
>> > 0), (25, 26, 1), (25, 29, 0), (26, 7, 0), (26, 27, 1), (27, 1, 1), (27, 
>> 28, 
>> > 0), (28, 6, 1), (28, 19, 0), (29, 0, 0), (29, 30, 1), (30, 10, 1), (30, 
>> 18, 
>> > 0), (31, 2, 0), (31, 32, 1), (32, 2, 0), (32, 3, 1), (33, 2, 0), (33, 
>> 17, 
>> > 1), (34, 35, 1), (35, 1, 1), (35, 36, 0), (36, 16, 0), (36, 26, 1), 
>> (37, 5, 
>> > 0), (37, 11, 1)]) 
>> > sage: m = a.graph().adjacency_matrix() 
>> > sage: e = m.eigenvalues() 
>> > sage: print e 
>> > sage: max(e) #doesn't terminate !!! 
>> > 
>> > Do you know why it doesn't work ? 
>> > 
>> > Paul 
>> > 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> Groups 
>> > "sage-devel" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an 
>> > email to sage-devel+...@googlegroups.com. 
>> > To post to this group, send email to sage-...@googlegroups.com. 
>> > Visit this group at http://groups.google.com/group/sage-devel. 
>> > For more options, visit https://groups.google.com/d/optout. 
>>
>

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


Re: [sage-devel] Bug with max

2014-03-30 Thread Paul Mercat
If I do what you propose, it works.
But I want the maximum of the list in QQbar, not in RR, and I don't 
understand why the max function take all this time.
And it also doesn't work with key=abs.

Paul

Le dimanche 30 mars 2014 15:49:45 UTC+2, John Cremona a écrit :
>
> m is an integer matrix and its eigenvalues (which are not all rel 
> anyway) are returned as algebraic numbers (try e[0].parent()). 
>
> Perhaps you want this: 
> sage: max([RR(ei) for ei in e if ei in RR]) 
> 1.99801167774722 
>
> but note that only 22 of the 38 eigenvalues are real. 
>
> John 
>
>
> On 30 March 2014 14:32, Paul Mercat > 
> wrote: 
> > The function max sometimes doesn't work in sage. 
> > Here is an example : 
> > 
> > sage: a = Automaton([(0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 2, 0), (2, 0, 
> 0), 
> > (2, 3, 1), (3, 4, 1), (3, 7, 0), (4, 1, 1), (4, 5, 0), (5, 0, 0), (5, 6, 
> 1), 
> > (6, 7, 0), (6, 37, 1), (7, 3, 1), (7, 8, 0), (8, 0, 0), (8, 9, 1), (9, 
> 2, 
> > 0), (9, 10, 1), (10, 2, 0), (10, 11, 1), (11, 2, 0), (11, 12, 1), (12, 
> 13, 
> > 0), (12, 34, 1), (13, 14, 0), (13, 24, 1), (14, 1, 1), (14, 15, 0), (15, 
> 16, 
> > 0), (15, 33, 1), (16, 0, 0), (16, 17, 1), (17, 1, 1), (17, 18, 0), (18, 
> 3, 
> > 1), (18, 19, 0), (19, 1, 1), (19, 20, 0), (20, 1, 1), (20, 21, 0), (21, 
> 22, 
> > 0), (21, 31, 1), (22, 23, 0), (23, 0, 0), (23, 24, 1), (24, 4, 1), (24, 
> 25, 
> > 0), (25, 26, 1), (25, 29, 0), (26, 7, 0), (26, 27, 1), (27, 1, 1), (27, 
> 28, 
> > 0), (28, 6, 1), (28, 19, 0), (29, 0, 0), (29, 30, 1), (30, 10, 1), (30, 
> 18, 
> > 0), (31, 2, 0), (31, 32, 1), (32, 2, 0), (32, 3, 1), (33, 2, 0), (33, 
> 17, 
> > 1), (34, 35, 1), (35, 1, 1), (35, 36, 0), (36, 16, 0), (36, 26, 1), (37, 
> 5, 
> > 0), (37, 11, 1)]) 
> > sage: m = a.graph().adjacency_matrix() 
> > sage: e = m.eigenvalues() 
> > sage: print e 
> > sage: max(e) #doesn't terminate !!! 
> > 
> > Do you know why it doesn't work ? 
> > 
> > Paul 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "sage-devel" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to sage-devel+...@googlegroups.com . 
> > To post to this group, send email to 
> > sage-...@googlegroups.com. 
>
> > Visit this group at http://groups.google.com/group/sage-devel. 
> > For more options, visit https://groups.google.com/d/optout. 
>

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


Re: [sage-devel] Bug with max

2014-03-30 Thread John Cremona
m is an integer matrix and its eigenvalues (which are not all rel
anyway) are returned as algebraic numbers (try e[0].parent()).

Perhaps you want this:
sage: max([RR(ei) for ei in e if ei in RR])
1.99801167774722

but note that only 22 of the 38 eigenvalues are real.

John


On 30 March 2014 14:32, Paul Mercat  wrote:
> The function max sometimes doesn't work in sage.
> Here is an example :
>
> sage: a = Automaton([(0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 2, 0), (2, 0, 0),
> (2, 3, 1), (3, 4, 1), (3, 7, 0), (4, 1, 1), (4, 5, 0), (5, 0, 0), (5, 6, 1),
> (6, 7, 0), (6, 37, 1), (7, 3, 1), (7, 8, 0), (8, 0, 0), (8, 9, 1), (9, 2,
> 0), (9, 10, 1), (10, 2, 0), (10, 11, 1), (11, 2, 0), (11, 12, 1), (12, 13,
> 0), (12, 34, 1), (13, 14, 0), (13, 24, 1), (14, 1, 1), (14, 15, 0), (15, 16,
> 0), (15, 33, 1), (16, 0, 0), (16, 17, 1), (17, 1, 1), (17, 18, 0), (18, 3,
> 1), (18, 19, 0), (19, 1, 1), (19, 20, 0), (20, 1, 1), (20, 21, 0), (21, 22,
> 0), (21, 31, 1), (22, 23, 0), (23, 0, 0), (23, 24, 1), (24, 4, 1), (24, 25,
> 0), (25, 26, 1), (25, 29, 0), (26, 7, 0), (26, 27, 1), (27, 1, 1), (27, 28,
> 0), (28, 6, 1), (28, 19, 0), (29, 0, 0), (29, 30, 1), (30, 10, 1), (30, 18,
> 0), (31, 2, 0), (31, 32, 1), (32, 2, 0), (32, 3, 1), (33, 2, 0), (33, 17,
> 1), (34, 35, 1), (35, 1, 1), (35, 36, 0), (36, 16, 0), (36, 26, 1), (37, 5,
> 0), (37, 11, 1)])
> sage: m = a.graph().adjacency_matrix()
> sage: e = m.eigenvalues()
> sage: print e
> sage: max(e) #doesn't terminate !!!
>
> Do you know why it doesn't work ?
>
> Paul
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

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


[sage-devel] Bug with max

2014-03-30 Thread Paul Mercat
The function max sometimes doesn't work in sage.
Here is an example :

sage: a = Automaton([(0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 2, 0), (2, 0, 0), 
(2, 3, 1), (3, 4, 1), (3, 7, 0), (4, 1, 1), (4, 5, 0), (5, 0, 0), (5, 6, 
1), (6, 7, 0), (6, 37, 1), (7, 3, 1), (7, 8, 0), (8, 0, 0), (8, 9, 1), (9, 
2, 0), (9, 10, 1), (10, 2, 0), (10, 11, 1), (11, 2, 0), (11, 12, 1), (12, 
13, 0), (12, 34, 1), (13, 14, 0), (13, 24, 1), (14, 1, 1), (14, 15, 0), 
(15, 16, 0), (15, 33, 1), (16, 0, 0), (16, 17, 1), (17, 1, 1), (17, 18, 0), 
(18, 3, 1), (18, 19, 0), (19, 1, 1), (19, 20, 0), (20, 1, 1), (20, 21, 0), 
(21, 22, 0), (21, 31, 1), (22, 23, 0), (23, 0, 0), (23, 24, 1), (24, 4, 1), 
(24, 25, 0), (25, 26, 1), (25, 29, 0), (26, 7, 0), (26, 27, 1), (27, 1, 1), 
(27, 28, 0), (28, 6, 1), (28, 19, 0), (29, 0, 0), (29, 30, 1), (30, 10, 1), 
(30, 18, 0), (31, 2, 0), (31, 32, 1), (32, 2, 0), (32, 3, 1), (33, 2, 0), 
(33, 17, 1), (34, 35, 1), (35, 1, 1), (35, 36, 0), (36, 16, 0), (36, 26, 
1), (37, 5, 0), (37, 11, 1)])
sage: m = a.graph().adjacency_matrix()
sage: e = m.eigenvalues()
sage: print e
sage: max(e) #doesn't terminate !!!

Do you know why it doesn't work ?

Paul

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


[sage-devel] Re: sage-6.1.1 on Solaris 11.1SPARC - problem workarounds

2014-03-30 Thread Jean-Pierre Flori
Hi,

On Thursday, March 27, 2014 5:51:29 PM UTC+1, Rob McMahon wrote:
>
> I've worked around the problems, but I thought I should report them 
> here. I just tried building sage 6.1.1 on a new (to me ...) SPARC (T4-2) 
> box 
>
> $ cat /etc/release 
> Oracle Solaris 11.1 SPARC 
> Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights 
> reserved. 
> Assembled 06 November 2013 
>
> The first make 
>
> $ env MAKE='gmake -j32' gmake 
>
> checking whether to enable maintainer-specific portions of Makefiles... 
> yes 
> configure: WARNING: you should use --build, --host, --target 
> configure: WARNING: you should use --build, --host, --target 
> configure: error: unrecognized option: `-j32' 
> Try `./configure --help' for more information 
> If you would like to try to build Sage anyway (to help porting), 
> export the variable 'SAGE_PORT' to something non-empty. 
>
> Worked around with 
>
> $ env SAGE_PORT='x' MAKE='gmake -j32' gmake 
>
> The build failed at libfplll-4.0.4, which failed with complaints 
>
> libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. 
> -I/home/cudcv/sage-6.1.1/local/include/ -fPIC 
> -I/home/cudcv/sage-6.1.1/local/include/ 
> -L/home/cudcv/sage-6.1.1/local/lib -MT fplll.lo 
> -MD -MP -MF .deps/fplll.Tpo -c fplll.cpp -fPIC -DPIC -o .libs/fplll.o 
> In file included from nr.h:430:0, 
> from numvect.h:19, 
> from matrix.h:21, 
> from wrapper.h:21, 
> from fplll.cpp:18: 
> nr.cpp: In member function ‘int fplll::FP_NR::is_finite() const [with 
> F = double]’: 
> nr.cpp:868:23: error: ‘isfinite’ was not declared in this scope 
> nr.cpp: In member function ‘int fplll::FP_NR::is_finite() const [with 
> F = long double]’: 
> nr.cpp:1078:23: error: ‘isfinite’ was not declared in this scope 
> nr.cpp: In member function ‘int fplll::FP_NR::is_finite() const [with 
> F = dpe_struct [1]]’: 
> nr.cpp:1278:33: error: ‘isfinite’ was not declared in this scope 
> ... 
> libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. 
> -I/home/cudcv/sage-6.1.1/local/include/ -fPIC 
> -I/home/cudcv/sage-6.1.1/local/include/ 
> -L/home/cudcv/sage-6.1.1/local/lib -MT topenum.l 
> o -MD -MP -MF .deps/topenum.Tpo -c topenum.cpp -fPIC -DPIC -o 
> .libs/topenum.o 
> In file included from nr.h:430:0, 
> from numvect.h:19, 
> from matrix.h:21, 
> from util.h:23, 
> from util.cpp:16: 
> nr.cpp: In member function ‘int fplll::FP_NR::is_finite() const [with 
> F = double]’: 
> nr.cpp:868:23: error: ‘isfinite’ was not declared in this scope 
> nr.cpp: In member function ‘int fplll::FP_NR::is_finite() const [with 
> F = long double]’: 
> nr.cpp:1078:23: error: ‘isfinite’ was not declared in this scope 
> nr.cpp: In member function ‘int fplll::FP_NR::is_finite() const [with 
> F = dpe_struct [1]]’: 
> nr.cpp:1278:33: error: ‘isfinite’ was not declared in this scope 
> gmake[5]: *** [fplll.lo] Error 1 
> gmake[5]: *** Waiting for unfinished jobs 
> gmake[5]: *** [util.lo] Error 1 
> In file included from nr.h:430:0, 
> from numvect.h:19, 
> from matrix.h:21, 
> from util.h:23, 
> from topenum.h:19, 
> from topenum.cpp:16: 
> nr.cpp: In member function ‘int fplll::FP_NR::is_finite() const [with 
> F = double]’: 
> nr.cpp:868:23: error: ‘isfinite’ was not declared in this scope 
> nr.cpp: In member function ‘int fplll::FP_NR::is_finite() const [with 
> F = long double]’: 
> nr.cpp:1078:23: error: ‘isfinite’ was not declared in this scope 
> nr.cpp: In member function ‘int fplll::FP_NR::is_finite() const [with 
> F = dpe_struct [1]]’: 
> nr.cpp:1278:33: error: ‘isfinite’ was not declared in this scope 
> gmake[5]: *** [topenum.lo] Error 1 
> gmake[5]: Leaving directory 
> `/home/cudcv/sage-6.1.1/local/var/tmp/sage/build/libfplll-4.0.4/src/src' 
> gmake[4]: *** [all-recursive] Error 1 
> gmake[4]: Leaving directory 
> `/home/cudcv/sage-6.1.1/local/var/tmp/sage/build/libfplll-4.0.4/src' 
> gmake[3]: *** [all] Error 2 
> gmake[3]: Leaving directory 
> `/home/cudcv/sage-6.1.1/local/var/tmp/sage/build/libfplll-4.0.4/src' 
> Error building libfplll 
>
> A quick google search suggested compiling with 
>
> $ env SAGE_PORT='x' CXX='g++ -D_GLIBCXX_USE_C99_MATH' MAKE='gmake -j32' 
> gmake 
>
> which got past that problem. The build then aborted, the install log


Great!
Would you mind oening a ticket on Sage's trac?
Or even forward this upstream (possibly with a clena autotools patch)?
Upstream (Damien Stehlé) has been more than reactive in the past to include 
fixes we needed for not so mainstream archs. 

>
> ending in: 
>
> Finished installing atlas-3.10.1.p7.spkg 
> gmake[2]: Leaving directory `/home/cudcv/sage-6.1.1/build' 
> gmake[1]: *** [all] Error 2 
> gmake[1]: Leaving directory `/home/cudcv/sage-6.1.1/build' 
>
> real 33m35.011s 
> user 361m10.877s 
> sys 23m39.620s 
> *** 
> Error building Sage. 
>
> The following package(s) may have failed to build: 
>
> The build directory may contain configuration files and other potentially 
> helpful information. WARNING: if you

[sage-devel] Passing command line options to python via "./sage"

2014-03-30 Thread Wilfried Lübbe
While working on http://trac.sagemath.org/ticket/15995 I am trying to use 
Python command line options (like -3, -Q or -W) to trigger division 
warnings.

This should give helpful hits:
python -3 test-python3-warnings.py 
*test**-python3-warnings.py:1: DeprecationWarning: classic int** division*
  print "4 / 3   ==", 4 / 3
4 / 3   == 1
4. / 3  == 1.333
4 // 3  == 1

But
~/sage-6.2.beta4$ ./sage -3 -t -p --all --long --logfile=logs/ptestlong-warn
-3.log

does not work: 
sage-run received unknown option: -3 
usage: sage [options]
Try 'sage -h' for more information.

Is there a "standard" way?
Or where should I patch a Sage script?
Or how use environment variable PYTHONWARNINGS?



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