       Complex I

• To: uiucuxc!yoda.ncsa.uiuc.edu!mathgroup
• Subject: Complex I
• Date: Wed, 14 Mar 90 15:17:25 MST

```The strange convention of placing negative signs with the complex number I
produces errors with substitutions. For example, the following program

AppendTo[\$Echo, "stdout"]
(* Error in Rules *)
a = I*x/f-I*x/g+z
a = a /.{x_/f-x_/g -> x/h}
(* Error disappears if I is replaced by a variable *)
b = v*x/f-v*x/g+z
b = b /.{x_/f-x_/g -> x/h}

results in

Mathematica (sun3.68881) 1.2 (November 6, 1989) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
S. Omohundro, D. Ballman and J. Keiper
with I. Rivin and D. Withoff
-- Terminal graphics initialized --

In:=
Out= {stdout}

In:= (* Error in Rules *)

In:= a = I*x/f-I*x/g+z

I x   -I x
Out= --- + ---- + z
f     g

In:= a = a /.{x_/f-x_/g -> x/h}

I x   -I x
Out= --- + ---- + z
f     g

In:= (* Error disappears if I is replaced by a variable *)

In:= b = v*x/f-v*x/g+z

v x   v x
Out= --- - --- + z
f     g

In:= b = b /.{x_/f-x_/g -> x/h}

v x
Out= --- + z
h

In:=

```

• Prev by Date: Re: Speeding up Mathematica
• Next by Date: Speeding up Mathematica
• Previous by thread: [no subject]
• Next by thread: Mathematica User Group in Econometrics