       RE: Mathematica 3.0 - 4.0 discrepancies.

• To: mathgroup at smc.vnet.net
• Subject: [mg20403] RE: [mg20377] Mathematica 3.0 - 4.0 discrepancies.
• From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
• Date: Tue, 26 Oct 1999 00:32:55 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```Jordi Igns indicated Version 3 and Version 4 gave very different results
when certain calculations were done under Win9x or Linux, but not under
MacOS.

I found the source of the problem and simplified it to the examples
below.

Using Version 3 under Windows 98 we get the following:
-------------------------------------

In:=
reflected[air] ={{1,2},{3,4}}.{E[air],E[air]}

Out=
{E[air] + 2*E[air], 3*E[air] + 4*E[air]}

In:=
{{1.0,2.0},{3.0,4.0}}.{E[air],E[air]}

Out=
{1.*E[air] + 2.*E[air], 3.*E[air] + 4.*E[air]}

In:=
reflected[air] ={{1.0,2.0},{3.0,4.0}}.{E[air],E[air]}

Out=
{1.*E[air] + 2.*E[air], 3.*E[air] + 4.*E[air]}

In:=
{{1.0,2},{3.0,4}}.{E[air],E[air]}

Out=
{1.*E[air] + 2.*E[air], 3.*E[air] + 4.*E[air]}

-------------------------
Using Version 4 under Windows 98 we get the same result from
In, In, but not from In, In !!
Instead Version 4 gives the result below.

In:=
reflected[air] ={{1.0,2.0},{3.0,4.0}}.{E[air],E[air]}

Out=
{8.15485, 19.028}

In:=
{{1.0,2},{3.0,4}}.{E[air],E[air]}

Out=
{8.15485, 19.028}

Apparently the kernel gives E[air], E[air] the numeric value of E in
the lines above.  I would say this is a bug in Version 4.0 under certain
platforms.

However, it's a bad practice to use symbols such as (E, I, Pi, D) for
variables because the built-in meaning might mess things up.  As we see
above, your code might work with the present version of Mathematica, but not
in a future version.

It seems Jordi was using E, B to represent electric, magnetic fields, and
that sounds like a logical choice.  Now that we know this can cause problems
I think a better choice would be \[ScriptCapitalE], \[ScriptCapitalB].

--------------------
Regards,
Ted Ersek

For Mathematica tips, tricks see
http://www.dot.net.au/~elisha/ersek/Tricks.html

```

• Prev by Date: Possible mis-documentation
• Next by Date: graphics
• Previous by thread: Mathematica 3.0 - 4.0 discrepancies.
• Next by thread: Font problems running remotely