Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #110252 > unrolled thread
| Started by | Steven D'Aprano <steve@pearwood.info> |
|---|---|
| First post | 2016-06-22 03:50 +1000 |
| Last post | 2016-06-23 15:37 +0100 |
| Articles | 4 on this page of 84 — 19 participants |
Back to article view | Back to comp.lang.python
Can math.atan2 return INF? Steven D'Aprano <steve@pearwood.info> - 2016-06-22 03:50 +1000
Re: Can math.atan2 return INF? pdorange@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) - 2016-06-21 20:01 +0200
Re: Can math.atan2 return INF? Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-06-21 21:32 +0300
Re: Can math.atan2 return INF? Steven D'Aprano <steve@pearwood.info> - 2016-06-22 11:40 +1000
Re: Can math.atan2 return INF? Nagy László Zsolt <gandalf@shopzeus.com> - 2016-06-27 15:27 +0200
Re: Can math.atan2 return INF? Steven D'Aprano <steve@pearwood.info> - 2016-06-22 11:38 +1000
Re: Can math.atan2 return INF? pdorange@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) - 2016-06-22 08:21 +0200
Re: Can math.atan2 return INF? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-06-22 16:34 +0100
Re: Can math.atan2 return INF? Random832 <random832@fastmail.com> - 2016-06-22 12:19 -0400
Re: Can math.atan2 return INF? pdorange@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) - 2016-06-22 19:18 +0200
Re: Can math.atan2 return INF? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-06-22 20:17 +0100
Re: Can math.atan2 return INF? Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-22 12:50 -0700
Re: Can math.atan2 return INF? Steven D'Aprano <steve@pearwood.info> - 2016-06-23 13:59 +1000
Re: Can math.atan2 return INF? Dan Sommers <dan@tombstonezero.net> - 2016-06-23 04:40 +0000
Re: Can math.atan2 return INF? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-23 16:45 +1000
Re: Can math.atan2 return INF? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-06-23 15:39 +0100
Re: Can math.atan2 return INF? alister <alister.ware@ntlworld.com> - 2016-06-23 15:04 +0000
Re: Can math.atan2 return INF? Steven D'Aprano <steve@pearwood.info> - 2016-06-24 02:44 +1000
Re: Can math.atan2 return INF? pdorange@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) - 2016-06-23 19:14 +0200
Re: Can math.atan2 return INF? Marko Rauhamaa <marko@pacujo.net> - 2016-06-23 20:22 +0300
Re: Can math.atan2 return INF? pdorange@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) - 2016-06-24 09:53 +0200
Re: Can math.atan2 return INF? Marko Rauhamaa <marko@pacujo.net> - 2016-06-24 13:38 +0300
Re: Can math.atan2 return INF? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-26 11:43 +1200
Re: Can math.atan2 return INF? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-26 11:40 +1200
Re: Can math.atan2 return INF? Marko Rauhamaa <marko@pacujo.net> - 2016-06-26 10:09 +0300
Re: Can math.atan2 return INF? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-27 11:08 +1200
Re: Can math.atan2 return INF? Steven D'Aprano <steve@pearwood.info> - 2016-06-27 12:59 +1000
Re: Can math.atan2 return INF? Marko Rauhamaa <marko@pacujo.net> - 2016-06-27 09:40 +0300
Re: Can math.atan2 return INF? Rustom Mody <rustompmody@gmail.com> - 2016-06-27 06:15 -0700
Re: Can math.atan2 return INF? Marko Rauhamaa <marko@pacujo.net> - 2016-06-27 16:45 +0300
Re: Can math.atan2 return INF? Rustom Mody <rustompmody@gmail.com> - 2016-06-27 07:01 -0700
Re: Can math.atan2 return INF? Marko Rauhamaa <marko@pacujo.net> - 2016-06-27 17:12 +0300
Re: Can math.atan2 return INF? Rustom Mody <rustompmody@gmail.com> - 2016-06-27 07:27 -0700
Re: Can math.atan2 return INF? Marko Rauhamaa <marko@pacujo.net> - 2016-06-27 20:03 +0300
Re: Can math.atan2 return INF? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-28 18:12 +1200
Re: Can math.atan2 return INF? Rustom Mody <rustompmody@gmail.com> - 2016-06-27 23:25 -0700
Re: Can math.atan2 return INF? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-28 16:27 +1000
Re: Can math.atan2 return INF? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-28 18:12 +1200
Re: Can math.atan2 return INF? Marko Rauhamaa <marko@pacujo.net> - 2016-06-28 09:23 +0300
Re: Can math.atan2 return INF? Random832 <random832@fastmail.com> - 2016-06-28 09:39 -0400
Re: Can math.atan2 return INF? Steven D'Aprano <steve@pearwood.info> - 2016-06-29 01:22 +1000
Re: Can math.atan2 return INF? Marko Rauhamaa <marko@pacujo.net> - 2016-06-28 19:36 +0300
Re: Can math.atan2 return INF? Marko Rauhamaa <marko@pacujo.net> - 2016-06-28 19:42 +0300
Re: Can math.atan2 return INF? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-29 19:35 +1000
Re: Can math.atan2 return INF? Marko Rauhamaa <marko@pacujo.net> - 2016-06-29 13:54 +0300
Re: Can math.atan2 return INF? Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-29 18:33 -0700
Re: Can math.atan2 return INF? Rustom Mody <rustompmody@gmail.com> - 2016-06-29 19:13 -0700
Re: Can math.atan2 return INF? Chris Angelico <rosuav@gmail.com> - 2016-06-30 12:38 +1000
Re: Can math.atan2 return INF? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-30 18:24 +1000
Re: Can math.atan2 return INF? Andreas Röhler <andreas.roehler@online.de> - 2016-06-30 11:35 +0200
Re: Can math.atan2 return INF? Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-30 02:42 -0700
Re: Can math.atan2 return INF? Andreas Röhler <andreas.roehler@online.de> - 2016-06-30 12:13 +0200
Re: Can math.atan2 return INF? Andreas Röhler <andreas.roehler@online.de> - 2016-06-30 12:11 +0200
Re: Can math.atan2 return INF? Steven D'Aprano <steve@pearwood.info> - 2016-07-01 03:18 +1000
Re: Can math.atan2 return INF? Rustom Mody <rustompmody@gmail.com> - 2016-06-30 08:28 -0700
Re: Can math.atan2 return INF? Steven D'Aprano <steve@pearwood.info> - 2016-07-01 04:03 +1000
Re: Can math.atan2 return INF? Rustom Mody <rustompmody@gmail.com> - 2016-07-01 07:19 -0700
Re: Can math.atan2 return INF? Marko Rauhamaa <marko@pacujo.net> - 2016-07-01 18:20 +0300
Re: Can math.atan2 return INF? Rustom Mody <rustompmody@gmail.com> - 2016-07-29 22:46 -0700
Re: Can math.atan2 return INF? Steven D'Aprano <steve@pearwood.info> - 2016-08-01 12:53 +1000
Re: Can math.atan2 return INF? Paul Rubin <no.email@nospam.invalid> - 2016-07-31 20:41 -0700
Re: Can math.atan2 return INF? Rustom Mody <rustompmody@gmail.com> - 2016-07-31 20:54 -0700
Re: Can math.atan2 return INF? Rustom Mody <rustompmody@gmail.com> - 2016-07-31 21:05 -0700
Re: Can math.atan2 return INF? Ian Kelly <ian.g.kelly@gmail.com> - 2016-08-01 01:05 -0600
Re: Can math.atan2 return INF? Rustom Mody <rustompmody@gmail.com> - 2016-07-24 19:48 -0700
Re: Can math.atan2 return INF? Marko Rauhamaa <marko@pacujo.net> - 2016-06-30 09:24 +0300
Re: Can math.atan2 return INF? Rustom Mody <rustompmody@gmail.com> - 2016-06-29 23:29 -0700
Re: Can math.atan2 return INF? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-06-30 07:47 -0400
Re: Can math.atan2 return INF? alister <alister.ware@ntlworld.com> - 2016-06-30 14:54 +0000
Re: Can math.atan2 return INF? Paul Rubin <no.email@nospam.invalid> - 2016-06-29 23:57 -0700
Re: Can math.atan2 return INF? Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-30 00:16 -0700
Re: Can math.atan2 return INF? Paul Rubin <no.email@nospam.invalid> - 2016-06-30 00:32 -0700
Re: Can math.atan2 return INF? Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-30 00:39 -0700
Re: Can math.atan2 return INF? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-30 18:27 +1000
Re: Can math.atan2 return INF? Andreas Röhler <andreas.roehler@online.de> - 2016-06-30 09:17 +0200
Re: Can math.atan2 return INF? Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-30 00:17 -0700
Re: Can math.atan2 return INF? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-30 18:06 +1200
Re: Can math.atan2 return INF? Marko Rauhamaa <marko@pacujo.net> - 2016-06-30 09:32 +0300
Re: Can math.atan2 return INF? Random832 <random832@fastmail.com> - 2016-06-29 09:55 -0400
Re: Can math.atan2 return INF? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-26 11:15 +1200
Re: Can math.atan2 return INF? MRAB <python@mrabarnett.plus.com> - 2016-06-26 00:31 +0100
Re: Can math.atan2 return INF? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-06-23 20:04 +0100
Re: Can math.atan2 return INF? pdorange@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) - 2016-06-23 19:07 +0200
Re: Can math.atan2 return INF? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-06-23 15:37 +0100
Page 5 of 5 — ← Prev page 1 2 3 4 [5]
| From | MRAB <python@mrabarnett.plus.com> |
|---|---|
| Date | 2016-06-26 00:31 +0100 |
| Message-ID | <mailman.2.1466897690.2358.python-list@python.org> |
| In reply to | #110504 |
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. :-)
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2016-06-23 20:04 +0100 |
| Message-ID | <87vb0ziv5n.fsf@bsb.me.uk> |
| In reply to | #110421 |
alister <alister.ware@ntlworld.com> writes:
> On Thu, 23 Jun 2016 15:39:43 +0100, Ben Bacarisse wrote:
>
>> Steven D'Aprano <steve+comp.lang.python@pearwood.info> 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 before reading the
>> rest of the thread. Sorry.
>>
>>> /s/any other pair of x == y/any other pair of x y except for zero/
>>>
>>> :-P
>>>
>>>
>>> Zero is exceptional in many ways.
>>
>> whereas infinity... :-)
>
> which infinity. There are many - some larger than others
The one in the post up thread now (sadly) snipped. It's not a
mathematical infinity at all but a particular floating point
representation that results from float("inf"). However it is still just
as "exceptional in many ways" as zero. (Sorry if you were making a joke
and I didn't get it.)
--
Ben.
[toc] | [prev] | [next] | [standalone]
| From | pdorange@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) |
|---|---|
| Date | 2016-06-23 19:07 +0200 |
| Message-ID | <1mpaezs.1cjd2qlsezghsN%pdorange@pas-de-pub-merci.mac.com> |
| In reply to | #110362 |
Dan Sommers <dan@tombstonezero.net> 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 the only solution (0) where atan2 return sometime else than
pi/4. And INF is not 0, it can be lot of values, but not zero.
Yes x=INF and y=INF do not mean x=y (in math world) but INF is a
frontier that can be reach, so it tend to the maximum value. So the
tendancy is always atan2(y,x) tend to pi/4 if you looks at lot od y and
x that will be grater and greater each time : the final frontier would
always be pi/4, even if t take a long time to reach it.
--
Pierre-Alain Dorange <http://microwar.sourceforge.net/>
Ce message est sous licence Creative Commons "by-nc-sa-2.0"
<http://creativecommons.org/licenses/by-nc-sa/2.0/fr/>
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2016-06-23 15:37 +0100 |
| Message-ID | <87d1n8j7ib.fsf@bsb.me.uk> |
| In reply to | #110355 |
Steven D'Aprano <steve@pearwood.info> writes: > On Thu, 23 Jun 2016 05:17 am, Ben Bacarisse wrote: > >> pdorange@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) writes: >> >>> Ben Bacarisse <ben.usenet@bsb.me.uk> 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 but >>> >>> i'm not a math expert, but the limit of atan2 would be 45°, so pi/4 >>> radians (0,7854). >>> As x,y are coordinates, the both infinite would tend toward 45°. >> >> The limit of atan2(x, x) is as you describe, but there is no reason to >> pick that one case. > > 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. > > It might not be a *great* reason, but it's a reason. ...provided you consider atan2(0, 0) == 0 to be a bug! -- Ben.
[toc] | [prev] | [standalone]
Page 5 of 5 — ← Prev page 1 2 3 4 [5]
Back to top | Article view | comp.lang.python
csiph-web