9,531 reputation
1642
bio website
location
age
visits member for 2 years, 7 months
seen 12 hours ago

Jan
25
comment Why is Mathematica's expansion of expressions with square roots so slow?
@jVincent: actually I don't care what we call it, fact is that the most straightforward input does in this case perform very poor, and for some reason maple handles that case better internally. It could of course have deeper reasons that Mathematica does the expansion the way it does and even considered to be a feature, e.g. to avoid accumulation of numeric errors -- but whatever these reasons are they don't matter for this case which thus could be improved. By the way, I think the precedence of // and & is still not correct in your answer (sometimes FullForm has its advantages :-)
Jan
25
comment Why is Mathematica's expansion of expressions with square roots so slow?
As the OP has stated maple is also doing this symbolically and still is much faster than Mathematica. It is a well known fact that each of these systems has its strengths and weaknesses. I think it would fit this site well if we try to avoid the impression that users with high reputation like you are not willing to see the weaknesses that Mathematica unavoidably has in some areas. As jVincent has shown there is a workaround which makes Mathematica almost as fast as maple for this particular case...
Jan
25
comment Why is Mathematica's expansion of expressions with square roots so slow?
@jVincent: Your workaround hits the point and actually seems to work very well. But you have some errors there which you might want to correct, it should rather be Nest[Expand[#*term] &, term, 100 - 1]. Then the results can be checked to be the same (I only checked for 50, not 100).
Jan
25
answered Does the operating system matter when using Encode[]?
Jan
23
comment DeleteDuplicates not deleting duplicates
@DanielLichtblau: sorry, I didn't get that last one. What I wanted to say is that it makes a difference whether I call it a bug or you, not so much because you live in Champaign but because of your employer...
Jan
23
comment DeleteDuplicates not deleting duplicates
@DanielLichtblau: no of course not, I think it would give the OP the chance to accept that answer and mark the question as "solved". Comments, AFAIK, are to be considered only as second class citizens here, probably not even here to stay...
Jan
23
comment DeleteDuplicates not deleting duplicates
... it might also be of interest that this behavior is new to version 9, version 7 and 8 give the "expected" result...
Jan
23
comment DeleteDuplicates not deleting duplicates
@DanielLichtblau: wouldn't it make sense to add that as an answer: it looks like a bug and the reason is presumably (?) that the Equal case is treated as a special case for performance reaons. I think it would be most convincing if such an answer would come from you :-)
Jan
19
awarded  Yearling
Jan
16
comment Wolfram Workbench - how to rename local variables
I would suggest a two stage procedure: first use the refactoring functionality to replace the symbol with one with a longer, unique name for the whole file. Then select each of the Modules and use the standard eclipse search and replace functionality to (string-)replace the unique longer symbol name with the desired new name which will let you act on the selected lines only...
Jan
15
comment Is there a concise form of Which or similar conditional?
+1, you might want to use Replace instead of ReplaceAll for slightly more robustness when replacing unexpected expressions...
Jan
7
comment Dashboard TV with CDF Player
Interesting -- Cells isn't documented in version 8.0.4 but still seems to work. As I think the version 9 players are not yet available that might be of interest...
Jan
7
answered Why is Mathematica treating my text as input?
Jan
7
comment Do you really want to quit the kernel? Yes!
@Dengen: sorry, seems to work as desired. When I tried it yesterday it didn't, but I can't remember what exactly I tried on which version. Today with Version 9 (64bit) on Windows 7 it seems to interrupt a running calculation...
Jan
6
comment Do you really want to quit the kernel? Yes!
Dengen: interesting, does this interrupt a running calculation? It looks to me as if the Quit is queued and won't do what the OP desires...
Jan
6
comment Why does Dynamic output cause CPU usage when onscreen?
Honestly, I believe this is a bug which probably never got detected because what you do doesn't make much sense. Slight variations which make more sense (e.g. { Slider[Dynamic[y]], Slider[Dynamic[s]], Dynamic[f[x_] := s*x; f[y]]}) show the same behavior, so you might want to report it as a possible bug...
Jan
6
comment error when defining a compiled function with ReplacePart
I think that the three argument form of ReplacePart was documented behavior for older versions (certainly before version 6). So I guess it might still be there for compatibility reasons...
Jan
2
comment Export graphics in parallel
@yohbs: one more thing: you will only need as many copies of the data as you have parallel Kernels. So if you managed to reduce the size by a factor ~50 you should be able to distribute that to about 50 parallel Kernels, which most probably is much more than your hardware will run in parallel. I would expect that should solve your problem, can you explain why you think that it doesn't?
Jan
2
comment Export graphics in parallel
@Mr.Wizard: my "packed array method" isn't something very smart, I'm just using "ValuesOnGrid" and "Coordinates" of the resulting interpolating functions to extract the values on the gridpoints. Then I ensure these large numeric arrays are packed arrays and do any further processing with those. The percise details on what I store and how that data is arranged depends a little on the problem and the further processing, so it's not general enough to provide something without a specific example...
Jan
2
comment Export graphics in parallel
@yohbs: I think your questions is still not specific enough. I would guess that you apply the "method of lines" yourself (and don't use the corresponding internal method of NDSolve). If that's correct then you could extract all grid coordinates and values and only pass those to the plotting functions (and corresponding kernels) that are needed. I'm sure people will provide solutions for that if you tell us more about your solutions and what kind of plot you do, as usual a simplified working example helps tons...