MathGroup Archive 2010

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

Search the Archive

Re: Re: algebraic numbers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106225] Re: [mg106192] Re: algebraic numbers
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Tue, 5 Jan 2010 01:48:15 -0500 (EST)
  • References: <200912290620.BAA02732@smc.vnet.net> <hhpl0g$9l1$1@smc.vnet.net>
  • Reply-to: drmajorbob at yahoo.com

Oops, big typo that time. I meant RootApproximant, not RootApproximate!

With that corrected, I find that just about EVERY random real is algebraic.

roots = First@
    Last@Reap@
      Do[x = RootApproximant@RandomReal[];
       Root == Head@x && Sow@x, {10^2}];
Length@roots

100

(It's very slow, hence the small sample.)

When RootApproximant fails, I suspect it's a limitation of the algorithm,  
not a property of the real.

Bobby

On Mon, 04 Jan 2010 15:17:56 -0600, DrMajorBob <btreat1 at austin.rr.com>  
wrote:

> 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;
> Length@First@digitForm
> rationalForm = FromDigits@digitForm
> {n, d} = Through[{Numerator, Denominator}@rationalForm]
> d x == n
>
> 0.217694
>
> 16
>
> 1088471616079187/5000000000000000
>
> {1088471616079187, 5000000000000000}
>
> True
>
> 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, {}}
>
> Bobby
>
> On Mon, 04 Jan 2010 05:01:55 -0600, Noqsi <jpd at noqsi.com> wrote:
>
>> On Jan 3, 1:37 am, DrMajorBob <btre... at austin.rr.com> 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 yahoo.com


  • Prev by Date: Re: Wrong ODE solution in Mathematica 7?
  • Next by Date: Re: Wrong ODE solution in Mathematica 7?
  • Previous by thread: Re: Re: Re: algebraic numbers
  • Next by thread: Re: algebraic numbers