MathGroup Archive 1999

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

Search the Archive

Re: BadAlgebra

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

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):

CellPrint[Cell[BoxData[RowBox[
        
        {"2", 
          FormBox[RowBox[{RowBox[{"(", "3", ")"}], "+", "1"}], 
            "StandardForm"]}
        
        ]], "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 4.0.1.0.  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 union.edu>
Math. Dept.
Union College,
Schenectady, NY
518-388-6164



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