[Numpy-discussion] test for long double support
Lisandro Dalcin
dalcinl at gmail.com
Tue Sep 14 19:34:37 EDT 2010
On 14 September 2010 12:47, Neal Becker <ndbecker2 at gmail.com> wrote:
> Neal Becker wrote:
>
>> What is the recommended way to test for long double and clongdouble?
>>
>> Is it:
>> #if NPY_SIZEOF_LONGDOUBLE == NPY_SIZEOF_DOUBLE
>
> 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
---------------
CIMEC (INTEC/CONICET-UNL)
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