MathGroup Archive 2008

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

Search the Archive

Re: Re: Pi is not a real number?


I find it a little strange that so many persons have posted an answer  
similar to the one below (that is, about PI being a symbol, the need  
to use N, etc) without bothering to check that (for exmple)

RealDigits[Pi, 10, 3, -10^4]
{{8, 5, 6}, -9999}

without any need to use N. Moreover:

RealDigits[2, 10, 3, -10^9]

General::"ovfl" :  "Overflow occurred in computation.

Andrzej Kozlowski


On 15 Mar 2008, at 23:43, Bill Rowe wrote:

> On 3/15/08 at 3:11 AM, meznaric at gmail.com (Sebastian Meznaric) wrote:
>
>> Try this in Mathematica RealDigits[\[Pi], 10, 3, -10^9]
>
>> The answer you get: RealDigits::realx: The value \[Pi] is not a real
>> number. >>
>
> The problem is Pi is a symbol and RealDigits wants a number. Use
> N to convert Pi to a number then use RealDigits. Also, the
> fourth argument to RealDigits is expected to be an integer. So,
> putting this together
>
> In[3]:= RealDigits[N[\[Pi]], 10, 3, -9]
>
> Out[3]= {{3,5,8},-8}
>
> is the result I think you were looking for.
>



  • Prev by Date: Re: Clearing selected variables
  • Next by Date: Re: help to find position location
  • Previous by thread: Re: Pi is not a real number?
  • Next by thread: Re: Pi is not a real number?