Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54352] Re: [mg54300] Re: [mg54271] Re: Bug Report - Two numerical values for a same variable
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sat, 19 Feb 2005 02:31:53 -0500 (EST)
  • References: <00ed01c512b0$2f242850$6400a8c0@Main> <curpbn$r28$1@smc.vnet.net> <200502150438.XAA29728@smc.vnet.net> <200502161936.OAA19223@smc.vnet.net> <d3d3aacf7f18939828890ce85676bd26@mimuw.edu.pl> <opsmcn3rqciz9bcq@monster>
  • Sender: owner-wri-mathgroup at wolfram.com

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