[Numpy-discussion] long double woes on win32

David Cournapeau cournape@gmail....
Sat Aug 16 01:47:53 CDT 2008

On Fri, Aug 15, 2008 at 7:11 PM, Charles R Harris
<charlesr.harris@gmail.com> wrote:
> Doesn't mingw use the MSVC library?

Yes, it does. But long double is both a compiler and library issue.
sizeof(long double) is defined by the compiler, and it is different
with mingw and visual studio ATM. I don't know what the correct
behavior should be, but the fact is that they are different.

> are the same type, so this seems to be a bug in mingw. I suppose numpy could
> detect this situation and define the types to be identical, but if this is
> impractical, then perhaps the best thing to do is issue an error message.

It is impractical in the short term because defining SIZE_LONG_DOUBLE
to 8 breaks the mingw build, and fixing it would require fixing the
whole math function configuration (the whole HAVE_LONGDOUBLE_FUNCS and
co mess). That's highly non trivial code because of the tens of
different possible configurations, and is fundamental to the whole
numpy, since it affects the math functions effectively used.

> There's isn't much you can do about long doubles while maintaining MSVC
> compatibility.

Does that mean you are in favor of letting things the way they are now
for 1.2, and fix this on 1.3/1.2.1 ?



More information about the Numpy-discussion mailing list