MathGroup Archive 2001

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

Search the Archive

Re: FractionalPart

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31249] Re: FractionalPart
  • From: "delouis" <ng_only at hotmail.com>
  • Date: Tue, 23 Oct 2001 04:53:27 -0400 (EDT)
  • References: <9qrco4$c02$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I think the 1's that you are seeing are numbers who's fractional part are
actually X.99999999 - and rounded to 1.

In[45]:=
SetPrecision[x[[7]],30]

Out[45]=
6.99999999999999911182158029987

I am new myself, and am having a hard time figuring out how to see what the
"Real" number is.

I just do not like using N to return 10 digits, and always getting 6!  I
feel I just can not trust the answers that Mathematica 4.1 returns.

In[47]:=
N[Pi,10]

Out[47]=
3.14159

Pi looks like a 6 digit number exactly.

Note that an exact number like 1/2 gives accurate results.
x = Exp[(1/2)*Log[A]]
etc...

Dana

--

"Juan" <erfa11 at hotmail.com> wrote in message
news:9qrco4$c02$1 at smc.vnet.net...
> Hello.
> I am new in Mathematica(also in english), and I have this question:
> I would like to know the behavior of the function FractionalPart.
> See here:
>
> In[1]:= a=Range[9]^2
> Out[1]= {1,4,9,16,25,36,49,64,81}
>
> In[2]:= x=Exp[.5 Log[a]]
> Out[2]= {1,2.,3.,4.,5.,6.,7.,8.,9.}
>
> In[3]:= FractionalPart[x]
> Out[3]= {0,0.,4.444089x10^-16,0.,0.,1.,0.,0.,1.,1.77639x10^-15}
>
> But it shoud be 0., all of them,no?
>
> Thanks. Juan
>
>
> _________________________________________________________________
> Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp
>
>




  • Prev by Date: Re: FractionalPart
  • Next by Date: RE: FractionalPart
  • Previous by thread: Re: FractionalPart
  • Next by thread: RE: FractionalPart