Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

Re: RealDigits bug?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45871] Re: RealDigits bug?
  • From: adam.smith at hillsdale.edu (Adam Smith)
  • Date: Wed, 28 Jan 2004 05:19:09 -0500 (EST)
  • References: <bv00g1$je7$1@smc.vnet.net> <bv2g1t$68$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Bobby,

What version of Mathematica are you using?  I am running Version 4.1
and it does not include 10 in the Frequencies list

In[3]:=
Frequencies[First[RealDigits[ pisot]]] 


Out[3]=
{{2089,0},{422,1},{427,2},{434,3},{467,4},{444,5},{452,6},{447,7},{437,
    8},{381,9}}


In response to Enrique.  I suspect that the failure is related to a
misunderstanding of the N[] function.  In particular look in the Help
for N[] and study the $MaxMachineNumber and $MaxPrecision.  Since your
pisot is on the order of 10^3340, you may be running into truncation
errors with N[].  On my machine $MaxMachineNumber is around 10^308.
Since pisot is clearly much greater than this, I would expect
truncation errors.

Adam Smith 

drbob at bigfoot.com (Bobby R. Treat) wrote in message news:<bv2g1t$68$1 at smc.vnet.net>...
> I don't know whether the equality should be true, but it's very clear
> that 10 isn't a base-10 digit!
> 
> Frequencies[First[RealDigits[
>     pisot]]]
> {{2086, 0}, {422, 1}, 
>   {427, 2}, {434, 3}, 
>   {467, 4}, {444, 5}, 
>   {452, 6}, {447, 7}, 
>   {437, 8}, {381, 9}, {3, 10}}
> 
> Bobby
> 
> Enrique Zeleny <ezeleny at fismat1.fcfm.buap.mx> wrote in message news:<bv00g1$je7$1 at smc.vnet.net>...
> > This is wrong:
> > 
> > In[1]:= pisot = N[((1/3)*((1/2)*(27 + 3*Sqrt[69]))^(1/3) + (2/(27 +
> > 3*Sqrt[69]))^(1/3))^27351, 6000];
> > 
> > In[2]:= pisot == FromDigits[RealDigits[pisot]]
> > 
> > Out[2]:= False
> > 
> > If you look at the value returned by RealDigits[pisot] contains three
> > 10's!!!
> > 
> > 
> > Enrique Zeleny
> > Universidad Autonoma de Puebla
> > Mexico


  • Prev by Date: Re: Re: Re: Re: typesetting fractions
  • Next by Date: RE: Mathematica Code to Build and Access KD Trees
  • Previous by thread: Re: RealDigits bug?
  • Next by thread: Re: RealDigits bug?