[sympy] Re: Clebsch–Gordan coefficients

2010-09-23 Thread klmn
ok, it works now... Aaron, thanks for the hint! Konstantin -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sy...@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com.

[sympy] Re: Clebsch–Gordan coefficients

2010-09-23 Thread klmn
Dear all, I have created a module `gaunt_tables` for calculating, storing, retrieving and testing the Gaunt coefficients. The module uses `sympy` for calculations and `pyTables` for efficient handling of large amounts of data. Three various indexing schemes are implemented for storing/retrieval.

[sympy] Re: memory error

2010-09-03 Thread klmn
Wow, what a fast and exact answer! clear_cache does the job. Thank you Øyvind! > What do you mean by "force garbage collection"?   gc.collect() Regards, Konstantin -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to s

[sympy] memory error

2010-09-03 Thread klmn
Dear all, I am trying to implement various schemes for storing Gaunt coefficients (integrals of 3 spherical harmonics) calculated symbolically. Ondrej, I remember you offered me help for this, now I have to ask for it. It appears that at moderately big indices, already at l_max~30, the memory is

[sympy] Serialization of sympy results

2010-08-06 Thread klmn
Hi all, I am trying to implement two storage schemes for Gaunt coefficients (integrals of 3 spherical harmonics) calculated by sympy. Each result, if not 0, is represented by 3 arbitrarily long integers: numerator, denominator and the one under sqrt. For L as big as 100, I have ~100^4 non-zero va

[sympy] Re: cancellation in sqrt(a * x**2) / (b * x), with x being a NUMBER

2010-07-30 Thread klmn
The Aaron's suggestion:... >Also, I see the limit option to factorint. I think we should use that instead >of a raw numerical >limit so that we always get the small factors, and only don't try finding the >big ones. ... is great. This would solve the 1st example in my 1st message (above). > So

[sympy] Re: cancellation in sqrt(a * x**2) / (b * x), with x being a NUMBER

2010-07-28 Thread klmn
> Wait a minute. What happens if you don't call simplify in mathematica? Then I get a decimal number instead of symbolic fraction and sqrt. -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sy...@googlegroups.com. To

[sympy] Re: cancellation in sqrt(a * x**2) / (b * x), with x being a NUMBER

2010-07-28 Thread klmn
> Yes, just apply the sqrt to each of them separately. Sorry, I don't understand this. Let me reformulate the question. I have a big number which was calculated by several multiplications. I want to take sqrt and divide by another number (factorization of this one is unknown). Then I want to simpli

[sympy] Re: Clebsch–Gordan coefficients

2010-07-28 Thread klmn
Dear all, I need Gaunt coefficients (see the neighboring thread) and I have also started from the code wigner.py. Although Jens cites his paper there, he doesn’t use it. The paper is about storing the coefficients (and this is not implemented) and the calculation itself follows another paper. Aft

[sympy] Re: cancellation in sqrt(a * x**2) / (b * x), with x being a NUMBER

2010-07-28 Thread klmn
Ondrej and all, Here comes another related question. My big numbers under sqrt() in the numerator are calculated as products of several factorials. So these numbers ARE ALREADY factored. I calculate them symbolically. Is it possible to retain this factorization for subsequent simplification? Reg

[sympy] Re: cancellation in sqrt(a * x**2) / (b * x), with x being a NUMBER

2010-07-28 Thread klmn
Aaron, your explanations sound reasonable BUT following the Ondrej's suggestion I've tried the case in Mathematica and !!!immediately!!! got these results: __ >>> Simplify >>> (7503204762339254285241591792888384061440^(1/2)/61484614929830589235200) : 91(

[sympy] cancellation in sqrt(a * x**2) / (b * x), with x being a NUMBER

2010-07-27 Thread klmn
Dear all, I am trying to calculate Gaunt coefficients (integrals of 3 spherical harmonics) for subsequent storing and have problems with simplifying the results. 1) Consider a simple example. A relatively short ratio does simplify (10 is cancelled): >>> sympy.Rational(1,30)*sympy.sqrt(100100)

[sympy] Re: dealing with small parameters

2009-10-13 Thread klmn
> Do you have some particular way how to do that in QM? No, I don't have it implemented for symbolic calculations. > maybe you can help with it too. :) Not very much, only as a tester... --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[sympy] dealing with small parameters

2009-10-11 Thread klmn
0) I have recently discovered Sympy to myself and am pleased using it. It is already rich with many interesting capabilities. Thanks a lot for it! 1) I am trying to solve symbolically an eigen-problem depending on a small parameter. For my 2x2 matrix this takes couple of hours. For a 3x3 matrix t