MathGroup Archive 2005

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

Search the Archive

Re: Re: Re: Bug Report - Two numerical values for a same variable


It has occured to me that it may be a good idea to summarize what (in 
my opinion) is the situation concering this issue of Complex, Rational, 
Atoms  etc.

The following are the two basic Matheamtica principles.

1. All numbers, that is all expressions for which NumberQ returns True 
are atoms:

In[1]:=
NumberQ[2/3]
AtomQ[2/3]
AtomQ[2/3]
NumberQ[I]
NumberQ[2+I]
AtomQ[2+I]


Out[1]=
True

Out[2]=
True

Out[3]=
True

Out[4]=
True

Out[5]=
True

Out[6]=
True



2. Numeric quantities that are not numbers (NumberQ returns False) are 
Atoms only if they have Head Symbol:

In[7]:=
NumberQ[Pi+I]
AtomQ[Pi+I]

Out[7]=
False

Out[8]=
False


However

In[9]:=
NumberQ[Pi]

Out[9]=
False

In[10]:=
AtomQ[Pi]

Out[10]=
True

In[11]:=
Head[Pi]

Out[11]=
Symbol


Expressions of the form Complex[a,b], Rational[a,b] are only defined 
where a and b are (certain) numbers. In particular they are not defined 
for numeric quantities whcih are not numbers, e.g. Complex[Pi,E] and
Rational[Pi,Pi] are just undefined expressions.

Andrzej Kozlowski


  • Prev by Date: Re: Re: Re: Re: Bug Report - Two numerical values for a same variable
  • Next by Date: Re: 2+ D wave equation
  • Previous by thread: Re: Re: Re: Bug Report - Two numerical values for a same variable
  • Next by thread: Re: Re: Re: Bug Report - Two numerical values for a same variable