Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

behaviour of N[0]

0 views
Skip to first unread message

Jaume Guasch

unread,
Jul 26, 1995, 3:00:00 AM7/26/95
to
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 gua...@ifae.es
Toni Coarasa coa...@ifae.es
Joan Clua cl...@ifae.es
Barcelona
Catalunya (Europa)
http://www.ifae.es/~ifte0/

0 new messages