Prev: FindInstance Problem
Next: Persistent assumption
From: DrMajorBob on 6 Jan 2010 06:02 > is weird - there is no such things as "computer numbers". Numbers exist > only and (probably) exclusively in the human mind. Well... computer reals (floating point numbers) certainly DO exist, and that's the way Mathematica stores a (machine precision) real number. I never said MATHEMATICA Reals were all algebraic, mind you... because your point is well taken that Mathematica has an interpretation or "point of view" that may conflict with mine. Even so... when Mathematica is asked the question via RootApproximant, I haven't located a machine-precision number that isn't algebraic. When we go beyond machine precision, your point is far more solid... but I suspect a sufficiently stubborn and exhaustive RootApproximant would do the same with those. Bobby On Tue, 05 Jan 2010 16:39:50 -0600, Andrzej Kozlowski <akoz(a)mimuw.edu.pl> wrote: > Just one more comment, I hope my last one on this subject. Obviously > RandomReal make it choices out of a countable set of entities. One would > have to be insane to claim otherwise and I am not that yet. > > But, Mathematica does not regard these entities as rational numbers and > so they are not that. If you call them rationals the it does not make > *mathematical* sense (because rationals have measure 0). So, if > Mathemaitca does not regard them as rationals they are not rationals. > How could they be that ? Until they are interpreted by Mathematica, they > are not numbers at all but just some data stored in computer memory - > which are not numbers of any kind. Mathematica interprets them as > non-computable irrationals in order to make mathematical sense when > returning them while simulation a real distribution, because all other > numbers have measure 0. > This is all about "simulating mathematics" - numbers do not live in any > sense inside computers. To say that "all computer numbers are rational" > is weird - there is no such things as "computer numbers". Numbers exist > only and (probably) exclusively in the human mind. > > To say that 1.2 is rational in Mathematica even if Mathematica says > > Element[1.2, Rationals] > > False > > does not make any sense at all. > > Andrzej Kozlowski > > > > > On 6 Jan 2010, at 07:04, Andrzej Kozlowski wrote: > >> Well, you are obviously misunderstanding what I am trying to explain >> but I have no desire to spend any more time on it. I give up. >> >> Perhaps you should try to explain yourself why Mathematica gives >> >> In[1]:= Element[1.2, Rationals] >> >> Out[1]= False >> >> In[2]:= Element[1.2, Reals] >> >> Out[2]= True >> >> and you might also read >> >> http://en.wikipedia.org/wiki/Computable_number >> >> (but that's the last time I posting anything to do with any logic or >> mathematics here.) >> >> Andrzej Kozlowski >> >> >> >> >> >> On 5 Jan 2010, at 22:31, DrMajorBob wrote: >> >>> RandomReal[] returns numbers from a countable set of rationals. >>> >>> Or call them reals, if you must; it still selects from a countable set >>> of possibilities... not from the uncountable unit interval in the >>> reals. >>> >>> The range of RandomReal[] is a set of measure zero, just like the >>> algebraic numbers. >>> >>> Bobby >>> >>> On Tue, 05 Jan 2010 02:08:24 -0600, Andrzej Kozlowski >>> <akoz(a)mimuw.edu.pl> wrote: >>> >>>> >>>> On 5 Jan 2010, at 15:47, DrMajorBob wrote: >>>> >>>>> If computer reals are THE reals, why is it that RandomReal[{3,4}] can >>>>> never return Pi, Sqrt[11], or ANY irrational? >>>> >>>> It can't possibly do that because these are computable real numbers >>>> the set of computable real numbers if countable and has measure 0. >>>> Computable numbers can never be the outcome of any distribution that >>>> selects numbers randomly from a real interval. >>>> >>>> The most common mistake people make about real numbers is to think >>>> that numbers such as Sqrt[2] or Pi as being in some sense typical >>>> examples of an irrational number or a transcendental number but they >>>> are not. They are very untypical because they are computable: that >>>> is, there exists a formula for computing as many of their digits as >>>> you like. But we can prove that the set of all reals with this >>>> property is countable and of measure 0. So Sqrt[2] is a very >>>> untypical irrational and Pi a very untypical transcendental. So what >>>> do typical real look like? Well, I think since a "typical" real is >>>> not computable we cannot know all of its digits and we cannot know >>>> any formula for computing them. But we can know a finite number of >>>> these digits. So this looks to me very much like the Mathematica >>>> concept of Real - you know a specified number of significant digits >>>> and you know that there are infinitely many more than you do not >>>> know. It seems to me the most natural way to think about >>>> non-computable reals. >>>> >>>> Roger Penrose, by the way, is famous for arguing that our brain is >>>> somehow able to work with non-computable quantities, although of >>>> course not by using digital expansions. But this involves quantum >>>> physics and has been the object of a heated dispute since the >>>> appearance of "The emperor's New Mind". >>>> >>> >>> >>> -- >>> DrMajorBob(a)yahoo.com >> > -- DrMajorBob(a)yahoo.com
From: DrMajorBob on 7 Jan 2010 02:29 > Bobby, you're looking at how machine reals are *encoded*, and a > *subset* of them is encoded as if they were precise rationals, as you > say. But what matters is how they *behave*. If RootApproximant(a)RandomReal[] succeeds, that random number is algebraic, according to Mathematica... yes or no? RootApproximant(a)RandomReal[] Root[3 - #1 - #1^3 - #1^4 - 4 #1^5 + 4 #1^6 - 2 #1^7 + 2 #1^8 + #1^9 + #1^10 - 2 #1^11 - 2 #1^12 + #1^14 &, 1] (It succeeds every time, as far as I can tell.) Does that constitute behaving like an algebraic number? Bobby On Wed, 06 Jan 2010 04:59:52 -0600, Noqsi <jpd(a)noqsi.com> wrote: > On Jan 4, 11:46 pm, DrMajorBob <btre...(a)austin.rr.com> wrote: >> Computer reals are precisely equal to, > > No. Computer reals are imprecise. That's the source of their utility. > And their difficulties. > >> and in one-to-one correspondence >> with, a miniscule subset of the rationals. Every one of them has a >> finite >> binary expansion. > > This proves only that they are contained within a finite set. > > But it makes much more sense to consider the correspondence as one-to- > uncountably-many: each individual machine real represents every real > number within an interval determined by its precision. Except for > those that don't represent numbers at all. > >> >> x = RandomReal[] >> digitForm = RealDigits@x; >> Length(a)First@digitForm >> rationalForm = FromDigits(a)digitForm >> {n, d} = Through[{Numerator, Denominator}@rationalForm] >> d x == n >> >> 0.217694 >> >> 16 >> >> 1088471616079187/5000000000000000 >> >> {1088471616079187, 5000000000000000} >> >> True > > Proves nothing. > > 0.1 == 1/10 > True > > Now, 1/10 is *not* a member of the "miniscule subset of rationals" you > referred to above, and the machine number 0.1 does not precisely > represent it: > > RealDigits[0.1,2] > {{1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,1,0},-3} > > Note that the representation is finite and the last two bits reflect > rounding. > > Nevertheless, the machine manages to create a representation of 0.1, > and even reports it to be equal to 1/10. Now, if machine reals behaved > as if they were "precisely equal to ... a miniscule subset of > rationals" neither of these achievements would be possible. Their > imprecision makes this possible. > >> >> A number can't get more rational or algebraic (solving a FIRST degree >> polynomial with integer coefficients) than that. > > All you've done is to find a number with that property equal to x > within machine precision. But since there is, in fact, an infinite set > of such numbers, finding one isn't remarkable. > >> >> If computer reals are THE reals, > > I never said they were. Go back and read what I wrote. > >> why is it that RandomReal[{3,4}] can >> never return Pi, Sqrt[11], or ANY irrational? > > Well, I'm not patient enough for RandomReal[{3,4}]. But, > > Map[Pi==#&,RandomReal[{3.14159265358970,3.14159265358980},10]] > {False,True,False,False,False,True,False,True,False,False} > > Seems we can easily get Pi from RandomReal. And no, I'm not cheating: > the numbers that yielded True here are equal to Pi in the only sense > that matters with an imprecise number: they are equal to Pi within > their precision. > > Bobby, you're looking at how machine reals are *encoded*, and a > *subset* of them is encoded as if they were precise rationals, as you > say. But what matters is how they *behave*. They do not generally > behave like precise rationals: they behave imprecisely. And what > rational number does a NaN encode? > > Rational addition and multiplication are associative, but machine real > arithmetic isn't. > > Rational arithmetic is distributive, but machine real arithmetic > isn't. > > etc. > > Machine reals are not the reals or the rationals: they are themselves, > with their own special properties. Those who reason as if machine > reals are either real or rational often suffer adverse consequences. > Much of the art of numerical analysis depends upon understanding these > special properties and their consequences. > -- DrMajorBob(a)yahoo.com
From: DrMajorBob on 7 Jan 2010 02:28 > Well, I think when you are using Mathematica it is the designers of > Mathematica who decide what is rational and what is not. Not to repeat myself, but RootApproximant said 100 out of 100 randomly chosen machine-precision reals ARE algebraic. If your interpretation is correct and consistent with Mathematica, and if Mathematica is internally consistent on the topic, virtually all of those reals should NOT have been algebraic. Mathematica designers wrote RootApproximant, I assume? Hence, I'd have to say your interpretation is no better than mine. Bobby On Wed, 06 Jan 2010 04:57:26 -0600, Andrzej Kozlowski <akoz(a)mimuw.edu.pl> wrote: > Well, I think when you are using Mathematica it is the designers of > Mathematica who decide what is rational and what is not. > > And when you are not using Mathematica (or other similar software which > interprets certain computer data as numbers), than I can't imagine what > you could possibly mean by a "computer number". > > Andrzej > > > On 6 Jan 2010, at 11:45, DrMajorBob wrote: > >> Obviously, it DOES make them rational "in a sense"... the sense in > which I mean it, for example. >> >> Bobby >> >> On Tue, 05 Jan 2010 20:41:34 -0600, Andrzej Kozlowski > <akoz(a)mimuw.edu.pl> wrote: >> >>> >>> On 6 Jan 2010, at 11:13, DrMajorBob wrote: >>> >>>> I completely understand that Mathematica considers 1.2 Real, not > Rational... but that's a software design decision, not an objective > fact. >>> >>> I think we are talking cross purposes. You seem to believe (correct > me if I am wrong) that numbers somehow "exist". Well, I have never seen > one - and that applies equally to irrational and rationals and even > (contrary to Kronecker) integers. I do not know what the number 3 looks > like, nor what 1/3 looks like (I know how we denote them, but that's not > the sam thing). So I do not think that the notion of "computer numbers" > makes any sense and hence to say that all computer numbers are rational > also does not make sense. There are only certain things that we > interpret as numbers and when we interpret them as rationals they are > rationals and when we interpret them as non-computable reals than they > are just that. >>> Of course we know that a computer can only store a finite number of > such objects at a given time, but that fact in no sense makes them > "rational". >>> >>> Andrzej Kozlowski >> >> >> -- >> DrMajorBob(a)yahoo.com > > -- DrMajorBob(a)yahoo.com
From: Andrzej Kozlowski on 7 Jan 2010 02:29 It is not at all beside the point. There is no natural phenomenon in the world where an actual choice is being made out of an uncountable number of possibilities, but we constantly model reality with continuous distributions. What Mathematica does it the same thing. If you like, it simulates the behaviour of continuous distribution. For example RandomReal[NormalDistribution[0, 1], {10}] is simulating a choice of 10 values from a normal distribution which have to be non-computable reals for mathematical reasons. The mathematical structure of a continuous distribution is quite different from a discrete distribution, although what actually happens in the computer involves of course a finite number of objects. The essential point is that the mathematics of what is being simulated is quite different. Andrzej Kozlowski On 6 Jan 2010, at 23:46, DrMajorBob wrote: > We've already noted that RandomReal[] outputs are not only of measure zero... but also finite. > > Hence, arguing that computable numbers have measure zero and hence can't be RandomReal[] outputs, seems beside the point. > > Bobby > > On Wed, 06 Jan 2010 04:56:38 -0600, Andrzej Kozlowski <akoz(a)mimuw.edu.pl> wrote: > >> >> On 5 Jan 2010, at 15:47, DrMajorBob wrote: >> >>> If computer reals are THE reals, why is it that RandomReal[{3,4}] can >>> never return Pi, Sqrt[11], or ANY irrational? >> >> It can't possibly do that because these are computable real numbers the >> set of computable real numbers if countable and has measure 0. >> Computable numbers can never be the outcome of any distribution that >> selects numbers randomly from a real interval. >> >> The most common mistake people make about real numbers is to think that >> numbers such as Sqrt[2] or Pi as being in some sense typical examples of >> an irrational number or a transcendental number but they are not. They >> are very untypical because they are computable: that is, there exists a >> formula for computing as many of their digits as you like. But we can >> prove that the set of all reals with this property is countable and of >> measure 0. So Sqrt[2] is a very untypical irrational and Pi a very >> untypical transcendental. So what do typical real look like? Well, I >> think since a "typical" real is not computable we cannot know all of its >> digits and we cannot know any formula for computing them. But we can >> know a finite number of these digits. So this looks to me very much like >> the Mathematica concept of Real - you know a specified number of >> significant digits and you know that there are infinitely many more than >> you do not know. It seems to me the most natural way to think about >> non-computable reals. >> >> Roger Penrose, by the way, is famous for arguing that our brain is >> somehow able to work with non-computable quantities, although of course >> not by using digital expansions. But this involves quantum physics and >> has been the object of a heated dispute since the appearance of "The >> emperor's New Mind". >> >> >> > > > -- > DrMajorBob(a)yahoo.com
From: Andrzej Kozlowski on 7 Jan 2010 02:30
On 7 Jan 2010, at 04:19, DrMajorBob wrote: >> Well, I think when you are using Mathematica it is the designers of >> Mathematica who decide what is rational and what is not. > > Not to repeat myself, but RootApproximant said 100 out of 100 randomly chosen machine-precision reals ARE algebraic. No, they are not real algebraic. RootApproximant gives algebraic approximations to these numbers and in fact it uses a test for what makes a good approximation. In never says that these numbers themselves are algebraic. You have been completely confused about this. The method RootApproximant uses is the LLL method, which finds approximations. Because of this it will give you a number of different approximations for the same real. For example In[7]:= RootApproximant[N[Pi, 10], 2] Out[7]= (1/490)*(71 + Sqrt[2156141]) In[8]:= RootApproximant[N[Pi, 10], 3] Out[8]= Root[37 #1^3-114 #1^2-36 #1+91&,3] So how come N[Pi,10] is equal to two quite different algebraic numbers? You should first understand what an algorithm does (e.g. RootApproximant) before making weird claims about it. (In fact Daniel Lichtblau already explained this but you just seem to have ignored it). Andrzej Kozlowski > > If your interpretation is correct and consistent with Mathematica, and if Mathematica is internally consistent on the topic, virtually all of those reals should NOT have been algebraic. > > Mathematica designers wrote RootApproximant, I assume? > > Hence, I'd have to say your interpretation is no better than mine. > > Bobby > > On Wed, 06 Jan 2010 04:57:26 -0600, Andrzej Kozlowski <akoz(a)mimuw.edu.pl> wrote: > >> Well, I think when you are using Mathematica it is the designers of >> Mathematica who decide what is rational and what is not. >> >> And when you are not using Mathematica (or other similar software which >> interprets certain computer data as numbers), than I can't imagine what >> you could possibly mean by a "computer number". >> >> Andrzej >> >> >> On 6 Jan 2010, at 11:45, DrMajorBob wrote: >> >>> Obviously, it DOES make them rational "in a sense"... the sense in >> which I mean it, for example. >>> >>> Bobby >>> >>> On Tue, 05 Jan 2010 20:41:34 -0600, Andrzej Kozlowski >> <akoz(a)mimuw.edu.pl> wrote: >>> >>>> >>>> On 6 Jan 2010, at 11:13, DrMajorBob wrote: >>>> >>>>> I completely understand that Mathematica considers 1.2 Real, not >> Rational... but that's a software design decision, not an objective >> fact. >>>> >>>> I think we are talking cross purposes. You seem to believe (correct >> me if I am wrong) that numbers somehow "exist". Well, I have never seen >> one - and that applies equally to irrational and rationals and even >> (contrary to Kronecker) integers. I do not know what the number 3 looks >> like, nor what 1/3 looks like (I know how we denote them, but that's not >> the sam thing). So I do not think that the notion of "computer numbers" >> makes any sense and hence to say that all computer numbers are rational >> also does not make sense. There are only certain things that we >> interpret as numbers and when we interpret them as rationals they are >> rationals and when we interpret them as non-computable reals than they >> are just that. >>>> Of course we know that a computer can only store a finite number of >> such objects at a given time, but that fact in no sense makes them >> "rational". >>>> >>>> Andrzej Kozlowski >>> >>> >>> -- >>> DrMajorBob(a)yahoo.com >> >> > > > -- > DrMajorBob(a)yahoo.com |