10,894 reputation
12050
bio website
location
age 28
visits member for 1 year, 11 months
seen Mar 23 at 22:02

Jan
27
answered LetL and Module efficiency
Jan
25
awarded  Nice Answer
Jan
25
comment Why is Mathematica's expansion of expressions with square roots so slow?
@AlbertRetey At the time of writing of this answer OP did not include the information needed to realize that he was in fact comparing two analytically solutions. As such both me and belisarius belived it was a case of comparing numerical to analytical timings, which is often the case when people observer unexpected slow code.
Jan
25
comment Why is Mathematica's expansion of expressions with square roots so slow?
@AlbertRetey I updated the timing. And indeed, I would expect that Maple is just doing it iteratively while Mathematica evaluates each possible sequence. I expect it's a case where complexity analysis dictates the suboptimal algorithm for this case. I think the Maple style expansion will worst case get 5^O(n) terms that can then be collected, while Mathematica already has all the trival terms collected, and therefore only evaluates around 5000 terms. However, since the iterative approach can quite effectively reduce the number of terms, it's nowhere near the upper limit for this example.
Jan
25
revised Why is Mathematica's expansion of expressions with square roots so slow?
added 3 characters in body
Jan
25
revised Why is Mathematica's expansion of expressions with square roots so slow?
deleted 1 characters in body
Jan
25
comment Why is Mathematica's expansion of expressions with square roots so slow?
@AlbertRetey I wouldn't call it a workaround. They are two different methods of achieving the same result, and in this case one is faster. I would wonder however if anyone knows if there are arguments for using Mathematica's rather than iterating. Perhaps it's due to elements of Expand's other functionality.
Jan
25
revised Why is Mathematica's expansion of expressions with square roots so slow?
added 2 characters in body
Jan
25
revised Why is Mathematica's expansion of expressions with square roots so slow?
added 285 characters in body
Jan
25
revised Why is Mathematica's expansion of expressions with square roots so slow?
added 397 characters in body
Jan
25
answered Why is Mathematica's expansion of expressions with square roots so slow?
Jan
25
revised What are the most common pitfalls awaiting new users?
loops are plentyfold in Mathematica, and should not be avoided, it's the procedual side-effect geared loops that should be avoided.
Jan
24
comment Bit Operations — Force Binary Bit Representation
@Stefan "...turns ones into zeros.." is never falsified, and it does provide a 1's complement as is shown in Szabolcs example 0101->1010. What would you expect 0101 to be turned into? I think you're confusion is with what those steams of bits are interpreted as when you convert them back into numbers. Did you look at the wiki page both me and Szabolcs linked to?
Jan
24
comment Can my color function be written more simply?
@Mr.Wizard Feel free to add it here if you'd like.
Jan
24
comment Can my color function be written more simply?
@Mr.Wizard Indeed, you could do that, but strictly speaking it wouldn't be the same, since the current implementation allows you to change the colors at any point while the faster version would have you redefine the function to change colors. For a fun illustration of the difference, try using ColorFunction -> ((colors = RotateRight@colors; cf[##]) &). :)
Jan
24
revised Can my color function be written more simply?
added 19 characters in body
Jan
24
awarded  Nice Answer
Jan
24
answered Array of functions, evaluation in plot
Jan
24
answered How can we create Randolph diagrams in Mathematica?
Jan
23
answered Can my color function be written more simply?