[sage-devel] Re: Bug in a "simple" integration

2017-06-03 Thread mforets
Sage has `max_symbolic`: sage: var('x0, x1, x2'); sage: integrate(integrate(integrate(1,x2,max_symbolic(x0,x1),1),x1,0,1),x0,0,1) 1/3 .. i'm pretty sure Nils meant: symb_max(x,y)=(x+y)/2+abs(x-y)/2 which gives the same result: sage: integrate(integrate(integrate(1,x2,symb_max(x0,x1),1),x1,0,1)

[sage-devel] Re: Bug in a "simple" integration

2017-06-03 Thread Nils Bruin
On Saturday, June 3, 2017 at 10:07:03 AM UTC-7, Ognjen Dragoljevic wrote: > > The following integral should be 1/3 but Sage gives 1/2. > integrate(integrate(integrate(1,x2,max(x0,x1),1),x1,0,1),x0,0,1) > > It seems that Sage immediately evaluates max(x0,x1) to x0 which is > incorrect. > "max" hasn

[sage-devel] Bug in a "simple" integration

2017-06-03 Thread Ognjen Dragoljevic
The following integral should be 1/3 but Sage gives 1/2. integrate(integrate(integrate(1,x2,max(x0,x1),1),x1,0,1),x0,0,1) It seems that Sage immediately evaluates max(x0,x1) to x0 which is incorrect. -- You received this message because you are subscribed to the Google Groups "sage-devel" grou

Re: [sage-devel] escape bug in sparse6 output

2017-06-03 Thread Vincent Delecroix
It is not a bug. Python displays \ as \\ sage: '\\' '\\' sage: len('\\') 1 What is wrong is that you should not copy paste this string to another software but instead do sage: print G.sparse6_string() :~?@M_GEA_w?C`WGEaOOGaWWI_OmGBGKL`w}OcXINCxQGCPUWCp]WdPeOEh[Zc`q^Fh}_gXwagyAfGaYfhAa^IYEgIyq