Skip to main content
6 events
when toggle format what by license comment
Jan 11, 2013 at 23:27 comment added QuantumDot Yes, you are right; Jens' answer doesn't lead to extraneous parentheses. And, yeah -- I thought your answer was more economical because it took 'fewer lines.' Those are my newbie instincts showing up.
Jan 11, 2013 at 23:15 comment added rm -rf @QuantumDot Yeah, I understood that and I'm saying that I think it's because of the reason in Michael Pilat's answer (but I'm not sure)
Jan 11, 2013 at 23:11 comment added QuantumDot Oh, I am just saying that the result of the example in my comment above is: $3\big(B_{0011}(s,m0,m1)\big)$, and the outer parenthesis is extraneous.
Jan 11, 2013 at 22:53 comment added rm -rf @QuantumDot I'm not near mma to test it right now, but I believe the reason is because Format is mainly for display purposes only and not for use in computations, so I would recommend his approach for flexibility (see the last paragraph in Jens' answer). Mine isn't any more "economical" than Jens'... if you're referring to the compactness of generating the "0011" string, then you can very well use what I have above with MakeBoxes as in Jens' answer.
Jan 11, 2013 at 22:44 comment added QuantumDot This answer is very economical, but the problem is that if the pvB function appears in a larger expression, an unneeded pair of parenthesis is added around it. Try TraditionalForm[3 pvB[2,4,x,s,m0,m1]], for example. How should I remove it?
Jan 11, 2013 at 20:22 history answered rm -rf CC BY-SA 3.0