MathGroup Archive 1995

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

Search the Archive

Re: Declaring Variables as Real?

  • To: mathgroup at
  • Subject: [mg1218] Re: Declaring Variables as Real?
  • From: RTighe at (Richard Tighe)
  • Date: Fri, 26 May 1995 01:49:52 -0400
  • Organization: Stanford Linear Accelerator Center

In article <3prrks$533 at>, Lincoln Grimes
<lsgrimes at> wrote:

> I am evaluating some complex expressions with mma, and I want to be
> able to declare a variable as being real. I can do so for a single 
> expression with Complex Expand having no second argument, but I want to
be able
> to declare a variable as real for my entire notebook,so commands like
> Real and ComplexToTrig don't consider an imaginary part to my variables.  Is
> this possible?  Thanks.
>                                                         Lincoln Grimes
>                                                         The Mitre Corp.
lsgrimes at

Use Im[var]^=0;

In[1]:= Re[x+I]

Out[1]= Re[x]

In[2]:= Im[y]^=0;

In[3]:= Re[y+I]
Out[3]= y

Richard Tighe

  • Prev by Date: Re: Graphic Bugs
  • Next by Date: Re: Kernel Shutting Down - Help
  • Previous by thread: Declaring Variables as Real?
  • Next by thread: Mesh