MathGroup Archive 1995

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

Search the Archive

behaviour of N[0]


	I'm sure that someone has noted this before, but I haven't seen
it, neither in the group nor in the manual.

	When mathematica tries to evaluate N[#] returns always a Real number,
except when # is 0. Namely:

In[1]:= N[0]

Out[1]= 0

In[2]:= IntegerQ[N[0]]

Out[2]= True

In[3]:= N[3]

Out[3]= 3.

In[4]:= IntegerQ[N[3]]

Out[4]= False

	And the only way I found to convert it to Real is:

In[5]:= 0+1.-1.

Out[5]= 0.

	Is there any reason for this different treatment betwen 0 and the
other numbers? 

	Is there any other way to obtain 0. ? (not 0+68686.-68686.)

--
	Jaume Guasch guasch at ifae.es
	Toni Coarasa coarasa at ifae.es
	Joan Clua    clua at ifae.es
	Barcelona
	Catalunya (Europa)
	http://www.ifae.es/~ifte0/



  • Prev by Date: Re: Putting Mathematica Graphics into TeX or LaTeX?
  • Next by Date: Replacing terms and expanding one at a time
  • Previous by thread: Re: Putting Mathematica Graphics into TeX or LaTeX?
  • Next by thread: Replacing terms and expanding one at a time