26#ifndef LIBM_UTIL_AMD_H_INCLUDED
27#define LIBM_UTIL_AMD_H_INCLUDED 1
29#define inline __inline
35#define MULTIPLIER_SP 24
36#define MULTIPLIER_DP 53
44#define SIGNBIT_DP64 0x8000000000000000
45#define EXPBITS_DP64 0x7ff0000000000000
46#define MANTBITS_DP64 0x000fffffffffffff
47#define ONEEXPBITS_DP64 0x3ff0000000000000
48#define TWOEXPBITS_DP64 0x4000000000000000
49#define HALFEXPBITS_DP64 0x3fe0000000000000
50#define IMPBIT_DP64 0x0010000000000000
51#define QNANBITPATT_DP64 0x7ff8000000000000
52#define INDEFBITPATT_DP64 0xfff8000000000000
53#define PINFBITPATT_DP64 0x7ff0000000000000
54#define NINFBITPATT_DP64 0xfff0000000000000
55#define EXPBIAS_DP64 1023
56#define EXPSHIFTBITS_DP64 52
57#define BIASEDEMIN_DP64 1
58#define EMIN_DP64 -1022
59#define BIASEDEMAX_DP64 2046
61#define LAMBDA_DP64 1.0e300
62#define MANTLENGTH_DP64 53
63#define BASEDIGITS_DP64 15
68#define SIGNBIT_SP32 0x80000000
69#define EXPBITS_SP32 0x7f800000
70#define MANTBITS_SP32 0x007fffff
71#define ONEEXPBITS_SP32 0x3f800000
72#define TWOEXPBITS_SP32 0x40000000
73#define HALFEXPBITS_SP32 0x3f000000
74#define IMPBIT_SP32 0x00800000
75#define QNANBITPATT_SP32 0x7fc00000
76#define INDEFBITPATT_SP32 0xffc00000
77#define PINFBITPATT_SP32 0x7f800000
78#define NINFBITPATT_SP32 0xff800000
79#define EXPBIAS_SP32 127
80#define EXPSHIFTBITS_SP32 23
81#define BIASEDEMIN_SP32 1
83#define BIASEDEMAX_SP32 254
85#define LAMBDA_SP32 1.0e30
86#define MANTLENGTH_SP32 24
87#define BASEDIGITS_SP32 7
89#define CLASS_SIGNALLING_NAN 1
90#define CLASS_QUIET_NAN 2
91#define CLASS_NEGATIVE_INFINITY 3
92#define CLASS_NEGATIVE_NORMAL_NONZERO 4
93#define CLASS_NEGATIVE_DENORMAL 5
94#define CLASS_NEGATIVE_ZERO 6
95#define CLASS_POSITIVE_ZERO 7
96#define CLASS_POSITIVE_DENORMAL 8
97#define CLASS_POSITIVE_NORMAL_NONZERO 9
98#define CLASS_POSITIVE_INFINITY 10
100#define OLD_BITS_SP32(x) (*((unsigned int *)&x))
101#define OLD_BITS_DP64(x) (*((unsigned long long *)&x))
105#define GET_BITS_SP32(x, ux) \
107 volatile union {float f; unsigned int i;} _bitsy; \
111#define PUT_BITS_SP32(ux, x) \
113 volatile union {float f; unsigned int i;} _bitsy; \
118#define GET_BITS_DP64(x, ux) \
120 volatile union {double d; unsigned long long i;} _bitsy; \
124#define PUT_BITS_DP64(ux, x) \
126 volatile union {double d; unsigned long long i;} _bitsy; \
133#define AMD_F_OVERFLOW 0x00000001
134#define AMD_F_UNDERFLOW 0x00000002
135#define AMD_F_DIVBYZERO 0x00000004
136#define AMD_F_INVALID 0x00000008
137#define AMD_F_INEXACT 0x00000010
140#define AMD_F_EXTENDED 0x00000300
141#define AMD_F_DOUBLE 0x00000200
142#define AMD_F_SINGLE 0x00000000
145#define AMD_F_RC_NEAREST 0x00000000
146#define AMD_F_RC_DOWN 0x00002000
147#define AMD_F_RC_UP 0x00004000
148#define AMD_F_RC_ZERO 0x00006000
static const double VAL_2PMULTIPLIER_DP
static const double VAL_2PMMULTIPLIER_DP
static const float VAL_2PMULTIPLIER_SP
static const float VAL_2PMMULTIPLIER_SP