9,491 reputation
1642
bio website
location
age
visits member for 2 years, 6 months
seen 17 hours ago

Jan
27
comment Function that evaluates in notebook does not evaluate in CDF
@Anuk: I think you are facing several problems and I'd expect only for some of them the reason is the deployment. As Sjoerd has mentioned you strictly can't do certain things in a CDF as writing to files. You usually also can't load packages in the free CDF Player (unless they are specially encoded/signed which need explicit licenses and tools from WRI). As the code you show does actually work your problems are with those parts that we don't know and that makes it almost impossible for us to suggest solutions or workarounds...
Jan
27
comment Function that evaluates in notebook does not evaluate in CDF
@Sjoerd: it looks like the various sources are not completely in sync. I found that numeric InputFields are supported here details for programmers and numeric InputFields indeed do work in the free CDF-Player...
Jan
26
comment Why is Mathematica's expansion of expressions with square roots so slow?
@belisarius: I now understand that you didn't have the information when writing this that I had when reading it, which of course makes quite a difference. Sorry if my critizism was unjustfied, the answer(s) just looked like a defence reaction that I think is common but unnecessary (and IMHO even counterproductive).
Jan
25
comment Why is Mathematica's expansion of expressions with square roots so slow?
@jVincent: final remark: unless your computer is more the 10 times faster than mine the timing seems to still reflect the non-expanding case. For me the timings with version 9 are about 105 sec. for the naive Expand and about 0.15 sec. for the Nest case, results checked to be the same. I guess that the Nest timing is in the same order of magnitude as what maple will do with the naive input...
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...