MathGroup Archive 2003

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

Search the Archive

RE: Problem about expression

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41133] RE: [mg41119] Problem about expression
  • From: "David Park" <djmp at earthlink.net>
  • Date: Mon, 5 May 2003 02:40:44 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Bamboo,

That is because you have a space between 0. and 2. A space between
subexpressions is taken as multiplication by Mathematica. 0 times 2 is 0.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

From: Bamboo [mailto:u8514501 at cc.nctu.edu.tw]
To: mathgroup at smc.vnet.net


Dear all,


I assign "0.2" to tmax. But the assigned value is "0." actually.
As shown in the complete expression, "0.2" is divided into "0." and "2".

If the first blank line is deleted, the assigned value is "0.2" which is
correct.
It seems that Mathematica did something automatically.
How to get rid of this trouble?


In[1]:=
tmax=0.2;
tmax
Quit[]

Out[2]:=
0.


The complete expression is as following:


Cell[BoxData[{
    RowBox[{"\[IndentingNewLine]",
      StyleBox[
        RowBox[{
          RowBox[{"tmax", "=",
            RowBox[{"0.", "2"}]}], ";"}],
        Background->None]}], "\[IndentingNewLine]", "tmax",
"\[IndentingNewLine]",
    RowBox[{"Quit", "[", "]"}]}], "Input",
  CellLabel->"In[1]:=",
  CellFrame->{{0, 0}, {0.5, 0}}]


Any help welcome.

Thanks,
Bamboo




  • Prev by Date: Re: Problem about expression
  • Next by Date: Re: Redefine[Plus] - problem
  • Previous by thread: Re: Problem about expression
  • Next by thread: Re: Problem about expression