Re: Can math.atan2 return INF?

2016-08-01 Thread Ian Kelly
On Sun, Jul 31, 2016 at 10:05 PM, Rustom Mody wrote: > All starts with the disorder in the middle-east and a whole lot of arbitrary > lines > drawn there > [Going backward in time] > - A line drawn in space called ‘Israel’ > - Based on a line drawn in time called the

Re: Can math.atan2 return INF?

2016-07-31 Thread Rustom Mody
On Monday, August 1, 2016 at 8:23:49 AM UTC+5:30, Steven D'Aprano wrote: > On Sat, 30 Jul 2016 03:46 pm, Rustom Mody wrote: > > > Lots of questions... I would guess rhetorical. > > They weren't rhetorical. > > You've made a lot of claims about the origins of computer science, and I've >

Re: Can math.atan2 return INF?

2016-07-31 Thread Rustom Mody
On Monday, August 1, 2016 at 9:12:00 AM UTC+5:30, Paul Rubin wrote: > Steven D'Aprano writes: > > If Intuitionism influenced computer science, where is the evidence of this? > > Where are the Intuitionist computer scientists? > > Pretty much all of them, I thought. E.g. programs Yeah… Saying

Re: Can math.atan2 return INF?

2016-07-31 Thread Paul Rubin
Steven D'Aprano writes: > If Intuitionism influenced computer science, where is the evidence of this? > Where are the Intuitionist computer scientists? Pretty much all of them, I thought. E.g. programs in typed lambda calculus amount to intuitionistic proofs of the

Re: Can math.atan2 return INF?

2016-07-31 Thread Steven D'Aprano
On Sat, 30 Jul 2016 03:46 pm, Rustom Mody wrote: > Lots of questions... I would guess rhetorical. They weren't rhetorical. You've made a lot of claims about the origins of computer science, and I've questioned some of your statements. Answers would be appreciated. > However under the

Re: Can math.atan2 return INF?

2016-07-29 Thread Rustom Mody
On Thursday, June 30, 2016 at 11:33:58 PM UTC+5:30, Steven D'Aprano wrote: > On Fri, 1 Jul 2016 01:28 am, Rustom Mody wrote: > > > On Thursday, June 30, 2016 at 1:55:18 PM UTC+5:30, Steven D'Aprano wrote: > > > >> you state that Turing "believes in souls" and that he "wishes to > >> put the soul

Re: Can math.atan2 return INF?

2016-07-24 Thread Rustom Mody
On Thursday, June 30, 2016 at 1:55:18 PM UTC+5:30, Steven D'Aprano wrote: > On Thursday 30 June 2016 12:13, Rustom Mody wrote: > > > In particular the question: "Are real numbers really real?" is where it > > starts off... http://blog.languager.org/2015/03/cs-history-0.html > > The pre-history

Re: Can math.atan2 return INF?

2016-07-01 Thread Marko Rauhamaa
Rustom Mody : > There are other more reasonable non-religious non-dualistic notions of > soul possible: Software engineers should have an easy time understanding what a soul is: a sufficiently sophisticated software system in execution. I'd say the minimum requirement for

Re: Can math.atan2 return INF?

2016-07-01 Thread Rustom Mody
On Thursday, June 30, 2016 at 11:33:58 PM UTC+5:30, Steven D'Aprano wrote: > On Fri, 1 Jul 2016 01:28 am, Rustom Mody wrote: > > > On Thursday, June 30, 2016 at 1:55:18 PM UTC+5:30, Steven D'Aprano wrote: > > > >> you state that Turing "believes in souls" and that he "wishes to > >> put the soul

Re: Can math.atan2 return INF?

2016-06-30 Thread Steven D'Aprano
On Fri, 1 Jul 2016 01:28 am, Rustom Mody wrote: > On Thursday, June 30, 2016 at 1:55:18 PM UTC+5:30, Steven D'Aprano wrote: > >> you state that Turing "believes in souls" and that he "wishes to >> put the soul into the machine" -- what do his religious beliefs have to >> do with his work? > >

Re: Can math.atan2 return INF?

2016-06-30 Thread Steven D'Aprano
On Thu, 30 Jun 2016 08:11 pm, Andreas Rc3b6hler wrote: > > > On 30.06.2016 10:24, Steven D'Aprano wrote: >> On Thursday 30 June 2016 12:13, Rustom Mody wrote: >> >> >> The irrational and emotional psychological forces that inspire >> mathematicians can make interesting reading, but they have no

Re: Can math.atan2 return INF?

2016-06-30 Thread Rustom Mody
On Thursday, June 30, 2016 at 1:55:18 PM UTC+5:30, Steven D'Aprano wrote: > you state that Turing "believes in souls" and that he "wishes to > put the soul into the machine" -- what do his religious beliefs have to do > with > his work? Bizarre question -- becomes more patently ridiculous

Re: Can math.atan2 return INF?

2016-06-30 Thread alister
On Thu, 30 Jun 2016 09:24:43 +0300, Marko Rauhamaa wrote: > Lawrence D’Oliveiro : >> Every time somebody tries to point to an example of a “topic that is >> beyond the reach of science”, it seems to get knocked over eventually. > > Of course, an experiment trumps theory,

Re: Can math.atan2 return INF?

2016-06-30 Thread Andreas Röhler
On 30.06.2016 11:42, Lawrence D’Oliveiro wrote: On Thursday, June 30, 2016 at 9:31:29 PM UTC+12, Andreas Röhler wrote: Science is not about believing, but about models. The nice thing about science is, it works even if you don’t believe in it. Thats it! --

Re: Can math.atan2 return INF?

2016-06-30 Thread Andreas Röhler
On 30.06.2016 10:24, Steven D'Aprano wrote: On Thursday 30 June 2016 12:13, Rustom Mody wrote: The irrational and emotional psychological forces that inspire mathematicians can make interesting reading, but they have no relevance in deciding who is write or wrong. Hmm, so math is not

Re: Can math.atan2 return INF?

2016-06-30 Thread Lawrence D’Oliveiro
On Thursday, June 30, 2016 at 9:31:29 PM UTC+12, Andreas Röhler wrote: > Science is not about believing, but about models. The nice thing about science is, it works even if you don’t believe in it. -- https://mail.python.org/mailman/listinfo/python-list

Re: Can math.atan2 return INF?

2016-06-30 Thread Andreas Röhler
On 30.06.2016 10:24, Steven D'Aprano wrote: On Thursday 30 June 2016 12:13, Rustom Mody wrote: [ ... ] Besides, the whole point of science is to develop objective, rational reasons to believe things. Science is not about believing, but about models. Believing is important to make the career

Re: Can math.atan2 return INF?

2016-06-30 Thread Steven D'Aprano
On Thursday 30 June 2016 17:16, Lawrence D’Oliveiro wrote: > The definition of “random” is “unknowable”. It really isn't. What Julius Caesar had for breakfast on the day after his 15th birthday is unknowable. To the best of our knowledge, the collapse of a quantum wave function is random.

Re: Can math.atan2 return INF?

2016-06-30 Thread Steven D'Aprano
On Thursday 30 June 2016 12:13, Rustom Mody wrote: > OTOH Computer Science HAPPENED because mathematicians kept hotly disputing > for more than ½ a century as to what is legitimate math and what is > theology/mysticism/etc: I really don't think so. Computer science happened because people

Re: Can math.atan2 return INF?

2016-06-30 Thread Lawrence D’Oliveiro
On Thursday, June 30, 2016 at 7:32:55 PM UTC+12, Paul Rubin wrote: > Lawrence D’Oliveiro writes: >> The definition of “random” is “unknowable”. So all you are stating is >> a tautology. > > What? No. You read a bunch of bits out of the device and you want to > know whether they are

Re: Can math.atan2 return INF?

2016-06-30 Thread Paul Rubin
Lawrence D’Oliveiro writes: > The definition of “random” is “unknowable”. So all you are stating is > a tautology. What? No. You read a bunch of bits out of the device and you want to know whether they are Kolmogorov-random (you can look up what that means if you're not

Re: Can math.atan2 return INF?

2016-06-30 Thread Lawrence D’Oliveiro
On Thursday, June 30, 2016 at 7:13:36 PM UTC+12, Andreas Röhler wrote: > On 30.06.2016 03:33, Lawrence D’Oliveiro wrote: > >> So you see, like it or not, we are drawn to the conclusion that there >> *was* indeed something before our particular Big Bang. > > That's linear like the Big Bang

Re: Can math.atan2 return INF?

2016-06-30 Thread Lawrence D’Oliveiro
On Thursday, June 30, 2016 at 6:57:41 PM UTC+12, Paul Rubin wrote: >> Every time somebody tries to point to an example of a “topic that is >> beyond the reach of science”, it seems to get knocked over eventually. > > Generate a sequence of "random" bits from your favorite physical source >

Re: Can math.atan2 return INF?

2016-06-30 Thread Andreas Röhler
On 30.06.2016 03:33, Lawrence D’Oliveiro wrote: So you see, like it or not, we are drawn to the conclusion that there *was* indeed something before our particular Big Bang. That's linear like the Big Bang theorie. What about assuming something beyond our notion of time and space, unknown

Re: Can math.atan2 return INF?

2016-06-30 Thread Paul Rubin
> Every time somebody tries to point to an example of a “topic that is > beyond the reach of science”, it seems to get knocked over eventually. Generate a sequence of "random" bits from your favorite physical source (radioactive decay, quantum entanglement, or whatever). Is the sequence really

Re: Can math.atan2 return INF?

2016-06-30 Thread Marko Rauhamaa
Gregory Ewing : > Marko Rauhamaa wrote: >> By the time the event horizon hits Tim at the speed of light, Tim will >> have received all of our Universe's signals at an ever accelerating >> frequency and increasing power. He will have seen the End of the World >> before

Re: Can math.atan2 return INF?

2016-06-30 Thread Rustom Mody
On Thursday, June 30, 2016 at 11:54:54 AM UTC+5:30, Marko Rauhamaa wrote: > Lawrence D’Oliveiro : > > Every time somebody tries to point to an example of a “topic that is > > beyond the reach of science”, it seems to get knocked over eventually. > > Of course, an experiment trumps theory, always.

Re: Can math.atan2 return INF?

2016-06-30 Thread Marko Rauhamaa
Lawrence D’Oliveiro : > Every time somebody tries to point to an example of a “topic that is > beyond the reach of science”, it seems to get knocked over eventually. Of course, an experiment trumps theory, always. Marko --

Re: Can math.atan2 return INF?

2016-06-30 Thread Gregory Ewing
Marko Rauhamaa wrote: By the time the event horizon hits Tim at the speed of light, Tim will have received all of our Universe's signals at an ever accelerating frequency and increasing power. He will have seen the End of the World before leaving it. I don't think that's right. From the point

Re: Can math.atan2 return INF?

2016-06-29 Thread Chris Angelico
On Thu, Jun 30, 2016 at 12:13 PM, Rustom Mody wrote: > ... hotly disputing for more than ½ a century... You keep using that character. Is it just to show off that you can? I was always taught to match the style of the rest of the sentence, so this would be "half a

Re: Can math.atan2 return INF?

2016-06-29 Thread Rustom Mody
On Thursday, June 30, 2016 at 7:03:30 AM UTC+5:30, Lawrence D’Oliveiro wrote: > On Wednesday, June 29, 2016 at 10:55:03 PM UTC+12, Marko Rauhamaa wrote: > > No, the fundamental question here is whether it makes scientific sense > > to speculate about topics that are beyond the reach of science.

Re: Can math.atan2 return INF?

2016-06-29 Thread Lawrence D’Oliveiro
On Wednesday, June 29, 2016 at 10:55:03 PM UTC+12, Marko Rauhamaa wrote: > No, the fundamental question here is whether it makes scientific sense > to speculate about topics that are beyond the reach of science. Few > scientists speculate about what went on before the Big Bang, for > example. On

Re: Can math.atan2 return INF?

2016-06-29 Thread Random832
On Wed, Jun 29, 2016, at 05:35, Steven D'Aprano wrote: > Although their perspectives are very different, neither is "more > right" than the other. I think usually the idea that there are "no privileged frames of reference" doesn't go so far as to include ones from which it is impossible to send

Re: Can math.atan2 return INF?

2016-06-29 Thread Marko Rauhamaa
Steven D'Aprano : > There's a common myth going around that black holes take an infinite > amount of time to form, That appears to be the case. (Identical discussion points here: http://astronomy.stackexchange.com/questions/2441/does-matter-accumulat

Re: Can math.atan2 return INF?

2016-06-29 Thread Steven D'Aprano
On Sunday 26 June 2016 09:40, Gregory Ewing wrote: > Marko Rauhamaa wrote: >> pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange): >> >>>Near a black hole 3.7 seconds can last an infinite time... >> >> Which phenomenon prevents a black hole from ever forming. Yet >> astronomers keep

Re: Can math.atan2 return INF?

2016-06-28 Thread Marko Rauhamaa
(sorry for the premature previous post) Random832 : > All objects, not just black holes, have those properties. The point > here is that we are in fact observing those properties of an object > that is not yet (and never will be) a black hole in our frame of > reference.

Re: Can math.atan2 return INF?

2016-06-28 Thread Marko Rauhamaa
Random832 : > All objects, not just black holes, have those properties. The point > here is that we are in fact observing those properties of an object > that is not yet (and never will be) a black hole in our frame of > reference. A physicist once clarified to me that an

Re: Can math.atan2 return INF?

2016-06-28 Thread Steven D'Aprano
On Tue, 28 Jun 2016 11:39 pm, Random832 wrote: > On Sun, Jun 26, 2016, at 22:59, Steven D'Aprano wrote: >> We have no way of seeing what goes on past the black hole's event >> horizon, since light cannot escape. But we can still see *some* >> properties of black holes, even through their event

Re: Can math.atan2 return INF?

2016-06-28 Thread Random832
On Sun, Jun 26, 2016, at 22:59, Steven D'Aprano wrote: > We have no way of seeing what goes on past the black hole's event > horizon, since light cannot escape. But we can still see *some* > properties of black holes, even through their event horizon: their > mass, any electric charge they may

Re: Can math.atan2 return INF?

2016-06-28 Thread Steven D'Aprano
On Tuesday 28 June 2016 16:12, Gregory Ewing wrote: > Rustom Mody wrote: >> I said that for the Haskell list [0..] >> >> [0..] ++ [-1] == [0..] >> >> He said (in effect) yes that -1 would not be detectable but its still there! > > The code to generate it is there, but it will never > be

Re: Can math.atan2 return INF?

2016-06-28 Thread Rustom Mody
On Tuesday, June 28, 2016 at 11:42:29 AM UTC+5:30, Gregory Ewing wrote: > Rustom Mody wrote: > > I said that for the Haskell list [0..] > > > > [0..] ++ [-1] == [0..] > > > > He said (in effect) yes that -1 would not be detectable but its still there! > > The code to generate it is there, but

Re: Can math.atan2 return INF?

2016-06-28 Thread Marko Rauhamaa
Gregory Ewing : > Marko Rauhamaa wrote: >> We cannot get any information on black holes proper because black holes >> cannot come into existence according to the very theory that predicts >> black holes. It will take infinitely long for an event horizon to form. > >

Re: Can math.atan2 return INF?

2016-06-28 Thread Gregory Ewing
Marko Rauhamaa wrote: We cannot get any information on black holes proper because black holes cannot come into existence according to the very theory that predicts black holes. It will take infinitely long for an event horizon to form. Only in some frames of reference. By your reasoning,

Re: Can math.atan2 return INF?

2016-06-28 Thread Gregory Ewing
Rustom Mody wrote: I said that for the Haskell list [0..] [0..] ++ [-1] == [0..] He said (in effect) yes that -1 would not be detectable but its still there! The code to generate it is there, but it will never be executed, so the compiler is entitled to optimise it away. :-) He may have a

Re: Can math.atan2 return INF?

2016-06-27 Thread Marko Rauhamaa
Rustom Mody : > On Monday, June 27, 2016 at 7:42:26 PM UTC+5:30, Marko Rauhamaa wrote: >> I'm a formalist. > > Well then formalism is semantics-free: What matters it if an argument > is theological or scientific as long as it is (internally) consistent? That's what I'm

Re: Can math.atan2 return INF?

2016-06-27 Thread Rustom Mody
On Monday, June 27, 2016 at 7:42:26 PM UTC+5:30, Marko Rauhamaa wrote: > Rustom Mody : > > > On Monday, June 27, 2016 at 7:16:03 PM UTC+5:30, Marko Rauhamaa wrote: > >> Georg Cantor would probably be with your colleague, but then, Georg > >> Cantor was not a scientist. > > > > I'm mystified > > >

Re: Can math.atan2 return INF?

2016-06-27 Thread Marko Rauhamaa
Rustom Mody : > On Monday, June 27, 2016 at 7:16:03 PM UTC+5:30, Marko Rauhamaa wrote: >> Georg Cantor would probably be with your colleague, but then, Georg >> Cantor was not a scientist. > > I'm mystified > > Earlier (I thought) you were on the Platonist = {Cantor,

Re: Can math.atan2 return INF?

2016-06-27 Thread Rustom Mody
On Monday, June 27, 2016 at 7:16:03 PM UTC+5:30, Marko Rauhamaa wrote: > Rustom Mody : > > > I am reminded of an argument I once had with a colleague about > > infinite, lazy data-structures > > > > I said that for the Haskell list [0..] > > > > [0..] ++ [-1] == [0..] > > [...] > > > He said

Re: Can math.atan2 return INF?

2016-06-27 Thread Marko Rauhamaa
Rustom Mody : > I am reminded of an argument I once had with a colleague about > infinite, lazy data-structures > > I said that for the Haskell list [0..] > > [0..] ++ [-1] == [0..] [...] > He said (in effect) yes that -1 would not be detectable but its still > there!

Re: Can math.atan2 return INF?

2016-06-27 Thread Nagy László Zsolt
> Thanks, I'm in the same position as you, except that I'm in the position > where I need it use the result, and if it ever returns INF my function will > blow up. But it doesn't look like that can happen. > Doesn't atan2 relies on the C lib math floating point library? At least in CPython. I

Re: Can math.atan2 return INF?

2016-06-27 Thread Rustom Mody
On Monday, June 27, 2016 at 12:10:21 PM UTC+5:30, Marko Rauhamaa wrote: > Steven D'Aprano : > > > Naive empirical falsification can, at best, be considered as a > > best-practice rule: if you have no way of falsifying something even in > > principle, then it's not scientific. But it doesn't

Re: Can math.atan2 return INF?

2016-06-27 Thread Marko Rauhamaa
Steven D'Aprano : > Naive empirical falsification can, at best, be considered as a > best-practice rule: if you have no way of falsifying something even in > principle, then it's not scientific. But it doesn't really give you > much in the way of practical guidance. What

Re: Can math.atan2 return INF?

2016-06-26 Thread Steven D'Aprano
On Mon, 27 Jun 2016 09:08 am, Gregory Ewing wrote: > Marko Rauhamaa wrote: >>>The singularity being talked about there is an artifact of a >>>particular coordinate system; the theory predicts that there is no >>>*physical* singularity at the event horizon. >> >> That theory can't be tested even

Re: Can math.atan2 return INF?

2016-06-26 Thread Gregory Ewing
Marko Rauhamaa wrote: The singularity being talked about there is an artifact of a particular coordinate system; the theory predicts that there is no *physical* singularity at the event horizon. That theory can't be tested even in principle, can it? Therefore, it is not scientific. It can in

Re: Can math.atan2 return INF?

2016-06-26 Thread Marko Rauhamaa
Gregory Ewing : > Marko Rauhamaa wrote: >> Which phenomenon prevents a black hole from ever forming. Yet >> astronomers keep telling us they are all over the place. > Astronomers have observed objects whose behaviour is entirely > consistent with the existence of

Re: Can math.atan2 return INF?

2016-06-25 Thread Gregory Ewing
Marko Rauhamaa wrote: pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange): For a scientific point of view, right. But tell this to the one that will be close to a blackhole ;-) Then, you'd better consult a priest than a scientist. But don't worry, you'll have an infinitely long time

Re: Can math.atan2 return INF?

2016-06-25 Thread Gregory Ewing
Marko Rauhamaa wrote: pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange): Near a black hole 3.7 seconds can last an infinite time... Which phenomenon prevents a black hole from ever forming. Yet astronomers keep telling us they are all over the place. Astronomers have observed

Re: Can math.atan2 return INF?

2016-06-25 Thread MRAB
On 2016-06-26 00:15, Gregory Ewing wrote: Steven D'Aprano wrote: China has just announced a new supercomputer that is so fast it can run an infinite loop in 3.7 seconds. They're lying. It has to be NaN seconds. If it was an Indian supercomputer, it would be naan seconds. Sorry. :-) --

Re: Can math.atan2 return INF?

2016-06-25 Thread Gregory Ewing
Steven D'Aprano wrote: China has just announced a new supercomputer that is so fast it can run an infinite loop in 3.7 seconds. They're lying. It has to be NaN seconds. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Can math.atan2 return INF?

2016-06-24 Thread Marko Rauhamaa
pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange): > Marko Rauhamaa wrote: > >> Note that the "valid point of view for external observers" is the >> only valid scientific point of view. > > For a scientific point of view, right. But tell this to the one that > will be

Re: Can math.atan2 return INF?

2016-06-24 Thread Pierre-Alain Dorange
Marko Rauhamaa wrote: > Note that the "valid point of view for external observers" is the only > valid scientific point of view. For a scientific point of view, right. But tell this to the one that will be close to a blackhole ;-) -- Pierre-Alain Dorange Moof

Re: Can math.atan2 return INF?

2016-06-23 Thread Ben Bacarisse
alister writes: > On Thu, 23 Jun 2016 15:39:43 +0100, Ben Bacarisse wrote: > >> Steven D'Aprano writes: >> >>> On Thursday 23 June 2016 14:40, Dan Sommers wrote: >>> > Since x == y, the answer should be the same as for any

Re: Can math.atan2 return INF?

2016-06-23 Thread Marko Rauhamaa
pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange): > Steven D'Aprano wrote: >> China has just announced a new supercomputer that is so fast it can >> run an infinite loop in 3.7 seconds. > > Near a black hole 3.7 seconds can last an infinite time... Which phenomenon

Re: Can math.atan2 return INF?

2016-06-23 Thread Pierre-Alain Dorange
Steven D'Aprano wrote: > > which infinity. There are many - some larger than others > > China has just announced a new supercomputer that is so fast it can run an > infinite loop in 3.7 seconds. Near a black hole 3.7 seconds can last an infinite time... -- Pierre-Alain

Re: Can math.atan2 return INF?

2016-06-23 Thread Pierre-Alain Dorange
Dan Sommers wrote: > > Given: > > > > x = INF > > y = INF > > assert x == y > > > > there is a reason to pick atan2(y, x) = pi/4: > > > > Since x == y, the answer should be the same as for any other pair of x == y. > > When x == y == 0, then atan2(y, x) is 0. This is

Re: Can math.atan2 return INF?

2016-06-23 Thread Steven D'Aprano
On Fri, 24 Jun 2016 01:04 am, alister wrote: > which infinity. There are many - some larger than others China has just announced a new supercomputer that is so fast it can run an infinite loop in 3.7 seconds. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Can math.atan2 return INF?

2016-06-23 Thread alister
On Thu, 23 Jun 2016 15:39:43 +0100, Ben Bacarisse wrote: > Steven D'Aprano writes: > >> On Thursday 23 June 2016 14:40, Dan Sommers wrote: >> Since x == y, the answer should be the same as for any other pair of x == y. >>> >>> When x == y == 0,

Re: Can math.atan2 return INF?

2016-06-23 Thread Ben Bacarisse
Steven D'Aprano writes: > On Thursday 23 June 2016 14:40, Dan Sommers wrote: > >>> Since x == y, the answer should be the same as for any other pair of x == y. >> >> When x == y == 0, then atan2(y, x) is 0. I see just added noise by making the same comment

Re: Can math.atan2 return INF?

2016-06-23 Thread Ben Bacarisse
Steven D'Aprano writes: > On Thu, 23 Jun 2016 05:17 am, Ben Bacarisse wrote: > >> pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) writes: >> >>> Ben Bacarisse wrote: >>> >>> math.atan2(INF, INF) 0.7853981633974483 I

Re: Can math.atan2 return INF?

2016-06-23 Thread Steven D'Aprano
On Thursday 23 June 2016 14:40, Dan Sommers wrote: >> Since x == y, the answer should be the same as for any other pair of x == y. > > When x == y == 0, then atan2(y, x) is 0. /s/any other pair of x == y/any other pair of x y except for zero/ :-P Zero is exceptional in many ways. -- Steve

Re: Can math.atan2 return INF?

2016-06-22 Thread Dan Sommers
On Thu, 23 Jun 2016 13:59:46 +1000, Steven D'Aprano wrote: > Given: > > x = INF > y = INF > assert x == y > > there is a reason to pick atan2(y, x) = pi/4: > > Since x == y, the answer should be the same as for any other pair of x == y. When x == y == 0, then atan2(y, x) is 0. --

Re: Can math.atan2 return INF?

2016-06-22 Thread Steven D'Aprano
On Thu, 23 Jun 2016 05:17 am, Ben Bacarisse wrote: > pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) writes: > >> Ben Bacarisse wrote: >> >>> >>> math.atan2(INF, INF) >>> 0.7853981633974483 >>> >>> I would have expected NaN since atan2(INF, INF) could be

Re: Can math.atan2 return INF?

2016-06-22 Thread Lawrence D’Oliveiro
On Thursday, June 23, 2016 at 7:17:37 AM UTC+12, Ben Bacarisse wrote: > The limit of atan2(x, x) is as you describe, but there is no reason to > pick that one case. It’s what’s called a “non-removable discontinuity”. The value you pick at that point will be consistent with approaching it from

Re: Can math.atan2 return INF?

2016-06-22 Thread Ben Bacarisse
pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) writes: > Ben Bacarisse wrote: > >> >>> math.atan2(INF, INF) >> 0.7853981633974483 >> >> I would have expected NaN since atan2(INF, INF) could be thought of as >> the limit of atan2(x, y) which could be any value

Re: Can math.atan2 return INF?

2016-06-22 Thread Pierre-Alain Dorange
Ben Bacarisse wrote: > >>> math.atan2(INF, INF) > 0.7853981633974483 > > I would have expected NaN since atan2(INF, INF) could be thought of as > the limit of atan2(x, y) which could be any value in the range. And I'd > have guessed atan2(0, 0) would have been NaN too

Re: Can math.atan2 return INF?

2016-06-22 Thread Random832
On Wed, Jun 22, 2016, at 11:34, Ben Bacarisse wrote: > Steven D'Aprano writes: > > I think that the only way it will return a NAN is if passed a NAN. > > That seems to be the case but I was a little surprised to find that > > >>> math.atan2(INF, INF) >

Re: Can math.atan2 return INF?

2016-06-22 Thread Ben Bacarisse
Steven D'Aprano writes: > On Wed, 22 Jun 2016 04:01 am, Pierre-Alain Dorange wrote: >> I do not know under what circumstance atan2 can return NAN, atan2 taks 2 >> argument (y and x) and return the angle corresponding to y/x. >> If x is 0.0, atan2 return 0.0 (do not try to

Re: Can math.atan2 return INF?

2016-06-22 Thread Pierre-Alain Dorange
Steven D'Aprano wrote: > py> math.atan2(NAN, 0) > nan > > I think that the only way it will return a NAN is if passed a NAN. yes of course if you pass an invalid argument (NAN is not a real value, atan2 except coordinate x,y), the result would be invalid... --

Re: Can math.atan2 return INF?

2016-06-21 Thread Steven D'Aprano
On Wed, 22 Jun 2016 04:32 am, Jussi Piitulainen wrote: > pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) writes: > >> Steven D'Aprano wrote: >> >>> Are there any circumstances where math.atan2(a, b) can return an >>> infinity? [...] > I didn't see any mention of it

Re: Can math.atan2 return INF?

2016-06-21 Thread Steven D'Aprano
On Wed, 22 Jun 2016 04:01 am, Pierre-Alain Dorange wrote: > Steven D'Aprano wrote: > >> Are there any circumstances where math.atan2(a, b) can return an >> infinity? >> >> I know it will return a NAN under some circumstances. > > atan or atan2 can't return INFINITE, it

Re: Can math.atan2 return INF?

2016-06-21 Thread Jussi Piitulainen
pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) writes: > Steven D'Aprano wrote: > >> Are there any circumstances where math.atan2(a, b) can return an infinity? >> >> I know it will return a NAN under some circumstances. > > atan or atan2 can't return INFINITE, it

Re: Can math.atan2 return INF?

2016-06-21 Thread Pierre-Alain Dorange
Steven D'Aprano wrote: > Are there any circumstances where math.atan2(a, b) can return an infinity? > > I know it will return a NAN under some circumstances. atan or atan2 can't return INFINITE, it was the arc tangent of a value, then arc tangent can only be between -PI

Can math.atan2 return INF?

2016-06-21 Thread Steven D'Aprano
Are there any circumstances where math.atan2(a, b) can return an infinity? I know it will return a NAN under some circumstances. -- Steven -- https://mail.python.org/mailman/listinfo/python-list