diff options
author | David Cournapeau <cournape@gmail.com> | 2010-07-27 10:02:17 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2010-07-27 10:02:17 +0000 |
commit | 12c2c52a6c924e6ea226b280a689d304b3681b8a (patch) | |
tree | 29d614165ea2122e9341601c64a49d540a8a9cfa /numpy | |
parent | dc3aa189d6941c628fe493c78cf471b2a1cc5ba9 (diff) | |
download | numpy-12c2c52a6c924e6ea226b280a689d304b3681b8a.tar.gz |
BUG: attempt at fixing alpha build failure (quad prec little endian).
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/npymath/npy_math_private.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/numpy/core/src/npymath/npy_math_private.h b/numpy/core/src/npymath/npy_math_private.h index 2f99101fc..722d03f94 100644 --- a/numpy/core/src/npymath/npy_math_private.h +++ b/numpy/core/src/npymath/npy_math_private.h @@ -361,6 +361,41 @@ do { \ typedef npy_uint64 ldouble_man_t; typedef npy_uint64 ldouble_exp_t; typedef npy_uint32 ldouble_sign_t; +#elif defined(HAVE_LDOUBLE_IEEE_QUAD_LE) + /* + * IEEE quad precision, Little Endian. Bit representation is + * | s |eeeeeeeeeee|mmmmmmmm................mmmmmmm| + * |1 bit| 15 bits | 112 bits | + * | a[1] | a[0] | + */ + typedef npy_uint64 IEEEl2bitsrep_part; + + union IEEEl2bitsrep { + npy_longdouble e; + IEEEl2bitsrep_part a[2]; + }; + + #define LDBL_MANL_INDEX 0 + #define LDBL_MANL_MASK 0xFFFFFFFFFFFFFFFF + #define LDBL_MANL_SHIFT 0 + + #define LDBL_MANH_INDEX 1 + #define LDBL_MANH_MASK 0x0000FFFFFFFFFFFF + #define LDBL_MANH_SHIFT 0 + + #define LDBL_EXP_INDEX 1 + #define LDBL_EXP_MASK 0x7FFF000000000000 + #define LDBL_EXP_SHIFT 48 + + #define LDBL_SIGN_INDEX 1 + #define LDBL_SIGN_MASK 0x8000000000000000 + #define LDBL_SIGN_SHIFT 63 + + #define LDBL_NBIT 0 + + typedef npy_uint64 ldouble_man_t; + typedef npy_uint64 ldouble_exp_t; + typedef npy_uint32 ldouble_sign_t; #endif #ifndef HAVE_LDOUBLE_DOUBLE_DOUBLE_BE |