MathGroup Archive 2010

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

Search the Archive

Re: Re: algebraic numbers

  • To: mathgroup at
  • Subject: [mg106220] Re: [mg106192] Re: algebraic numbers
  • From: DrMajorBob <btreat1 at>
  • Date: Tue, 5 Jan 2010 01:47:15 -0500 (EST)
  • References: <> <hhpl0g$9l1$>
  • Reply-to: drmajorbob at

Computer reals are precisely equal to, and in one-to-one correspondence  
with, a miniscule subset of the rationals. Every one of them has a finite  
binary expansion.

x = RandomReal[]
digitForm = RealDigits@x;
rationalForm = FromDigits@digitForm
{n, d} = Through[{Numerator, Denominator}@rationalForm]
d x == n




{1088471616079187, 5000000000000000}


A number can't get more rational or algebraic (solving a FIRST degree  
polynomial with integer coefficients) than that.

If computer reals are THE reals, why is it that RandomReal[{3,4}] can  
never return Pi, Sqrt[11], or ANY irrational?

OTOH, how often does RootApproximate@RandomReal[] succeed?

Never, essentially:

Reap@Do[x = RootApproximate@RandomReal[];
   RootApproximate =!= Head@x && Sow@x, {10^8}]

{Null, {}}


On Mon, 04 Jan 2010 05:01:55 -0600, Noqsi <jpd at> wrote:

> On Jan 3, 1:37 am, DrMajorBob <btre... at> wrote:
>> Mathematica Reals may not be Rational, but computer reals certainly are.
>> (I shouldn't have capitalized "reals" in the second case.)
> Only in the shallow sense that there is a low entropy mapping between
> computer "reals" and rational numbers in the intervals they represent.
> But computer "reals" don't behave arithmetically like rationals or the
> abstract "reals" of traditional mathematics. This fact often causes
> confusion.

DrMajorBob at

  • Prev by Date: Re: Bind double-[ to keyboard shortcut
  • Next by Date: Re: Re: Re: algebraic numbers
  • Previous by thread: Re: Re: algebraic numbers
  • Next by thread: Re: Re: Re: algebraic numbers