Hi, Here is a short example to replicate the first error mentioned below:
b = [var('b_%s'%i) for i in range(4)] precomp = (2^b_2 + 2)*(2^b_1 + 2^(-b_1) + 2^b_1*2^b_0 - 2^b_1*2^(-b_0) - 2^(-b_1)*2^b_0 - 2^(-b_1)*2^(-b_0) + 2^b_0 + 2^(-b_0) - 9) + (2^b_1 + 2^(-b_1) + 2^b_1*2^b_0 - 2^b_1*2^(-b_0) - 2^(-b_1)*2^b_0 - 2^(-b_1)*2^(-b_0) + 2^b_0 + 2^(-b_0) - 9)/2^b_2 repl_dict = {b_0: b_0, b_3: b_1, b_2: b_3, b_1: b_2} P = precomp.substitute(repl_dict) P.expand() I will take a break now. I'd appreciate any help tracking down the problem (in pynac) if anybody has the time. Cheers, Burcin On Wed, 1 Sep 2010 08:25:07 -0700 (PDT) Jean-Pierre Flori <jpfl...@gmail.com> wrote: > Hello, > > I'm using Sage to do some symbolic computations. > What I am basically trying to do is to compute sums made of terms of > the form : > cst_{i_0,...,i_d)*b_0^{i_0}*...*b_d^{i_d}*2^{-b_0-...-b_d} > where the b_i are variables > (i.e. a product of an exponential with b_i in the exponent by a > multivariate polynomial in b_i) > using functions (especially symbolic_sum) from sage.calculus.calculus. > I am regularly calling expand() and simplify() functions as well as > some custom functions using substitute() to get a more compact > expression and avoid redundant terms. > Everything works fine as long as the sums are not too "complicated", > but Sage segfaults when they become too big. > Running Sage with the -gdb flag, gives different errors according to > which of my functions I am calling, but both errors seem to be related > to a "compare" function in Pynac (SIGSEGV or SIGBUS): > > First error message : > Program received signal SIGSEGV, Segmentation fault. > GiNaC::power::compare (this=0x3281c20, other=...) at power.cpp:899 > 899 power.cpp: Aucun fichier ou dossier de ce type. > in power.cpp > > Second error message : > Program received signal SIGBUS, Bus error. > GiNaC::mul::compare (this=0x83490e0, other=...) at mul.cpp:1174 > 1174 mul.cpp: Aucun fichier ou dossier de ce type. > in mul.cpp > > > My box is running a Debian unstable with packages from the > experimental repository. > My kernel version is 2.6.35, compiled by myself. > My cpu is a Intel(R) Core(TM)2 Quad CPU Q6600. > The error is happening with Sage 4.5.2 and 4.4.4. > I compiled both of them myself with gcc (Debian 4.4.4-11) 4.4.5 > 20100824 (prerelease). > I also tried the precompiled sage-4.5.2-linux-64bit-ubuntu_10.04_lts- > x86_64-Linux which gives me the same result. > > I didn't manage to reproduce the bug with a short and simple piece of > code. > However I can mail the source code and instructions to reproduce the > bug to anyone who can help. > I will also provide any information needed to investigate this > problem. > I am currently trying to compile Sage on another box to do another > test. > Any help will be appreciated, and thanks for a such a great piece of > software. > > Best regards, > > Jean-Pierre Flori > -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org