Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive


  • To: mathgroup at
  • Subject: [mg20557] BadAlgebra
  • From: William Fairchild <fairchiw at>
  • Date: Sat, 30 Oct 1999 00:14:06 -0400
  • Sender: owner-wri-mathgroup at

Must we apply Evaluate[    ] to everything?  Here is an example which
shows that it's a good idea; the following command yields 2(x)+1 in an
input cell:


        {"2", RowBox[{RowBox[{"(", "x", ")"}], "+", "1"}]}

        ]], "Input"]]

but this 2(x)+1 is not the same as one which is typed in, because when it
is entered the output is 2(1+x).  In other words we have an example of
session with


        {"2", RowBox[{RowBox[{"(", "x", ")"}], "+", "1"}]}

        ]], "Input"]]

In[2]:= 2(x)+1

Out[2]:= 2(1+x)

and today is not April 1st.  This example arose in the course of normal
typing and editing of Mathematica expressions, although in a more
complicated situation; the above example is a distillation.

Notice that if the aberrant 2(x)+1 is wrapped in Evaluate[] the
preprocessor does the right thing and the output is correct. Evidently one
must coax the preprocessor to transform the list

{"2", RowBox[{RowBox[{"(", "x", ")"}], "+", "1"}]}


{RowBox[{"2", RowBox[{"(", "x", ")"}]}], "+", "1"} 

so that the kernel gets the right input.  Almost any other minor
perturbation also causes the preprocessor to kick in and "do the right
thing".  The question is:  What other Front End glitches will cause wrong
output?  And can they all be prevented by use of Evaluate[] or other

Bill Fairchild <fairchiw at>
Math. Dept.
Union College,
Schenectady, NY

  • Prev by Date: difference equations
  • Next by Date: Zeta Function
  • Previous by thread: difference equations
  • Next by thread: Zeta Function