[Numpy-discussion] test for long double support

Lisandro Dalcin dalcinl@gmail....
Tue Sep 14 18:34:37 CDT 2010

On 14 September 2010 12:47, Neal Becker <ndbecker2@gmail.com> wrote:
> Neal Becker wrote:
>> What is the recommended way to test for long double and clongdouble?
>> Is it:
> I guess I found it?
> #if HAVE_LONG_DOUBLE            // defined in pyconfig.h

I think these two are different things. For example, MSVC do support
'long double', it is a different type than 'double', but sizeof(long
double) == sizeof(double).

Also look at CPython's objimpl.h, union _gc_head, you will see an
unprotected usage of 'long double', so it seems that CPython requires
that the C compiler to support 'long double'.

Lisandro Dalcin
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169

More information about the NumPy-Discussion mailing list