behaviour of N[0]

*To*: mathgroup at christensen.cybernetics.net*Subject*: [mg1801] behaviour of N[0]*From*: guasch at u6.ifae.es (Jaume Guasch)*Date*: Mon, 31 Jul 1995 23:07:32 -0400

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/