Can math.atan2 return INF?

Pierre-Alain Dorange pdorange at pas-de-pub-merci.mac.com
Wed Jun 22 02:21:02 EDT 2016


Steven D'Aprano <steve at pearwood.info> 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...

-- 
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/>



More information about the Python-list mailing list