Is there a way of declaring a variable REAL?
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg2007] Is there a way of declaring a variable REAL?
- From: wexler at u.washington.edu (Carlos Wexler)
- Date: Thu, 14 Sep 1995 23:27:25 -0400
- Organization: University of Washington, Seattle
It seems that the basic variable type in Mathematica is COMPLEX which is fine most of the time, but sometimes one needs a variable that is defined to be real, i.e. such that "Re[x + I y]" produces "x". Is there any way to do this, something like "declare x,y as real"? Ideally it should report an error if one tried to assign a COMPLEX value to it, but I don't need that much right now, just the basic declaration such that simplifications are carried as the example above... Any hint would be appreciated! Carlos --