Reputation
66,368
Next tag badge:
209/100 score
19/20 answers
Badges
6 195 286
Newest
 Nice Answer
Impact
~420k people reached

Feb
18
comment 3N-dimensional integral
You don't need Mathematica to compute this. Switch to the generalized spherical coordinates and integrate over r and the angles. This is exmplained in many texts on Quantum Field Theory, look up dimensional regularization.
Feb
18
comment Why does memory run out when adding same-sized matrices in a loop?
It is hard to say without seeing your funct1 and funct2. One possible guess is that some of these functions unpack (returned not packed, but unpacked array) - unpacked arrays can take up much more memory. It could also be that the huge memory consumption happens inside those functions.
Feb
18
revised Is the sharing of variables in Module/Block within Compile documented behavior?
Added a note on callbacks
Feb
18
comment Is the sharing of variables in Module/Block within Compile documented behavior?
@Mr.Wizard The difference is because there is a call to MainEvaluate, and Block in this case is considered a part of that call, since that call is the top-level code. In my answer, I implied the fully compiled code. I will add a sentence to mention this, thanks.
Feb
18
answered Is it safe to assign a variable and function of the same name for different things?
Feb
18
answered Is the sharing of variables in Module/Block within Compile documented behavior?
Feb
17
comment Creation of name.m Package
Somewhat related.
Feb
17
comment Patternmatching sets
Looks like I won't have time to look at this today, but I will surely do as soon as I have time, and +1 in advance :)
Feb
17
awarded  Enlightened
Feb
17
awarded  Nice Answer
Feb
16
comment Patternmatching sets
@Rojo Have a look at my update. It is pretty ugly, and I have a hunch that I am missing something very simple, but posted nonetheless.
Feb
16
comment Patternmatching sets
@IstvánZachar I added an ugly first version of a pattern translator. I am sure that I am missing something simple here, but can't think clearly any more today, so posted as is.
Feb
16
revised Patternmatching sets
Added a current ugly version of the pattern translator
Feb
16
comment Patternmatching sets
@IstvánZachar Yes, sure. It is just that it makes it harder to write an automatic pattern converter.But I am on my way ...
Feb
16
comment Patternmatching sets
@IstvánZachar I am still into it. I still want to write an automatic translator of patterns. As to your current setup, I think it is probably ok, if we interpret Not as not for all elements (so, !2 means "there is no single 2 among the elements"), but certain things are currently impossible to express. For example, I may wish all subsets where there is at least one element which is not 2 (but I don't require all of them to be not 2).
Feb
16
comment Patternmatching sets
@IstvánZachar I analyzed the current setup and came to a conclusion that your pattern language is ambiguous because it is underspecified. What you need is to introduce two new quantors: exists and for all. Then, your logical operators such as Not or Identity will be applied to these. Then, there will be no ambiguities left.
Feb
16
comment Patternmatching sets
Actually, @IstvánZachar, there are some ambiguities in the patterns. For example, what do you mean by "And" (&&)? I currently interpret 1 && 2 as a requirement that at both 1 and 2 should be present in the subset at least once - but this is obviously not how you interpret it (otherwise the pattern !1 && !2 && !3 && !4 should match all the subsets). Also, can you explain e.g. what is the meaning of 1 && 2 && 3? Again, I currently interpret this as a requirement that the subset should have all these elements, but from your results, this is obviously not how you interpret this.
Feb
16
comment Patternmatching sets
@IstvánZachar Actually, I changed my mind after reading the question more carefully, for more complex patterns of the type you ask for we may benefit from something else than Complement and Intersection - such as pattern-matcher. Working on an automatic translator from your patterns to the ones I use here...
Feb
16
answered Patternmatching sets
Feb
16
comment Is it possible to use Compile on a function with optional arguments?
@OleksandrR. Well, that's reassuring :)