MathGroup Archive 1999

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

Search the Archive

Re: BadAlgebra

  • To: mathgroup at
  • Subject: [mg20605] Re: [mg20557] BadAlgebra
  • From: William Fairchild <fairchiw at>
  • Date: Tue, 2 Nov 1999 02:35:36 -0500
  • Sender: owner-wri-mathgroup at

It turns out that there are examples of "bad algebra" that are not removed
by Evaluate[ ], Trace[ ], etc.  Here's an example using FormBox[ ]
(actually a minor modification of the mg20557 example of bad algebra):

          FormBox[RowBox[{RowBox[{"(", "3", ")"}], "+", "1"}], 
        ]], "Input"]]

Entering the above code constructs an input cell as follows:

In[n]:= 2(3)+1

which evaluates to:

Out[n]= 8

This behavior has been observed on both Windows and Mac versions of
Mathematica  The aberrant expression can be built using ordinary
typing and editing in a notebook;  the CellPrint[ ] version given here is
not necessary, but serves to illustrate the key list, namely

{"2", FormBox[RowBox[{RowBox[{"(", "3", ")"}], "+", "1"}], "StandardForm"]}

which Mathematica fails to transform before handing to the kernel.

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

  • Prev by Date: Re: list manipulation
  • Next by Date: Re: Combinatorica questions!!!
  • Previous by thread: Re: list manipulation
  • Next by thread: Re: Combinatorica questions!!!