osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can math.atan2 return INF?


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.