Re: Working with the set of real numbers

2014-03-06 Thread Oscar Benjamin
On 5 March 2014 12:57, Dave Angel da...@davea.name wrote: Oscar Benjamin oscar.j.benja...@gmail.com Wrote in message: On 4 March 2014 23:20, Dave Angel da...@davea.name wrote: On the assumption that division by 2 is very fast, and that a general multiply isn't too bad, you could improve on

Re: Working with the set of real numbers

2014-03-06 Thread Chris Angelico
On Thu, Mar 6, 2014 at 11:27 PM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: So my loop while x ** 2 - y x * eps: x = (x + y/x) / 2 and Chris' loop: while abs(guess1-guess2) epsilon: guess1 = n/guess2 guess2 = (guess1 + guess2)/2 and now

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-05 Thread Steven D'Aprano
Following up on my own post. On Wed, 05 Mar 2014 07:52:01 +, Steven D'Aprano wrote: On Tue, 04 Mar 2014 23:25:37 -0500, Roy Smith wrote: I stopped paying attention to mathematicians when they tried to convince me that the sum of all natural numbers is -1/12. [...] In effect, the author

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-05 Thread wxjmfauth
Mathematics? The Flexible String Representation is a very nice example of a mathematical absurdity. jmf PS Do not even think to expect to contradict me. Hint: sheet of paper and pencil. -- https://mail.python.org/mailman/listinfo/python-list

Re: Working with the set of real numbers

2014-03-05 Thread Ned Batchelder
On 3/5/14 4:00 AM, wxjmfa...@gmail.com wrote: Mathematics? The Flexible String Representation is a very nice example of a mathematical absurdity. jmf PS Do not even think to expect to contradict me. Hint: sheet of paper and pencil. Reminder to everyone: JMF makes no sense when he talks

Re: Working with the set of real numbers

2014-03-05 Thread Oscar Benjamin
On 4 March 2014 23:20, Dave Angel da...@davea.name wrote: One problem with complexity claims is that it's easy to miss some contributing time eaters. I haven't done any measuring on modern machines nor in python, but I'd assume that multiplies take *much* longer for large integers, and

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-05 Thread Oscar Benjamin
On 5 March 2014 07:52, Steven D'Aprano st...@pearwood.info wrote: On Tue, 04 Mar 2014 23:25:37 -0500, Roy Smith wrote: I stopped paying attention to mathematicians when they tried to convince me that the sum of all natural numbers is -1/12. I'm pretty sure they did not. Possibly a physicist

Re: Working with the set of real numbers

2014-03-05 Thread Mark Lawrence
On 05/03/2014 12:21, Oscar Benjamin wrote: Why the dig at physicists? I think most physicists would be able to tell you that the sum of all natural numbers is not -1/12. In fact most people with very little background in mathematics can tell you that. I'll put that one to the test tomorrow

Re: Working with the set of real numbers

2014-03-05 Thread Dave Angel
Oscar Benjamin oscar.j.benja...@gmail.com Wrote in message: On 4 March 2014 23:20, Dave Angel da...@davea.name wrote: One problem with complexity claims is that it's easy to miss some contributing time eaters. I haven't done any measuring on modern machines nor in python, but I'd assume

Re: Working with the set of real numbers

2014-03-05 Thread Dave Angel
Dave Angel da...@davea.name Wrote in message: Oscar Benjamin oscar.j.benja...@gmail.com Wrote in message: On 4 March 2014 23:20, Dave Angel da...@davea.name wrote: If anyone is curious, I'll be glad to describe the algorithm; I've never seen it published, before or since. I got my

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-05 Thread Steven D'Aprano
On Wed, 05 Mar 2014 12:21:37 +, Oscar Benjamin wrote: On 5 March 2014 07:52, Steven D'Aprano st...@pearwood.info wrote: On Tue, 04 Mar 2014 23:25:37 -0500, Roy Smith wrote: I stopped paying attention to mathematicians when they tried to convince me that the sum of all natural numbers is

Re: Working with the set of real numbers

2014-03-05 Thread Steven D'Aprano
On Wed, 05 Mar 2014 12:50:06 +, Mark Lawrence wrote: On 05/03/2014 12:21, Oscar Benjamin wrote: Why the dig at physicists? I think most physicists would be able to tell you that the sum of all natural numbers is not -1/12. In fact most people with very little background in mathematics

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-05 Thread Chris Angelico
On Thu, Mar 6, 2014 at 4:43 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Physics is the fundamental science, at least according to the physicists, and Real Soon Now they'll have a Theory Of Everything, something small enough to print on a tee-shirt, which will explain

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-05 Thread Chris Kaynor
On Wed, Mar 5, 2014 at 9:43 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: At one time, Euler summed an infinite series and got -1, from which he concluded that -1 was (in some sense) larger than infinity. I don't know what justification he gave, but the way I think of it is

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-05 Thread Grant Edwards
On 2014-03-05, Chris Kaynor ckay...@zindagigames.com wrote: On Wed, Mar 5, 2014 at 9:43 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: At one time, Euler summed an infinite series and got -1, from which he concluded that -1 was (in some sense) larger than infinity. I don't

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-05 Thread Oscar Benjamin
On 5 March 2014 17:43, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Wed, 05 Mar 2014 12:21:37 +, Oscar Benjamin wrote: The argument that the sum of all natural numbers comes to -1/12 is just some kind of hoax. I don't think *anyone* seriously believes it. You would be

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-05 Thread Roy Smith
In article 53176225$0$29987$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Physics is the fundamental science, at least according to the physicists, and Real Soon Now they'll have a Theory Of Everything, something small enough to print on a

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-05 Thread Steven D'Aprano
On Wed, 05 Mar 2014 21:31:51 -0500, Roy Smith wrote: In article 53176225$0$29987$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Physics is the fundamental science, at least according to the physicists, and Real Soon Now they'll have a Theory

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-05 Thread Chris Angelico
On Thu, Mar 6, 2014 at 2:06 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: They ask a computer programmer to adjudicate who is right, so he writes a program to print out all the primes: 1 is prime 1 is prime 1 is prime 1 is prime 1 is prime And he claimed that he was

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-05 Thread Grant Edwards
On 2014-03-06, Roy Smith r...@panix.com wrote: In article 53176225$0$29987$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Physics is the fundamental science, at least according to the physicists, and Real Soon Now they'll have a Theory Of

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-05 Thread Roy Smith
In article 5317e640$0$29985$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Wed, 05 Mar 2014 21:31:51 -0500, Roy Smith wrote: In article 53176225$0$29987$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano

Re: Working with the set of real numbers

2014-03-04 Thread Gregory Ewing
Chris Angelico wrote: In constant space, that will produce the sum of two infinite sequences of digits. It's not constant space, because the nines counter can grow infinitely large. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-04 Thread Ian Kelly
On Mon, Mar 3, 2014 at 11:35 PM, Chris Angelico ros...@gmail.com wrote: In constant space, that will produce the sum of two infinite sequences of digits. (And it's constant time, too, except when it gets a stream of nines. Adding three thirds together will produce an infinite loop as it waits

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-04 Thread Ian Kelly
On Tue, Mar 4, 2014 at 4:19 AM, Ian Kelly ian.g.ke...@gmail.com wrote: def cf_sqrt(n): Yield the terms of the square root of n as a continued fraction. m = 0 d = 1 a = a0 = floor_sqrt(n) while True: yield a next_m = d * a - m next_d = (n - next_m

Re: Working with the set of real numbers

2014-03-04 Thread Chris Angelico
On Tue, Mar 4, 2014 at 10:05 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Chris Angelico wrote: In constant space, that will produce the sum of two infinite sequences of digits. It's not constant space, because the nines counter can grow infinitely large. Okay, okay, technically

Re: Working with the set of real numbers

2014-03-04 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: As far as I know, there's no simple way, in constant space and/or time, to progressively yield more digits of a number's square root, working in decimal. I don't know why the constant space/time requirement is crucial. Anyway, producing more digits simple:

Re: Working with the set of real numbers

2014-03-04 Thread Chris Angelico
On Wed, Mar 5, 2014 at 6:49 AM, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: As far as I know, there's no simple way, in constant space and/or time, to progressively yield more digits of a number's square root, working in decimal. I don't know why the constant

Re: Working with the set of real numbers

2014-03-04 Thread Oscar Benjamin
On 4 March 2014 19:58, Chris Angelico ros...@gmail.com wrote: On Wed, Mar 5, 2014 at 6:49 AM, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: As far as I know, there's no simple way, in constant space and/or time, to progressively yield more digits of a number's square

Re: Working with the set of real numbers

2014-03-04 Thread Marko Rauhamaa
Oscar Benjamin oscar.j.benja...@gmail.com: To me the obvious method is Newton iteration which takes O(sqrt(N)) iterations to obtain N digits of precision. This brings the above complexity below quadratic: #!/usr/bin/env python from decimal import Decimal as D, localcontext def sqrt(y,

Re: Working with the set of real numbers

2014-03-04 Thread Chris Angelico
On Wed, Mar 5, 2014 at 7:55 AM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: I don't quite follow your reasoning here. By cut-and-try do you mean bisection? If so it gives the first N decimal digits in N*log2(10) iterations. However each iteration requires a multiply and when the number of

Re: Working with the set of real numbers

2014-03-04 Thread Oscar Benjamin
On 4 March 2014 21:18, Chris Angelico ros...@gmail.com wrote: On Wed, Mar 5, 2014 at 7:55 AM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: I don't quite follow your reasoning here. By cut-and-try do you mean bisection? If so it gives the first N decimal digits in N*log2(10) iterations.

Re: Working with the set of real numbers

2014-03-04 Thread Oscar Benjamin
On 4 March 2014 21:05, Marko Rauhamaa ma...@pacujo.net wrote: Oscar Benjamin oscar.j.benja...@gmail.com: To me the obvious method is Newton iteration which takes O(sqrt(N)) iterations to obtain N digits of precision. This brings the above complexity below quadratic: #!/usr/bin/env python

Re: Working with the set of real numbers

2014-03-04 Thread Chris Angelico
On Wed, Mar 5, 2014 at 9:02 AM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: On 4 March 2014 21:18, Chris Angelico ros...@gmail.com wrote: On Wed, Mar 5, 2014 at 7:55 AM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: I don't quite follow your reasoning here. By cut-and-try do you mean

Re: Working with the set of real numbers

2014-03-04 Thread Oscar Benjamin
On 4 March 2014 22:18, Chris Angelico ros...@gmail.com wrote: On Wed, Mar 5, 2014 at 9:02 AM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: On 4 March 2014 21:18, Chris Angelico ros...@gmail.com wrote: On Wed, Mar 5, 2014 at 7:55 AM, Oscar Benjamin oscar.j.benja...@gmail.com wrote:

Re: Working with the set of real numbers

2014-03-04 Thread Chris Angelico
On Wed, Mar 5, 2014 at 9:54 AM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: Let's compare two versions. In the first, you set the precision (I'm talking in terms of REXX's NUMERIC DIGITS statement I have no idea what that is. - anything beyond this many digits will be rounded (and

Re: Working with the set of real numbers

2014-03-04 Thread Dave Angel
Oscar Benjamin oscar.j.benja...@gmail.com Wrote in message: On 4 March 2014 21:18, Chris Angelico ros...@gmail.com wrote: It does not take O(n*n) time. This is Newton iteration and for well-behaved problems such as this it generates more than n digits after n iterations. I modified my code

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-04 Thread Albert van der Horst
In article mailman.7702.1393932047.18130.python-l...@python.org, Ian Kelly ian.g.ke...@gmail.com wrote: On Mon, Mar 3, 2014 at 11:35 PM, Chris Angelico ros...@gmail.com wrote: In constant space, that will produce the sum of two infinite sequences of digits. (And it's constant time, too, except

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-04 Thread Albert van der Horst
In article mailman.7687.1393902132.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Tue, Mar 4, 2014 at 1:45 PM, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: No, the Python built-in float type works with a subset of real numbers: To be more precise: a subset of

Re: Working with the set of real numbers

2014-03-04 Thread Albert van der Horst
In article 87fvnm7q1n@elektro.pacujo.net, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: On Fri, Feb 14, 2014 at 1:00 AM, Marko Rauhamaa ma...@pacujo.net wrote: Well, if your idealized, infinite, digital computer had ℵ₁ bytes of RAM and ran at ℵ₁ hertz and

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-04 Thread Steven D'Aprano
On Wed, 05 Mar 2014 02:15:14 +, Albert van der Horst wrote: Adding cf's adds all computable numbers in infinite precision. However that is not even a drop in the ocean, as the computable numbers have measure zero. On the other hand, it's not really clear that the non-computable numbers

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-04 Thread Rustom Mody
On Wednesday, March 5, 2014 9:11:13 AM UTC+5:30, Steven D'Aprano wrote: On Wed, 05 Mar 2014 02:15:14 +, Albert van der Horst wrote: Adding cf's adds all computable numbers in infinite precision. However that is not even a drop in the ocean, as the computable numbers have measure zero.

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-04 Thread Roy Smith
In article c39d5b44-6c7b-40d1-bbb5-791a36af6...@googlegroups.com, Rustom Mody rustompm...@gmail.com wrote: I cannot find the exact quote so from memory Weyl says something to this effect: Cantor's diagonalization PROOF is not in question. Its CONCLUSION very much is. The

Re: Working with the set of real numbers

2014-03-04 Thread Ben Finney
Roy Smith r...@panix.com writes: I stopped paying attention to mathematicians when they tried to convince me that the sum of all natural numbers is -1/12. I stopped paying attention to a particular person when they said “I stopped paying attention to an entire field of study because one

Re: Working with the set of real numbers

2014-03-04 Thread Rustom Mody
On Wednesday, March 5, 2014 10:07:44 AM UTC+5:30, Ben Finney wrote: Roy Smith writes: I stopped paying attention to mathematicians when they tried to convince me that the sum of all natural numbers is -1/12. I stopped paying attention to a particular person when they said I stopped

Re: Working with the set of real numbers

2014-03-04 Thread Roy Smith
In article mailman.7792.1393994283.18130.python-l...@python.org, Ben Finney ben+pyt...@benfinney.id.au wrote: Roy Smith r...@panix.com writes: I stopped paying attention to mathematicians when they tried to convince me that the sum of all natural numbers is -1/12. I stopped paying

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-04 Thread Steven D'Aprano
On Tue, 04 Mar 2014 23:25:37 -0500, Roy Smith wrote: I stopped paying attention to mathematicians when they tried to convince me that the sum of all natural numbers is -1/12. I'm pretty sure they did not. Possibly a physicist may have tried to tell you that, but most mathematicians consider

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-03 Thread Albert van der Horst
In article mailman.6735.1392194885.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Wed, Feb 12, 2014 at 7:17 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Angelico ros...@gmail.com writes: I have yet to find any computer that works with the set of real numbers

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-03 Thread Chris Angelico
On Tue, Mar 4, 2014 at 1:45 PM, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: No, the Python built-in float type works with a subset of real numbers: To be more precise: a subset of the rational numbers, those with a denominator that is a power of two. And no more than N bits (53 in a

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-03 Thread Rustom Mody
On Tuesday, March 4, 2014 8:32:01 AM UTC+5:30, Chris Angelico wrote: On Tue, Mar 4, 2014 at 1:45 PM, Albert van der Horst wrote: No, the Python built-in float type works with a subset of real numbers: To be more precise: a subset of the rational numbers, those with a denominator that is a

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-03 Thread Chris Angelico
On Tue, Mar 4, 2014 at 2:13 PM, Rustom Mody rustompm...@gmail.com wrote: But it's a far cry from all real numbers. Even allowing for continued fractions adds only some more; I don't think you can represent surds that way. See

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-03 Thread Rustom Mody
On Tuesday, March 4, 2014 9:16:25 AM UTC+5:30, Chris Angelico wrote: On Tue, Mar 4, 2014 at 2:13 PM, Rustom Mody wrote: But it's a far cry from all real numbers. Even allowing for continued fractions adds only some more; I don't think you can represent surds that way. See

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-03 Thread Steven D'Aprano
On Tue, 04 Mar 2014 14:46:25 +1100, Chris Angelico wrote: That's neat, didn't know that. Is there an efficient way to figure out, for any integer N, what its sqrt's CF sequence is? And what about the square roots of non-integers - can you represent √π that way? I suspect, though I can't

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-03 Thread Chris Angelico
On Tue, Mar 4, 2014 at 4:53 PM, Steven D'Aprano st...@pearwood.info wrote: On Tue, 04 Mar 2014 14:46:25 +1100, Chris Angelico wrote: That's neat, didn't know that. Is there an efficient way to figure out, for any integer N, what its sqrt's CF sequence is? And what about the square roots of

Re: Working with the set of real numbers

2014-02-14 Thread Gregory Ewing
Devin Jeanpierre wrote: There is no way to iterate over all the reals one at a time, no matter how fast you execute instructions. If you could, it would be trivial to show that the reals have the same cardinality as the positive integers: correspond n with the whatever is returned by the nth

Re: Working with the set of real numbers

2014-02-14 Thread Dave Angel
Chris Angelico ros...@gmail.com Wrote in message: On Fri, Feb 14, 2014 at 5:37 PM, Gregory Ewing If it's a quantum computer, it may be able to execute all branches of the iteration in parallel. But it would only have a probability of returning the right answer (in other cases it would

Re: Working with the set of real numbers

2014-02-14 Thread Rustom Mody
On Friday, February 14, 2014 12:14:31 PM UTC+5:30, Chris Angelico wrote: Oh, that's fine, he's not my cat anyway. Go ahead, build it. Now Now! I figured you were the cat out here! -- https://mail.python.org/mailman/listinfo/python-list

Re: Working with the set of real numbers

2014-02-14 Thread Grant Edwards
On 2014-02-14, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: If it's a quantum computer, it may be able to execute all branches of the iteration in parallel. But it would only have a probability of returning the right answer (in other cases it would kill your cat). I know somebody who

Re: Working with the set of real numbers

2014-02-14 Thread Devin Jeanpierre
On Fri, Feb 14, 2014 at 3:30 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Devin Jeanpierre wrote: There is no way to iterate over all the reals one at a time, no matter how fast you execute instructions. If you could, it would be trivial to show that the reals have the same cardinality

Re: Working with the set of real numbers

2014-02-13 Thread Oscar Benjamin
On 12 February 2014 10:07, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Angelico ros...@gmail.com writes: On Wed, Feb 12, 2014 at 7:56 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: So, if I understand you right, you want to say that you've not found a computer that works with the

Re: Working with the set of real numbers

2014-02-13 Thread Marko Rauhamaa
Oscar Benjamin oscar.j.benja...@gmail.com: This isn't even a question of resource constraints: a digital computer with infinite memory and computing power would still be limited to working with countable sets, and the real numbers are just not countable. The fundamentally discrete nature of

Re: Working with the set of real numbers

2014-02-13 Thread Ben Finney
Oscar Benjamin oscar.j.benja...@gmail.com writes: I think Chris' statement above is pretty clear. I disagree, as explained. Also I didn't find the original statement confusing I'm happy for you. and it is a reasonable point to make. Yes, and I was not addressing that. -- \ “It

Re: Working with the set of real numbers

2014-02-13 Thread Chris Angelico
On Fri, Feb 14, 2014 at 1:00 AM, Marko Rauhamaa ma...@pacujo.net wrote: Well, if your idealized, infinite, digital computer had ℵ₁ bytes of RAM and ran at ℵ₁ hertz and Python supported transfinite iteration, you could easily do reals: def real_sqrt(y): for x in continuum(0,

Re: Working with the set of real numbers

2014-02-13 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: On Fri, Feb 14, 2014 at 1:00 AM, Marko Rauhamaa ma...@pacujo.net wrote: Well, if your idealized, infinite, digital computer had ℵ₁ bytes of RAM and ran at ℵ₁ hertz and Python supported transfinite iteration, you could easily do reals: for x in

Re: Working with the set of real numbers

2014-02-13 Thread Chris Angelico
On Fri, Feb 14, 2014 at 6:47 AM, Marko Rauhamaa ma...@pacujo.net wrote: My assumption was you could execute ℵ₁ statements per second. That doesn't guarantee a finite finish time but would make it possible. That is because ℵ₁ * ℵ₁ = ℵ₁ = ℵ₁ * 1 Hmm. I never actually covered this stuff in

Re: Working with the set of real numbers

2014-02-13 Thread Rotwang
What's this? A discussion about angels dancing on a the head of a pin? Great, I'm in. On 13/02/2014 14:00, Marko Rauhamaa wrote: Oscar Benjamin oscar.j.benja...@gmail.com: This isn't even a question of resource constraints: a digital computer with infinite memory and computing power would

Re: Working with the set of real numbers

2014-02-13 Thread Marko Rauhamaa
Rotwang sg...@hotmail.co.uk: for x in continuum(0, max(1, y)): # Note: x is not traversed in the order but some other # well-ordering, which has been proved to exist. if x * x == y: return x [...] More importantly, though,

Re: Working with the set of real numbers

2014-02-13 Thread Rotwang
On 13/02/2014 22:00, Marko Rauhamaa wrote: Rotwang sg...@hotmail.co.uk: for x in continuum(0, max(1, y)): # Note: x is not traversed in the order but some other # well-ordering, which has been proved to exist. if x * x == y:

Re: Working with the set of real numbers

2014-02-13 Thread Marko Rauhamaa
Rotwang sg...@hotmail.co.uk: But my point was that it can't carry out those ℵ₁ discrete steps in finite time (assuming that time is real-valued), because there's no way to embed them in any time interval without changing their order. I'd have to think so I take your word for it. Marko --

Re: Working with the set of real numbers

2014-02-13 Thread Gregory Ewing
Dave Angel wrote: Actually, the particular example you use can be done. When printing the infinite sum of two infinite decimal streams, you can simply hold back whenever you get one or more nines. But you only have a finite amount of space for keeping track of how many nines you've seen,

Re: Working with the set of real numbers

2014-02-13 Thread Devin Jeanpierre
On Thu, Feb 13, 2014 at 11:47 AM, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: On Fri, Feb 14, 2014 at 1:00 AM, Marko Rauhamaa ma...@pacujo.net wrote: Well, if your idealized, infinite, digital computer had ℵ₁ bytes of RAM and ran at ℵ₁ hertz and Python supported

Re: Working with the set of real numbers

2014-02-13 Thread Gregory Ewing
Chris Angelico wrote: Even adding to your requirements that it have an ℵ₁ Hz bus (which, by the way, I *totally* want - the uses are endless), it would take a finite amount of time to assign to x the next number, ergo your algorithm can't guarantee to finish in finite time. If it's a quantum

Re: Working with the set of real numbers

2014-02-13 Thread Chris Angelico
On Fri, Feb 14, 2014 at 5:37 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Chris Angelico wrote: Even adding to your requirements that it have an ℵ₁ Hz bus (which, by the way, I *totally* want - the uses are endless), it would take a finite amount of time to assign to x the next

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-02-12 Thread wxjmfauth
Integers are integers. (1) Characters are characters. (2) (1) is a unique natural set. (2) is an artificial construct working with 3 sets (unicode). jmf -- https://mail.python.org/mailman/listinfo/python-list

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-02-12 Thread Chris Angelico
On Wed, Feb 12, 2014 at 7:17 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Angelico ros...@gmail.com writes: I have yet to find any computer that works with the set of real numbers in any way. Never mind optimization, they simply cannot work with real numbers. Not *any* computer?

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-02-12 Thread wxjmfauth
Le mercredi 12 février 2014 09:35:38 UTC+1, wxjm...@gmail.com a écrit : Integers are integers. (1) Characters are characters. (2) (1) is a unique natural set. (2) is an artificial construct working with 3 sets (unicode). jmf Addendum: One should not confuse unicode and

Re: Working with the set of real numbers

2014-02-12 Thread Ben Finney
wxjmfa...@gmail.com writes: (2) is an artificial construct working with 3 sets (unicode). jmf, you are being exceedingly disruptive: attempting to derail unrelated discussions for your favourite hobby-horse topic. Please stop. Everyone else: Please don't engage these attempts; instead, avoid

Re: Working with the set of real numbers

2014-02-12 Thread Ben Finney
Chris Angelico ros...@gmail.com writes: On Wed, Feb 12, 2014 at 7:17 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Angelico ros...@gmail.com writes: I have yet to find any computer that works with the set of real numbers in any way. Never mind optimization, they simply cannot

Re: Working with the set of real numbers

2014-02-12 Thread Chris Angelico
On Wed, Feb 12, 2014 at 7:56 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: So, if I understand you right, you want to say that you've not found a computer that works with the *complete* set of real numbers. Yes? Correct. When jmf referred to real numbers, he implied that there are no

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-02-12 Thread Jussi Piitulainen
Chris Angelico writes: On Wed, Feb 12, 2014 at 7:17 PM, Ben Finney wrote: What specific behaviour would, for you, qualify as “works with the set of real numbers in any way”? Being able to represent surds, pi, e, etc, for a start. It'd theoretically be possible with an algebraic notation

Re: Working with the set of real numbers

2014-02-12 Thread Ben Finney
Chris Angelico ros...@gmail.com writes: On Wed, Feb 12, 2014 at 7:56 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: So, if I understand you right, you want to say that you've not found a computer that works with the *complete* set of real numbers. Yes? Correct. […] My point is that

Re: Working with the set of real numbers

2014-02-12 Thread Chris Angelico
On Wed, Feb 12, 2014 at 9:07 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Angelico ros...@gmail.com writes: On Wed, Feb 12, 2014 at 7:56 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: So, if I understand you right, you want to say that you've not found a computer that works

Re: Working with the set of real numbers

2014-02-12 Thread wxjmfauth
The fascinating aspect of this FSR lies in its mathematical absurdity. jmf -- https://mail.python.org/mailman/listinfo/python-list

Re: Working with the set of real numbers

2014-02-12 Thread Ben Finney
Chris Angelico ros...@gmail.com writes: On Wed, Feb 12, 2014 at 9:07 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: That's why I think you need to be clear that your point isn't “computers don't work with real numbers”, but rather “computers work only with a limited subset of real

Re: Working with the set of real numbers

2014-02-12 Thread Ned Batchelder
On 2/12/14 5:55 AM, wxjmfa...@gmail.com wrote: The fascinating aspect of this FSR lies in its mathematical absurdity. jmf Stop. -- Ned Batchelder, http://nedbatchelder.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Working with the set of real numbers

2014-02-12 Thread Chris Angelico
On Wed, Feb 12, 2014 at 10:44 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Angelico ros...@gmail.com writes: On Wed, Feb 12, 2014 at 9:07 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: That's why I think you need to be clear that your point isn't “computers don't work with

Re: Working with the set of real numbers

2014-02-12 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: Hmm, I'm not sure that my statement is false. If a computer can work with real numbers, then I would expect it to be able to work with any real number. In C, I can declare an 'int' variable, which can hold the real number 4 - does that mean that that variable

Re: Working with the set of real numbers

2014-02-12 Thread Chris Angelico
On Wed, Feb 12, 2014 at 11:48 PM, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: Hmm, I'm not sure that my statement is false. If a computer can work with real numbers, then I would expect it to be able to work with any real number. In C, I can declare an 'int'

Re: Working with the set of real numbers

2014-02-12 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: On Wed, Feb 12, 2014 at 11:48 PM, Marko Rauhamaa ma...@pacujo.net wrote: According to your definition, there's no computer in the world that can work with integers or text files. Integers as far as RAM will allow, usually (which is the same caveat as is used

Re: Working with the set of real numbers

2014-02-12 Thread Rustom Mody
On Wednesday, February 12, 2014 3:37:04 PM UTC+5:30, Ben Finney wrote: Chris Angelico writes: On Wed, Feb 12, 2014 at 7:56 PM, Ben Finney wrote: So, if I understand you right, you want to say that you've not found a computer that works with the *complete* set of real numbers. Yes?

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-02-12 Thread Grant Edwards
On 2014-02-12, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Angelico ros...@gmail.com writes: I have yet to find any computer that works with the set of real numbers in any way. Never mind optimization, they simply cannot work with real numbers. Not *any* computer? Not in *any* way?

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-02-12 Thread Gisle Vanem
Grant Edwards wrote: Not *any* computer? Not in *any* way? The Python built-in float type works with the set of real numbers, in a way. The only people who think that are people who don't actualy _use_ floating point types on computers. FPU parsing the IEEE spec, or?. I didn't quite parse

Re: Working with the set of real numbers

2014-02-12 Thread Chris Angelico
On Thu, Feb 13, 2014 at 1:13 AM, Marko Rauhamaa ma...@pacujo.net wrote: Text files suffer from the same caveat as integers: there's a limit to how much you can store on the physical computer. Sure, but nobody said the text file had to be _stored_ anywhere :) Computers are quite capable of

Re: Working with the set of real numbers

2014-02-12 Thread Ian Kelly
On Wed, Feb 12, 2014 at 7:11 AM, Rustom Mody rustompm...@gmail.com wrote: On Wednesday, February 12, 2014 3:37:04 PM UTC+5:30, Ben Finney wrote: Chris Angelico writes: On Wed, Feb 12, 2014 at 7:56 PM, Ben Finney wrote: So, if I understand you right, you want to say that you've not found

Re: Working with the set of real numbers

2014-02-12 Thread Gregory Ewing
Ben Finney wrote: That's why I think you need to be clear that your point isn't “computers don't work with real numbers”, but rather “computers work only with a limited subset of real numbers”. They actually work with a subset of *rational* numbers. All floats representable by a computer are

Re: Working with the set of real numbers

2014-02-12 Thread Gregory Ewing
Chris Angelico wrote: Sure, but nobody said the text file had to be _stored_ anywhere :) Computers are quite capable of working with streams of incoming data that are potentially infinite in size. However, they *can't* work with arbitrary real numbers in an exact way, even if they are

Re: Working with the set of real numbers

2014-02-12 Thread Gregory Ewing
Chris Angelico wrote: Of course a computer can work with _some_ real numbers; but only some. (An awful lot of them, of course. A ridiculously huge number of numbers. More numbers than you could read in a lifetime! While the number is extremely large, it still falls pitifully short of

Re: Working with the set of real numbers

2014-02-12 Thread Dave Angel
Gregory Ewing greg.ew...@canterbury.ac.nz Wrote in message: Chris Angelico wrote: Sure, but nobody said the text file had to be _stored_ anywhere :) Computers are quite capable of working with streams of incoming data that are potentially infinite in size. However, they *can't* work with

Re: Working with the set of real numbers

2014-02-12 Thread Grant Edwards
On 2014-02-12, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Chris Angelico wrote: Of course a computer can work with _some_ real numbers; but only some. (An awful lot of them, of course. A ridiculously huge number of numbers. More numbers than you could read in a lifetime! While the

Re: Working with the set of real numbers

2014-02-12 Thread Rustom Mody
On Thursday, February 13, 2014 2:15:28 AM UTC+5:30, Ian wrote: On Wed, Feb 12, 2014 at 7:11 AM, Rustom Mody wrote: On Wednesday, February 12, 2014 3:37:04 PM UTC+5:30, Ben Finney wrote: Chris Angelico writes: On Wed, Feb 12, 2014 at 7:56 PM, Ben Finney wrote: So, if I understand you

Re: Working with the set of real numbers

2014-02-12 Thread Steven D'Aprano
On Wed, 12 Feb 2014 21:07:04 +1100, Ben Finney wrote: Chris Angelico ros...@gmail.com writes: On Wed, Feb 12, 2014 at 7:56 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: So, if I understand you right, you want to say that you've not found a computer that works with the *complete* set

  1   2   >