Can math.atan2 return INF?

Dan Sommers dan at tombstonezero.net
Thu Jun 23 00:40:32 EDT 2016


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.


More information about the Python-list mailing list