Re: [Fwd: [Bug 218377] [NEW] special floats generate incorrect C code when used as compile-time constants]
Greg Ewing <[email protected]>
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
Stefan Behnel wrote:
> DEF INFINITY = float('inf')
> print INFINITY
>
> results in:
>
> foo.c: In function ‘init2foo’:
> foo.c:158: error: ‘inf’ undeclared (first use in this function)
I'm not sure whether to do anything about this for Pyrex.
As I understand it, Python doesn't promise anything about
representation of inf and nan, so it's platform dependent.
I'm inclined to think that using an appropriate constant
from your platform's math.h is the right thing to do.
--
Greg
_______________________________________________
Pyrex mailing list
[email protected]
http://lists.copyleft.no/mailman/listinfo/pyrex