[Python-checkins] r60777 - python/branches/trunk-math/Modules/cmathmodule.c

Georg Brandl g.brandl at gmx.net
Thu Feb 14 09:32:38 CET 2008


mark.dickinson schrieb:
> Author: mark.dickinson
> Date: Thu Feb 14 04:49:07 2008
> New Revision: 60777
> 
> Modified:
>    python/branches/trunk-math/Modules/cmathmodule.c
> Log:
> Rename macro I to INF; (I is a *really* poor choice of name for infinity 
> in a complex math module!  And it causes a conflict if we ever want to 
> include complex.h for any reason.)
> 
> Also revert to using {U,U} instead of {0,0} for undefined spots in the 
> tables of special values: this avoid possible confusion of an undefined 
> {0,0} with an actual value of {0.,0.}, and also makes it more likely 
> that errors will be noticed if these table spots are used accidentally.
> 
> 
> 
> Modified: python/branches/trunk-math/Modules/cmathmodule.c
> ==============================================================================
> --- python/branches/trunk-math/Modules/cmathmodule.c	(original)
> +++ python/branches/trunk-math/Modules/cmathmodule.c	Thu Feb 14 04:49:07 2008
> @@ -98,23 +98,24 @@
>  /* On Windows HUGE_VAL is an extern variable and not a constant. Since the
>     special value arrays need a constant we have to role our own infinity
>     and nan. */
> -#  define I (DBL_MAX*DBL_MAX)
> +#  define INF (DBL_MAX*DBL_MAX)
>  #  define N (I*0.)

Shouldn't that be INF*0. then?

Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.



More information about the Python-checkins mailing list