Hi, Thank you all for your reply.
@leif ************************************************************** Also, you should probably be aware of the facts that a^(n+1) = a^n * a factorial(n+1) = factorial(n) * (n+1) ***************************************************************** I know it from high school but how can I use it in my code? I not a good programmer. Just started to work on Sage 2 months ago. Still don't know may things to improve my programming. And thanks, i have removed those 'if' conditions from my code. ...... Assad On Wednesday, 12 June 2013 01:30:36 UTC+9:30, Jim wrote: > > Since you are writing your own algorithms in python, I suggest you > investigate cython: > http://docs.cython.org > to compile your python into machine code, instead of python's > quasi-compiled byte code. > Cython is included with sage -- just add the code %cython as the first > line of a Sage worksheet cell. > Alternatively, put you Sage code into a file with the extension .spyx, > then load the file from the Sage command line. > > There are a couple of Sage-isms that won't work in cython, for example, > you must replace e^{whatever} with e**{whatever}. > > Also, as others have pointed out, you might analyze your code a bit to > calculate the number of operations you want to perform. > You can easily reach a point that would require the fastest computer on > earth hundreds, thousand, millions,... of years to compute. > > Jim Clark > > > Thanks for your reply. Actually I have exponential function f(u) in > 8-dimensions and I am using the general formula for Taylor series at > available at http://en.wikipedia.org/wiki/Taylor_series (Taylor series in > several variables). I want to expand summations in this equations for up to > 6 or even more as I am using this expansion to calculate the bit error rate > for the E8 lattice. The exponential function f(u) is of the following form. > > $$ f(u) = e^{(-(3.15987540437407e-36)*(99446621081482098*u1 + > 99446621081482098*u2 + 99446621081482098*u3 + 49723310540741049*u4 + > 99446621081482098*u5 + 165744368469136820*u6 + 198893242162964181*u7 > +298339863244446264)^2 - (3.15987540437407e-38)*(1790039179466677674*u1 - > 2983398632444462490*u2 - 2983398632444462490*u3 - 1491699316222231245*u4 - > 2983398632444462490*u5 - 2320421158567915270*u6 - 1988932421629641660*u7 - > 994466210814820830)^2 - (3.15987540437407e-38)*(1790039179466677674*u1 + > 2983398632444462715*u2 + 2320421158567915470*u3 - 1491699316222231245*u4 - > 2983398632444462490*u5 - 2320421158567915270*u6 + 1988932421629641810*u7 - > 994466210814820830)^2 - (3.15987540437407e-38)*(1790039179466677674*u1 + > 2983398632444462715*u2 + 2320421158567915470*u3 - 1491699316222231245*u4 + > 4972331054074104450*u5 - 2320421158567915270*u6 + 1988932421629641810*u7 - > 994466210814820830)^2 - (3.15987540437407e-38)*(1790039179466677674*u1 + > 2983398632444462715*u2 + 2320421158567915470*u3 + 4475097948666693960*u4 + > 4972331054074104450*u5 + 5635308527950651670*u6 + 1988932421629641810*u7 - > 994466210814820830)^2 - (3.15987540437407e-38)*(1790039179466677674*u1 + > 2983398632444462715*u2 + 4972331054074104450*u3 + 4475097948666693960*u4 + > 4972331054074104450*u5 + 5635308527950651670*u6 + 1988932421629641810*u7 - > 994466210814820830)^2 - (3.15987540437407e-36)*(99446621081482098*u1 + > 99446621081482098*u2 + 99446621081482098*u3 + 49723310540741049*u4 + > 99446621081482098*u5 + 165744368469136820*u6 - 198893242162964166*u7 - > 397786484325928347*u8 + 298339863244446264)^2 - > (3.15987540437407e-36)*(99446621081482098*u1 + 99446621081482098*u2 + > 99446621081482098*u3 + 49723310540741049*u4 + 99446621081482098*u5 + > 165744368469136820*u6 + 198893242162964181*u7 + 397786484325928347*u8 + > 298339863244446264)^2)}$$ > > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.