#define TRUE 1
#define FALSE 0
-#ifdef HAVE_LONGDOUBLE
typedef long double ldouble;
-#endif
static void header (void)
{
check(float,"float","float",equal_float,main_float)
check(double,"double","double",equal_double,main_double)
-#ifdef HAVE_LONGDOUBLE
check(ldouble,"long_double","long double",equal_ldouble,main_ldouble)
-#endif
/* Some systems (arm/linux) store doubles as little endian but with higher
* and lower word reversed. */
printf("\n");
}
-int main()
-{
+int main(int argc, char *argv[])
+{ if (freopen(argc==1 ? "conftest.h" : argv[1], "w", stdout) == NULL) return 1;
header();
main_float();
main_double();
-#ifdef HAVE_LONGDOUBLE
main_ldouble();
-#endif
flipped_double();
if (ferror(stdout) || fclose(stdout)) return 1;
typedef unsigned short ushort;
typedef unsigned /* int */ uint;
typedef unsigned long ulong;
-#ifdef HAVE_LONGLONG
typedef long long longlong;
typedef unsigned long long ulonglong;
-#endif
typedef int (function)();
static int random_table[256] = /* 2048 zufällige Bits, hier von pi */
static int uchar_bitsize, ushort_bitsize, uint_bitsize, ulong_bitsize;
static boolean char_uchar_same, short_ushort_same, int_uint_same, long_ulong_same;
static int pointer_bitsize;
-#ifdef HAVE_LONGLONG
static int longlong_bitsize, ulonglong_bitsize;
static boolean longlong_ulonglong_same;
-#endif
void main1(void) {
#define get_unsigned_integer_bitsize(type,where) \
print_integer_bitsize(short,"short",short_bitsize);
print_integer_bitsize(int,"int",int_bitsize);
print_integer_bitsize(long,"long",long_bitsize);
-#ifdef HAVE_LONGLONG
get_signed_integer_bitsize(longlong,ulonglong,longlong_bitsize);
print_integer_bitsize(longlong,"long long",longlong_bitsize);
-#endif
get_unsigned_integer_bitsize(uchar,uchar_bitsize);
get_unsigned_integer_bitsize(ushort,ushort_bitsize);
get_unsigned_integer_bitsize(uint,uint_bitsize);
print_integer_bitsize(ushort,"unsigned short",ushort_bitsize);
print_integer_bitsize(uint,"unsigned int",uint_bitsize);
print_integer_bitsize(ulong,"unsigned long",ulong_bitsize);
-#ifdef HAVE_LONGLONG
get_unsigned_integer_bitsize(ulonglong,ulonglong_bitsize);
print_integer_bitsize(ulonglong,"unsigned long long",ulonglong_bitsize);
-#endif
}
void main2(void) {
compare_integer_bitsizes("short","unsigned short",short_bitsize,ushort_bitsize);
compare_integer_bitsizes("int","unsigned int",int_bitsize,uint_bitsize);
compare_integer_bitsizes("long","unsigned long",long_bitsize,ulong_bitsize);
-#ifdef HAVE_LONGLONG
compare_integer_bitsizes("long long","unsigned long long",longlong_bitsize,ulonglong_bitsize);
-#endif
}
#define get_a_random(type,bitsize,where) \
compare_integer_representation(short,ushort,"short","unsigned short",short_bitsize,ushort_bitsize,short_ushort_same);
compare_integer_representation(int,uint,"int","unsigned int",int_bitsize,uint_bitsize,int_uint_same);
compare_integer_representation(long,ulong,"long","unsigned long",long_bitsize,ulong_bitsize,long_ulong_same);
-#ifdef HAVE_LONGLONG
compare_integer_representation(longlong,ulonglong,"long long","unsigned long long",longlong_bitsize,ulonglong_bitsize,longlong_ulonglong_same);
-#endif
printf("\n");
}
test_integer_ushift(ushort,"unsigned short",ushort_bitsize);
test_integer_ushift(uint,"unsigned int",uint_bitsize);
test_integer_ushift(ulong,"unsigned long",ulong_bitsize);
-#ifdef HAVE_LONGLONG
test_integer_ushift(ulonglong,"unsigned long long",ulonglong_bitsize);
-#endif
test_integer_sshift(schar,"char",char_bitsize);
test_integer_sshift(short,"short",short_bitsize);
test_integer_sshift(int,"int",int_bitsize);
test_integer_sshift(long,"long",long_bitsize);
-#ifdef HAVE_LONGLONG
test_integer_sshift(longlong,"long long",longlong_bitsize);
-#endif
}
void main5(void) {
test_integer_casts(ushort,short,"unsigned short","short",ushort_bitsize,short_bitsize,0);
test_integer_casts(uint,int,"unsigned int","int",uint_bitsize,int_bitsize,0);
test_integer_casts(ulong,long,"unsigned long","long",ulong_bitsize,long_bitsize,0);
-#ifdef HAVE_LONGLONG
test_integer_casts(longlong,ulonglong,"long long","unsigned long long",longlong_bitsize,ulonglong_bitsize,0);
test_integer_casts(ulonglong,longlong,"unsigned long long","long long",ulonglong_bitsize,longlong_bitsize,0);
-#endif
/* dann Casts zwischen Integers unterschiedlicher Größe, aber gleichen Vorzeichens: */
test_integer_casts(uchar,ushort,"unsigned char","unsigned short",uchar_bitsize,ushort_bitsize,1);
test_integer_casts(uchar,uint,"unsigned char","unsigned int",uchar_bitsize,uint_bitsize,1);
test_integer_casts(ushort,uint,"unsigned short","unsigned int",ushort_bitsize,uint_bitsize,1);
test_integer_casts(ushort,ulong,"unsigned short","unsigned long",ushort_bitsize,ulong_bitsize,1);
test_integer_casts(uint,ulong,"unsigned int","unsigned long",uint_bitsize,ulong_bitsize,1);
-#ifdef HAVE_LONGLONG
test_integer_casts(uchar,ulonglong,"unsigned char","unsigned long long",uchar_bitsize,ulonglong_bitsize,1);
test_integer_casts(ushort,ulonglong,"unsigned short","unsigned long long",ushort_bitsize,ulonglong_bitsize,1);
test_integer_casts(uint,ulonglong,"unsigned int","unsigned long long",uint_bitsize,ulonglong_bitsize,1);
test_integer_casts(ulong,ulonglong,"unsigned long","unsigned long long",ulong_bitsize,ulonglong_bitsize,1);
-#endif
test_integer_casts(schar,short,"char","short",char_bitsize,short_bitsize,2);
test_integer_casts(schar,int,"char","int",char_bitsize,int_bitsize,2);
test_integer_casts(schar,long,"char","long",char_bitsize,long_bitsize,2);
test_integer_casts(short,int,"short","int",short_bitsize,int_bitsize,2);
test_integer_casts(short,long,"short","long",short_bitsize,long_bitsize,2);
test_integer_casts(int,long,"int","long",int_bitsize,long_bitsize,2);
-#ifdef HAVE_LONGLONG
test_integer_casts(schar,longlong,"char","long long",char_bitsize,longlong_bitsize,2);
test_integer_casts(short,longlong,"short","long long",short_bitsize,longlong_bitsize,2);
test_integer_casts(int,longlong,"int","long long",int_bitsize,longlong_bitsize,2);
test_integer_casts(long,longlong,"long","long long",long_bitsize,longlong_bitsize,2);
-#endif
/* dann Casts zwischen Integers unterschiedlicher Größe und unterschiedlichen Vorzeichens: */
test_integer_casts(uchar,short,"unsigned char","short",uchar_bitsize,short_bitsize,1);
test_integer_casts(uchar,int,"unsigned char","int",uchar_bitsize,int_bitsize,1);
test_integer_casts(ushort,int,"unsigned short","int",ushort_bitsize,int_bitsize,1);
test_integer_casts(ushort,long,"unsigned short","long",ushort_bitsize,long_bitsize,1);
test_integer_casts(uint,long,"unsigned int","long",uint_bitsize,long_bitsize,1);
-#ifdef HAVE_LONGLONG
test_integer_casts(uchar,longlong,"unsigned char","long long",uchar_bitsize,longlong_bitsize,1);
test_integer_casts(ushort,longlong,"unsigned short","long long",ushort_bitsize,longlong_bitsize,1);
test_integer_casts(uint,longlong,"unsigned int","long long",uint_bitsize,longlong_bitsize,1);
test_integer_casts(ulong,longlong,"unsigned long","long long",ulong_bitsize,longlong_bitsize,1);
-#endif
test_integer_casts(schar,ushort,"char","unsigned short",char_bitsize,ushort_bitsize,2);
test_integer_casts(schar,uint,"char","unsigned int",char_bitsize,uint_bitsize,2);
test_integer_casts(schar,ulong,"char","unsigned long",char_bitsize,ulong_bitsize,2);
test_integer_casts(short,uint,"short","unsigned int",short_bitsize,uint_bitsize,2);
test_integer_casts(short,ulong,"short","unsigned long",short_bitsize,ulong_bitsize,2);
test_integer_casts(int,ulong,"int","unsigned long",int_bitsize,ulong_bitsize,2);
-#ifdef HAVE_LONGLONG
test_integer_casts(schar,ulonglong,"char","unsigned long long",char_bitsize,ulonglong_bitsize,2);
test_integer_casts(short,ulonglong,"short","unsigned long long",short_bitsize,ulonglong_bitsize,2);
test_integer_casts(int,ulonglong,"int","unsigned long long",int_bitsize,ulonglong_bitsize,2);
test_integer_casts(long,ulonglong,"long","unsigned long long",long_bitsize,ulonglong_bitsize,2);
-#endif
}
void main6(void) {
get_alignment(short,"short"); get_alignment(ushort,"unsigned short");
get_alignment(int,"int"); get_alignment(uint,"unsigned int");
get_alignment(long,"long"); get_alignment(ulong,"unsigned long");
-#ifdef HAVE_LONGLONG
get_alignment(longlong,"long long"); get_alignment(ulonglong,"unsigned long long");
-#endif
get_alignment(float,"float");
get_alignment(double,"double");
get_alignment(char*,"char *");
get_endian(ushort,"unsigned short",ushort_bitsize);
get_endian(uint,"unsigned int",uint_bitsize);
get_endian(ulong,"unsigned long",ulong_bitsize);
-#ifdef HAVE_LONGLONG
get_endian(ulonglong,"unsigned long long",ulonglong_bitsize);
-#endif
printf("\n");
}
printf("#error \"Unknown stack model -- incorrect C semantics!!\"\n");
}
-int main()
-{ main1();
+int main(int argc, char *argv[])
+{ if (freopen(argc==1 ? "conftest.h" : argv[1], "w", stdout) == NULL) return 1;
+ main1();
main2();
main3();
main4();
AC_LANG([C++])
AX_CXX_COMPILE_STDCXX([11], [ext], [optional])
dnl
-CL_LONGLONG
- dnl DEFS HAVE_LONGLONG
-CL_LONGDOUBLE
- dnl DEFS HAVE_LONGDOUBLE
-dnl
dnl checks for header files
dnl
AC_CHECK_HEADERS([unistd.h])
cl_N (const unsigned int); // argument must be < 2^29
cl_N (const long);
cl_N (const unsigned long);
-#ifdef HAVE_LONGLONG
cl_N (const long long);
cl_N (const unsigned long long);
-#endif
cl_N (const float);
cl_N (const double);
cl_N& operator= (const int); // |argument| must be < 2^29
cl_N& operator= (const unsigned long);
cl_N& operator= (const float);
cl_N& operator= (const double);
-#ifdef HAVE_LONGLONG
cl_N& operator= (const long long);
cl_N& operator= (const unsigned long long);
-#endif
// Other constructors.
cl_N (const char *);
// Private constructor.
CL_DEFINE_INT_ASSIGNMENT_OPERATORS(cl_N)
CL_DEFINE_LONG_CONSTRUCTORS(cl_N)
CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_N)
-#ifdef HAVE_LONGLONG
CL_DEFINE_LONGLONG_CONSTRUCTORS(cl_N)
CL_DEFINE_LONGLONG_ASSIGNMENT_OPERATORS(cl_N)
-#endif
CL_DEFINE_FLOAT_CONSTRUCTOR(cl_N)
CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_N)
#include "cln/host_cpu.h"
#include "cln/version.h"
-/*
- * FIXME: this should not be exposed to user. Or at least it should be
- * renamed to CL_HAVE_LONGLONG or something like that.
- */
-/* compiler supports the `long long' type */
-#undef HAVE_LONGLONG
-
/*
* Numbers in the heap are stored as "digit" (or "limb" in GMP speak)
* sequences. A digit is an unsigned int with sizeof(void *)*CHAR_BIT bits.
{ return cl_I(x) + y; }
inline const cl_F operator+ (const unsigned long x, const cl_F& y)
{ return cl_I(x) + y; }
-#ifdef HAVE_LONGLONG
inline const cl_F operator+ (const long long x, const cl_F& y)
{ return cl_I(x) + y; }
inline const cl_F operator+ (const unsigned long long x, const cl_F& y)
{ return cl_I(x) + y; }
-#endif
inline const cl_F operator+ (const float x, const cl_F& y)
{ return cl_F(x) + y; }
inline const cl_F operator+ (const double x, const cl_F& y)
{ return x + cl_I(y); }
inline const cl_F operator+ (const cl_F& x, const unsigned long y)
{ return x + cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_F operator+ (const cl_F& x, const long long y)
{ return x + cl_I(y); }
inline const cl_F operator+ (const cl_F& x, const unsigned long long y)
{ return x + cl_I(y); }
-#endif
inline const cl_F operator+ (const cl_F& x, const float y)
{ return x + cl_F(y); }
inline const cl_F operator+ (const cl_F& x, const double y)
{ return cl_I(x) - y; }
inline const cl_F operator- (const unsigned long x, const cl_F& y)
{ return cl_I(x) - y; }
-#ifdef HAVE_LONGLONG
inline const cl_F operator- (const long long x, const cl_F& y)
{ return cl_I(x) - y; }
inline const cl_F operator- (const unsigned long long x, const cl_F& y)
{ return cl_I(x) - y; }
-#endif
inline const cl_F operator- (const float x, const cl_F& y)
{ return cl_F(x) - y; }
inline const cl_F operator- (const double x, const cl_F& y)
{ return x - cl_I(y); }
inline const cl_F operator- (const cl_F& x, const unsigned long y)
{ return x - cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_F operator- (const cl_F& x, const long long y)
{ return x - cl_I(y); }
inline const cl_F operator- (const cl_F& x, const unsigned long long y)
{ return x - cl_I(y); }
-#endif
inline const cl_F operator- (const cl_F& x, const float y)
{ return x - cl_F(y); }
inline const cl_F operator- (const cl_F& x, const double y)
{ return cl_I(x) * y; }
inline const cl_R operator* (const unsigned long x, const cl_F& y)
{ return cl_I(x) * y; }
-#ifdef HAVE_LONGLONG
inline const cl_R operator* (const long long x, const cl_F& y)
{ return cl_I(x) * y; }
inline const cl_R operator* (const unsigned long long x, const cl_F& y)
{ return cl_I(x) * y; }
-#endif
inline const cl_F operator* (const float x, const cl_F& y)
{ return cl_F(x) * y; }
inline const cl_F operator* (const double x, const cl_F& y)
{ return x * cl_I(y); }
inline const cl_R operator* (const cl_F& x, const unsigned long y)
{ return x * cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_R operator* (const cl_F& x, const long long y)
{ return x * cl_I(y); }
inline const cl_R operator* (const cl_F& x, const unsigned long long y)
{ return x * cl_I(y); }
-#endif
inline const cl_F operator* (const cl_F& x, const float y)
{ return x * cl_F(y); }
inline const cl_F operator* (const cl_F& x, const double y)
{ return x / cl_I(y); }
inline const cl_F operator/ (const cl_F& x, const unsigned long y)
{ return x / cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_F operator/ (const cl_F& x, const long long y)
{ return x / cl_I(y); }
inline const cl_F operator/ (const cl_F& x, const unsigned long long y)
{ return x / cl_I(y); }
-#endif
inline const cl_F operator/ (const cl_F& x, const float y)
{ return x / cl_F(y); }
inline const cl_F operator/ (const cl_F& x, const double y)
{ return cl_I(x) / y; }
inline const cl_R operator/ (const unsigned long x, const cl_F& y)
{ return cl_I(x) / y; }
-#ifdef HAVE_LONGLONG
inline const cl_R operator/ (const long long x, const cl_F& y)
{ return cl_I(x) / y; }
inline const cl_R operator/ (const unsigned long long x, const cl_F& y)
{ return cl_I(x) / y; }
-#endif
inline const cl_F operator/ (const float x, const cl_F& y)
{ return cl_F(x) / y; }
inline const cl_F operator/ (const double x, const cl_F& y)
{ return cl_I(x) + y; }
inline const cl_I operator+ (const unsigned long x, const cl_I& y)
{ return cl_I(x) + y; }
-#ifdef HAVE_LONGLONG
inline const cl_I operator+ (const long long x, const cl_I& y)
{ return cl_I(x) + y; }
inline const cl_I operator+ (const unsigned long long x, const cl_I& y)
{ return cl_I(x) + y; }
-#endif
inline const cl_I operator+ (const cl_I& x, const int y)
{ return x + cl_I(y); }
inline const cl_I operator+ (const cl_I& x, const unsigned int y)
{ return x + cl_I(y); }
inline const cl_I operator+ (const cl_I& x, const unsigned long y)
{ return x + cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_I operator+ (const cl_I& x, const long long y)
{ return x + cl_I(y); }
inline const cl_I operator+ (const cl_I& x, const unsigned long long y)
{ return x + cl_I(y); }
-#endif
// (- x), wenn x ein Integer ist. Ergebnis Integer.
extern const cl_I operator- (const cl_I& x);
{ return cl_I(x) - y; }
inline const cl_I operator- (const unsigned long x, const cl_I& y)
{ return cl_I(x) - y; }
-#ifdef HAVE_LONGLONG
inline const cl_I operator- (const long long x, const cl_I& y)
{ return cl_I(x) - y; }
inline const cl_I operator- (const unsigned long long x, const cl_I& y)
{ return cl_I(x) - y; }
-#endif
inline const cl_I operator- (const cl_I& x, const int y)
{ return x - cl_I(y); }
inline const cl_I operator- (const cl_I& x, const unsigned int y)
{ return x - cl_I(y); }
inline const cl_I operator- (const cl_I& x, const unsigned long y)
{ return x - cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_I operator- (const cl_I& x, const long long y)
{ return x - cl_I(y); }
inline const cl_I operator- (const cl_I& x, const unsigned long long y)
{ return x - cl_I(y); }
-#endif
// (abs x), wenn x ein Integer ist. Ergebnis Integer.
extern const cl_I abs (const cl_I& x);
{ return cl_I(x) * y; }
inline const cl_I operator* (const unsigned long x, const cl_I& y)
{ return cl_I(x) * y; }
-#ifdef HAVE_LONGLONG
inline const cl_I operator* (const long long x, const cl_I& y)
{ return cl_I(x) * y; }
inline const cl_I operator* (const unsigned long long x, const cl_I& y)
{ return cl_I(x) * y; }
-#endif
inline const cl_I operator* (const cl_I& x, const int y)
{ return x * cl_I(y); }
inline const cl_I operator* (const cl_I& x, const unsigned int y)
{ return x * cl_I(y); }
inline const cl_I operator* (const cl_I& x, const unsigned long y)
{ return x * cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_I operator* (const cl_I& x, const long long y)
{ return x * cl_I(y); }
inline const cl_I operator* (const cl_I& x, const unsigned long long y)
{ return x * cl_I(y); }
-#endif
// (EXPT x 2), wo x Integer ist.
extern const cl_I square (const cl_I& x);
cl_I (const unsigned int); // argument must be < 2^29
cl_I (const long);
cl_I (const unsigned long);
-#ifdef HAVE_LONGLONG
cl_I (const long long);
cl_I (const unsigned long long);
-#endif
cl_I& operator= (const int); // |argument| must be < 2^29
cl_I& operator= (const unsigned int); // argument must be < 2^29
cl_I& operator= (const long);
cl_I& operator= (const unsigned long);
-#ifdef HAVE_LONGLONG
cl_I& operator= (const long long);
cl_I& operator= (const unsigned long long);
-#endif
// Other constructors.
cl_I (const char *);
// Private constructor.
CL_DEFINE_INT_ASSIGNMENT_OPERATORS(cl_I)
CL_DEFINE_LONG_CONSTRUCTORS(cl_I)
CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_I)
-#ifdef HAVE_LONGLONG
CL_DEFINE_LONGLONG_CONSTRUCTORS(cl_I)
CL_DEFINE_LONGLONG_ASSIGNMENT_OPERATORS(cl_I)
-#endif
} // namespace cln
extern void fprintdecimal (std::ostream& stream, unsigned long x);
extern void fprintdecimal (std::ostream& stream, long x);
-#ifdef HAVE_LONGLONG
extern void fprintdecimal (std::ostream& stream, unsigned long long x);
extern void fprintdecimal (std::ostream& stream, long long x);
-#endif
extern void fprinthexadecimal (std::ostream& stream, unsigned int x);
extern void fprinthexadecimal (std::ostream& stream, int x);
extern void fprinthexadecimal (std::ostream& stream, unsigned long x);
extern void fprinthexadecimal (std::ostream& stream, long x);
-#ifdef HAVE_LONGLONG
extern void fprinthexadecimal (std::ostream& stream, unsigned long long x);
extern void fprinthexadecimal (std::ostream& stream, long long x);
-#endif
struct cl_print_flags;
{ return cl_I(x) * y; }
inline const cl_R operator* (const unsigned long x, const cl_LF& y)
{ return cl_I(x) * y; }
-#ifdef HAVE_LONGLONG
inline const cl_R operator* (const long long x, const cl_LF& y)
{ return cl_I(x) * y; }
inline const cl_R operator* (const unsigned long long x, const cl_LF& y)
{ return cl_I(x) * y; }
-#endif
inline const cl_R operator* (const cl_LF& x, const int y)
{ return x * cl_I(y); }
inline const cl_R operator* (const cl_LF& x, const unsigned int y)
{ return x * cl_I(y); }
inline const cl_R operator* (const cl_LF& x, const unsigned long y)
{ return x * cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_R operator* (const cl_LF& x, const long long y)
{ return x * cl_I(y); }
inline const cl_R operator* (const cl_LF& x, const unsigned long long y)
{ return x * cl_I(y); }
-#endif
// Spezialfall x = y.
// Liefert zu einem Long-Float x : (* x x), ein LF.
extern const cl_LF square (const cl_LF& x);
{ return x / cl_I(y); }
inline const cl_LF operator/ (const cl_LF& x, const unsigned long y)
{ return x / cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_LF operator/ (const cl_LF& x, const long long y)
{ return x / cl_I(y); }
inline const cl_LF operator/ (const cl_LF& x, const unsigned long long y)
{ return x / cl_I(y); }
-#endif
inline const cl_R operator/ (const int x, const cl_LF& y)
{ return cl_I(x) / y; }
inline const cl_R operator/ (const unsigned int x, const cl_LF& y)
{ return cl_I(x) / y; }
inline const cl_R operator/ (const unsigned long x, const cl_LF& y)
{ return cl_I(x) / y; }
-#ifdef HAVE_LONGLONG
inline const cl_R operator/ (const long long x, const cl_LF& y)
{ return cl_I(x) / y; }
inline const cl_R operator/ (const unsigned long long x, const cl_LF& y)
{ return cl_I(x) / y; }
-#endif
// Liefert zu einem Long-Float x>=0 : (sqrt x), ein LF.
extern const cl_LF sqrt (const cl_LF& x);
}
#endif
-#ifdef HAVE_LONGLONG
#if (long_long_bitsize==64)
// `long' == `sintQ', `unsigned long' == `uintQ'.
#define CL_DEFINE_LONGLONG_CONSTRUCTORS(_class_) \
return *this; \
}
#endif
-#endif
namespace cln {
cl_number (const unsigned int); // argument must be < 2^29
cl_number (const long);
cl_number (const unsigned long);
-#ifdef HAVE_LONGLONG
cl_number (const long long);
cl_number (const unsigned long long);
-#endif
cl_number (const float);
cl_number (const double);
cl_number& operator= (const int); // |argument| must be < 2^29
cl_number& operator= (const unsigned long);
cl_number& operator= (const float);
cl_number& operator= (const double);
-#ifdef HAVE_LONGLONG
cl_number& operator= (const long long);
cl_number& operator= (const unsigned long long);
-#endif
// Other constructors.
// cl_number (const char *);
// Private pointer manipulations.
CL_DEFINE_INT_ASSIGNMENT_OPERATORS(cl_number)
CL_DEFINE_LONG_CONSTRUCTORS(cl_number)
CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_number)
-#ifdef HAVE_LONGLONG
CL_DEFINE_LONGLONG_CONSTRUCTORS(cl_number)
CL_DEFINE_LONGLONG_ASSIGNMENT_OPERATORS(cl_number)
-#endif
CL_DEFINE_FLOAT_CONSTRUCTOR(cl_number)
CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_number)
{ return cl_combine_impl(tag, (cl_uint)value); }
inline cl_uint cl_combine (cl_uint tag, long value)
{ return cl_combine_impl(tag, (cl_sint)value); }
-#ifdef HAVE_LONGLONG
inline cl_uint cl_combine (cl_uint tag, unsigned long long value)
{ return cl_combine_impl(tag, (cl_uint)value); }
inline cl_uint cl_combine (cl_uint tag, long long value)
{ return cl_combine_impl(tag, (cl_uint)value); }
-#endif
// Definition of the tags.
#if !defined(CL_WIDE_POINTERS)
{ return cl_I(x) + y; }
inline const cl_RA operator+ (const unsigned long x, const cl_RA& y)
{ return cl_I(x) + y; }
-#ifdef HAVE_LONGLONG
inline const cl_RA operator+ (const long long x, const cl_RA& y)
{ return cl_I(x) + y; }
inline const cl_RA operator+ (const unsigned long long x, const cl_RA& y)
{ return cl_I(x) + y; }
-#endif
inline const cl_RA operator+ (const cl_RA& x, const int y)
{ return x + cl_I(y); }
inline const cl_RA operator+ (const cl_RA& x, const unsigned int y)
{ return x + cl_I(y); }
inline const cl_RA operator+ (const cl_RA& x, const unsigned long y)
{ return x + cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_RA operator+ (const cl_RA& x, const long long y)
{ return x + cl_I(y); }
inline const cl_RA operator+ (const cl_RA& x, const unsigned long long y)
{ return x + cl_I(y); }
-#endif
// (- r s), wo r und s rationale Zahlen sind.
extern const cl_RA operator- (const cl_RA& r, const cl_RA& s);
{ return cl_I(x) - y; }
inline const cl_RA operator- (const unsigned long x, const cl_RA& y)
{ return cl_I(x) - y; }
-#ifdef HAVE_LONGLONG
inline const cl_RA operator- (const long long x, const cl_RA& y)
{ return cl_I(x) - y; }
inline const cl_RA operator- (const unsigned long long x, const cl_RA& y)
{ return cl_I(x) - y; }
-#endif
inline const cl_RA operator- (const cl_RA& x, const int y)
{ return x - cl_I(y); }
inline const cl_RA operator- (const cl_RA& x, const unsigned int y)
{ return x - cl_I(y); }
inline const cl_RA operator- (const cl_RA& x, const unsigned long y)
{ return x - cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_RA operator- (const cl_RA& x, const long long y)
{ return x - cl_I(y); }
inline const cl_RA operator- (const cl_RA& x, const unsigned long long y)
{ return x - cl_I(y); }
-#endif
// (1+ r), wo r eine rationale Zahl ist.
extern const cl_RA plus1 (const cl_RA& r);
{ return cl_I(x) * y; }
inline const cl_RA operator* (const unsigned long x, const cl_RA& y)
{ return cl_I(x) * y; }
-#ifdef HAVE_LONGLONG
inline const cl_RA operator* (const long long x, const cl_RA& y)
{ return cl_I(x) * y; }
inline const cl_RA operator* (const unsigned long long x, const cl_RA& y)
{ return cl_I(x) * y; }
-#endif
inline const cl_RA operator* (const cl_RA& x, const int y)
{ return x * cl_I(y); }
inline const cl_RA operator* (const cl_RA& x, const unsigned int y)
{ return x * cl_I(y); }
inline const cl_RA operator* (const cl_RA& x, const unsigned long y)
{ return x * cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_RA operator* (const cl_RA& x, const long long y)
{ return x * cl_I(y); }
inline const cl_RA operator* (const cl_RA& x, const unsigned long long y)
{ return x * cl_I(y); }
-#endif
// Quadrat (* r r), wo r eine rationale Zahl ist.
extern const cl_RA square (const cl_RA& r);
{ return cl_I(x) / y; }
inline const cl_RA operator/ (const unsigned long x, const cl_RA& y)
{ return cl_I(x) / y; }
-#ifdef HAVE_LONGLONG
inline const cl_RA operator/ (const long long x, const cl_RA& y)
{ return cl_I(x) / y; }
inline const cl_RA operator/ (const unsigned long long x, const cl_RA& y)
{ return cl_I(x) / y; }
-#endif
inline const cl_RA operator/ (const cl_RA& x, const int y)
{ return x / cl_I(y); }
inline const cl_RA operator/ (const cl_RA& x, const unsigned int y)
{ return x / cl_I(y); }
inline const cl_RA operator/ (const cl_RA& x, const unsigned long y)
{ return x / cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_RA operator/ (const cl_RA& x, const long long y)
{ return x / cl_I(y); }
inline const cl_RA operator/ (const cl_RA& x, const unsigned long long y)
{ return x / cl_I(y); }
-#endif
// Return type for rounding operators.
// x / y --> (q,r) with x = y*q+r.
inline cl_RA& operator+= (cl_RA& x, const unsigned int y) { return x = x + y; }
inline cl_RA& operator+= (cl_RA& x, const long y) { return x = x + y; }
inline cl_RA& operator+= (cl_RA& x, const unsigned long y) { return x = x + y; }
-#ifdef HAVE_LONGLONG
inline cl_RA& operator+= (cl_RA& x, const long long y) { return x = x + y; }
inline cl_RA& operator+= (cl_RA& x, const unsigned long long y) { return x = x + y; }
-#endif
inline cl_RA& operator++ /* prefix */ (cl_RA& x) { return x = plus1(x); }
inline void operator++ /* postfix */ (cl_RA& x, int dummy) { (void)dummy; x = plus1(x); }
inline cl_RA& operator-= (cl_RA& x, const cl_RA& y) { return x = x - y; }
inline cl_RA& operator-= (cl_RA& x, const unsigned int y) { return x = x - y; }
inline cl_RA& operator-= (cl_RA& x, const long y) { return x = x - y; }
inline cl_RA& operator-= (cl_RA& x, const unsigned long y) { return x = x - y; }
-#ifdef HAVE_LONGLONG
inline cl_RA& operator-= (cl_RA& x, const long long y) { return x = x - y; }
inline cl_RA& operator-= (cl_RA& x, const unsigned long long y) { return x = x - y; }
-#endif
inline cl_RA& operator-- /* prefix */ (cl_RA& x) { return x = minus1(x); }
inline void operator-- /* postfix */ (cl_RA& x, int dummy) { (void)dummy; x = minus1(x); }
inline cl_RA& operator*= (cl_RA& x, const cl_RA& y) { return x = x * y; }
cl_RA (const unsigned int); // argument must be < 2^29
cl_RA (const long);
cl_RA (const unsigned long);
-#ifdef HAVE_LONGLONG
cl_RA (const long long);
cl_RA (const unsigned long long);
-#endif
cl_RA& operator= (const int); // |argument| must be < 2^29
cl_RA& operator= (const unsigned int); // argument must be < 2^29
cl_RA& operator= (const long);
cl_RA& operator= (const unsigned long);
-#ifdef HAVE_LONGLONG
cl_RA& operator= (const long long);
cl_RA& operator= (const unsigned long long);
-#endif
// Other constructors.
cl_RA (const char *);
// Private constructor.
CL_DEFINE_INT_ASSIGNMENT_OPERATORS(cl_RA)
CL_DEFINE_LONG_CONSTRUCTORS(cl_RA)
CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_RA)
-#ifdef HAVE_LONGLONG
CL_DEFINE_LONGLONG_CONSTRUCTORS(cl_RA)
CL_DEFINE_LONGLONG_ASSIGNMENT_OPERATORS(cl_RA)
-#endif
} // namespace cln
{ return cl_I(x) + y; }
inline const cl_R operator+ (const unsigned long x, const cl_R& y)
{ return cl_I(x) + y; }
-#ifdef HAVE_LONGLONG
inline const cl_R operator+ (const long long x, const cl_R& y)
{ return cl_I(x) + y; }
inline const cl_R operator+ (const unsigned long long x, const cl_R& y)
{ return cl_I(x) + y; }
-#endif
inline const cl_F operator+ (const float x, const cl_R& y)
{ return The(cl_F)(cl_R(x) + y); }
inline const cl_F operator+ (const double x, const cl_R& y)
{ return x + cl_I(y); }
inline const cl_R operator+ (const cl_R& x, const unsigned long y)
{ return x + cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_R operator+ (const cl_R& x, const long long y)
{ return x + cl_I(y); }
inline const cl_R operator+ (const cl_R& x, const unsigned long long y)
{ return x + cl_I(y); }
-#endif
inline const cl_F operator+ (const cl_R& x, const float y)
{ return The(cl_F)(x + cl_R(y)); }
inline const cl_F operator+ (const cl_R& x, const double y)
{ return cl_I(x) - y; }
inline const cl_R operator- (const unsigned long x, const cl_R& y)
{ return cl_I(x) - y; }
-#ifdef HAVE_LONGLONG
inline const cl_R operator- (const long long x, const cl_R& y)
{ return cl_I(x) - y; }
inline const cl_R operator- (const unsigned long long x, const cl_R& y)
{ return cl_I(x) - y; }
-#endif
inline const cl_F operator- (const float x, const cl_R& y)
{ return The(cl_F)(cl_R(x) - y); }
inline const cl_F operator- (const double x, const cl_R& y)
{ return x - cl_I(y); }
inline const cl_R operator- (const cl_R& x, const unsigned long y)
{ return x - cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_R operator- (const cl_R& x, const long long y)
{ return x - cl_I(y); }
inline const cl_R operator- (const cl_R& x, const unsigned long long y)
{ return x - cl_I(y); }
-#endif
inline const cl_F operator- (const cl_R& x, const float y)
{ return The(cl_F)(x - cl_R(y)); }
inline const cl_F operator- (const cl_R& x, const double y)
{ return cl_I(x) * y; }
inline const cl_R operator* (const unsigned long x, const cl_R& y)
{ return cl_I(x) * y; }
-#ifdef HAVE_LONGLONG
inline const cl_R operator* (const long long x, const cl_R& y)
{ return cl_I(x) * y; }
inline const cl_R operator* (const unsigned long long x, const cl_R& y)
{ return cl_I(x) * y; }
-#endif
inline const cl_R operator* (const float x, const cl_R& y)
{ return cl_R(x) * y; }
inline const cl_R operator* (const double x, const cl_R& y)
{ return x * cl_I(y); }
inline const cl_R operator* (const cl_R& x, const unsigned long y)
{ return x * cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_R operator* (const cl_R& x, const long long y)
{ return x * cl_I(y); }
inline const cl_R operator* (const cl_R& x, const unsigned long long y)
{ return x * cl_I(y); }
-#endif
inline const cl_R operator* (const cl_R& x, const float y)
{ return x * cl_R(y); }
inline const cl_R operator* (const cl_R& x, const double y)
{ return cl_I(x) / y; }
inline const cl_R operator/ (const unsigned long x, const cl_R& y)
{ return cl_I(x) / y; }
-#ifdef HAVE_LONGLONG
inline const cl_R operator/ (const long long x, const cl_R& y)
{ return cl_I(x) / y; }
inline const cl_R operator/ (const unsigned long long x, const cl_R& y)
{ return cl_I(x) / y; }
-#endif
inline const cl_F operator/ (const float x, const cl_R& y)
{ return The(cl_F)(cl_R(x) / y); }
inline const cl_F operator/ (const double x, const cl_R& y)
{ return x / cl_I(y); }
inline const cl_R operator/ (const cl_R& x, const unsigned long y)
{ return x / cl_I(y); }
-#ifdef HAVE_LONGLONG
inline const cl_R operator/ (const cl_R& x, const long long y)
{ return x / cl_I(y); }
inline const cl_R operator/ (const cl_R& x, const unsigned long long y)
{ return x / cl_I(y); }
-#endif
inline const cl_R operator/ (const cl_R& x, const float y)
{ return x / cl_R(y); }
inline const cl_R operator/ (const cl_R& x, const double y)
inline cl_R& operator+= (cl_R& x, const unsigned int y) { return x = x + y; }
inline cl_R& operator+= (cl_R& x, const long y) { return x = x + y; }
inline cl_R& operator+= (cl_R& x, const unsigned long y) { return x = x + y; }
-#ifdef HAVE_LONGLONG
inline cl_R& operator+= (cl_R& x, const long long y) { return x = x + y; }
inline cl_R& operator+= (cl_R& x, const unsigned long long y) { return x = x + y; }
-#endif
inline cl_F& operator+= (cl_R& x, const float y) { return static_cast<cl_F&>(x = x + y); }
inline cl_F& operator+= (cl_R& x, const double y) { return static_cast<cl_F&>(x = x + y); }
inline cl_F& operator+= (cl_F& x, const int y) { return x = x + y; }
inline cl_F& operator+= (cl_F& x, const unsigned int y) { return x = x + y; }
inline cl_F& operator+= (cl_F& x, const long y) { return x = x + y; }
inline cl_F& operator+= (cl_F& x, const unsigned long y) { return x = x + y; }
-#ifdef HAVE_LONGLONG
inline cl_F& operator+= (cl_F& x, const long long y) { return x = x + y; }
inline cl_F& operator+= (cl_F& x, const unsigned long long y) { return x = x + y; }
-#endif
inline cl_R& operator++ /* prefix */ (cl_R& x) { return x = plus1(x); }
inline void operator++ /* postfix */ (cl_R& x, int dummy) { (void)dummy; x = plus1(x); }
inline cl_R& operator-= (cl_R& x, const cl_R& y) { return x = x - y; }
inline cl_R& operator-= (cl_R& x, const unsigned int y) { return x = x - y; }
inline cl_R& operator-= (cl_R& x, const long y) { return x = x - y; }
inline cl_R& operator-= (cl_R& x, const unsigned long y) { return x = x - y; }
-#ifdef HAVE_LONGLONG
inline cl_R& operator-= (cl_R& x, const long long y) { return x = x - y; }
inline cl_R& operator-= (cl_R& x, const unsigned long long y) { return x = x - y; }
-#endif
inline cl_F& operator-= (cl_R& x, const float y) { return static_cast<cl_F&>(x = x - y); }
inline cl_F& operator-= (cl_R& x, const double y) { return static_cast<cl_F&>(x = x - y); }
inline cl_F& operator-= (cl_F& x, const int y) { return x = x - y; }
inline cl_F& operator-= (cl_F& x, const unsigned int y) { return x = x - y; }
inline cl_F& operator-= (cl_F& x, const long y) { return x = x - y; }
inline cl_F& operator-= (cl_F& x, const unsigned long y) { return x = x - y; }
-#ifdef HAVE_LONGLONG
inline cl_F& operator-= (cl_F& x, const long long y) { return x = x - y; }
inline cl_F& operator-= (cl_F& x, const unsigned long long y) { return x = x - y; }
-#endif
inline cl_R& operator-- /* prefix */ (cl_R& x) { return x = minus1(x); }
inline void operator-- /* postfix */ (cl_R& x, int dummy) { (void)dummy; x = minus1(x); }
inline cl_R& operator*= (cl_R& x, const cl_R& y) { return x = x * y; }
inline cl_R& operator*= (cl_R& x, const unsigned int y) { return x = x * y; }
inline cl_R& operator*= (cl_R& x, const long y) { return x = x * y; }
inline cl_R& operator*= (cl_R& x, const unsigned long y) { return x = x * y; }
-#ifdef HAVE_LONGLONG
inline cl_R& operator*= (cl_R& x, const long long y) { return x = x * y; }
inline cl_R& operator*= (cl_R& x, const unsigned long long y) { return x = x * y; }
-#endif
inline cl_R& operator*= (cl_R& x, const float y) { return x = x * y; }
inline cl_R& operator*= (cl_R& x, const double y) { return x = x * y; }
inline cl_R& operator/= (cl_R& x, const cl_R& y) { return x = x / y; }
inline cl_R& operator/= (cl_R& x, const unsigned int y) { return x = x / y; }
inline cl_R& operator/= (cl_R& x, const long y) { return x = x / y; }
inline cl_R& operator/= (cl_R& x, const unsigned long y) { return x = x / y; }
-#ifdef HAVE_LONGLONG
inline cl_R& operator/= (cl_R& x, const long long y) { return x = x / y; }
inline cl_R& operator/= (cl_R& x, const unsigned long long y) { return x = x / y; }
-#endif
inline cl_R& operator/= (cl_R& x, const float y) { return x = x / y; }
inline cl_R& operator/= (cl_R& x, const double y) { return x = x / y; }
inline cl_F& operator/= (cl_F& x, const int y) { return x = x / y; }
inline cl_F& operator/= (cl_F& x, const unsigned int y) { return x = x / y; }
inline cl_F& operator/= (cl_F& x, const long y) { return x = x / y; }
inline cl_F& operator/= (cl_F& x, const unsigned long y) { return x = x / y; }
-#ifdef HAVE_LONGLONG
inline cl_F& operator/= (cl_F& x, const long long y) { return x = x / y; }
inline cl_F& operator/= (cl_F& x, const unsigned long long y) { return x = x / y; }
-#endif
// Complex operations, trivial for reals
cl_R (const unsigned int); // argument must be < 2^29
cl_R (const long);
cl_R (const unsigned long);
-#ifdef HAVE_LONGLONG
cl_R (const long long);
cl_R (const unsigned long long);
-#endif
cl_R (const float);
cl_R (const double);
cl_R& operator= (const int); // |argument| must be < 2^29
cl_R& operator= (const unsigned long);
cl_R& operator= (const float);
cl_R& operator= (const double);
-#ifdef HAVE_LONGLONG
cl_R& operator= (const long long);
cl_R& operator= (const unsigned long long);
-#endif
// Other constructors.
cl_R (const char *);
// Private constructor.
CL_DEFINE_INT_ASSIGNMENT_OPERATORS(cl_R)
CL_DEFINE_LONG_CONSTRUCTORS(cl_R)
CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_R)
-#ifdef HAVE_LONGLONG
CL_DEFINE_LONGLONG_CONSTRUCTORS(cl_R)
CL_DEFINE_LONGLONG_ASSIGNMENT_OPERATORS(cl_R)
-#endif
CL_DEFINE_FLOAT_CONSTRUCTOR(cl_R)
CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_R)
#if (long_bitsize==64)
typedef long sint64;
typedef unsigned long uint64;
- #undef HAVE_LONGLONG
- #define HAVE_LONGLONG
- #elif defined(HAVE_LONGLONG)
- #if defined(long_long_bitsize) && (long_long_bitsize==64)
+ #elif (long_long_bitsize==64)
typedef long long sint64;
typedef unsigned long long uint64;
- #else // unusable type
- #undef HAVE_LONGLONG
- #endif
+ #else
+ #error "No 64 bit integer type?"
#endif
- #if defined(HAVE_LONGLONG) && (defined(__alpha__) || defined(__ia64__) || defined(__mips64__) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) || (defined(__x86_64__) || defined(_M_AMD64)) || defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64)) || defined(__e2k__)
+ #if (defined(__alpha__) || defined(__ia64__) || defined(__mips64__) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) || (defined(__x86_64__) || defined(_M_AMD64)) || defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64) || defined(__e2k__))
// 64 bit registers in hardware
#define HAVE_FAST_LONGLONG
#endif
#define intLsize 32
typedef sint32 sintL;
typedef uint32 uintL;
- #ifdef HAVE_LONGLONG
- #define intQsize 64
- typedef sint64 sintQ;
- typedef uint64 uintQ;
- #endif
+ #define intQsize 64
+ typedef sint64 sintQ;
+ typedef uint64 uintQ;
// Type for three values (0, +1, -1).
typedef int cl_signean;
// Integer type used for lfloat exponents.
// Constraint: sizeof(uintE) >= sizeof(uintC)
- #if (defined(HAVE_LONGLONG) && (defined(__alpha__) || defined(__ia64__) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) || defined(__x86_64__) || defined(__i386__) || defined(__mips__) || defined(__rs6000__) || defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64) || defined(__e2k__)))
+ #if (defined(__alpha__) || defined(__ia64__) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) || defined(__x86_64__) || defined(__i386__) || defined(__mips__) || defined(__rs6000__) || defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64) || defined(__e2k__))
#define intEsize 64
typedef sint64 sintE;
typedef uint64 uintE;
-# floatparam.m4 serial 1
-dnl Copyright (C) 2005 Free Software Foundation, Inc.
+# floatparam.m4 serial 3 -*- Autoconf -*-
+dnl Copyright (C) 2005-2008, 2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-dnl From Bruno Haible.
+dnl From Bruno Haible, Sam Steingold.
AC_DEFUN([CL_FLOATPARAM_CROSS],
[
- AC_REQUIRE([CL_LONGDOUBLE])
cl_machine_file_h=$1
{
echo "/* Rounding modes, for use below */"
echo "#define rounds_to_infinity 2 /* 1 ulp */"
echo "#define rounds_to_minus_infinity 3 /* 1 ulp */"
echo
- for type in float double "`if test $cl_cv_c_longdouble = yes; then echo 'long double'; fi`"; do
+ for type in float double "long double"; do
if test -n "$type"; then
epsilon_bits=-1; y="($type)1.0"
while true; do
- AC_TRY_COMPILE([],
- [static_assert((($type)(($type)1.0 + ($type)($y)) == ($type)1.0)
- || ($type)(($type)(($type)1.0 + ($type)($y)) - ($type)1.0) != ($type)($y), "");],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [[typedef int verify[2*(
+ (($type)(($type)1.0 + ($type)($y)) == ($type)1.0)
+ || ($type)(($type)(($type)1.0 + ($type)($y)) - ($type)1.0) != ($type)($y)
+ ) - 1];]])
+ ],
[break;])
epsilon_bits=`expr $epsilon_bits + 1`; y="$y * ($type)0.5"
done
negepsilon_bits=-1; y="($type)-1.0"
while true; do
- AC_TRY_COMPILE([],
- [static_assert((($type)(($type)1.0 + ($type)($y)) == ($type)1.0)
- || ($type)(($type)(($type)1.0 + ($type)($y)) - ($type)1.0) != ($type)($y), "");],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [[typedef int verify[2*(
+ (($type)(($type)1.0 + ($type)($y)) == ($type)1.0)
+ || ($type)(($type)(($type)1.0 + ($type)($y)) - ($type)1.0) != ($type)($y)
+ ) - 1];]])
+ ],
[break;])
negepsilon_bits=`expr $negepsilon_bits + 1`; y="$y * ($type)0.5"
done
zs2="($type)(($type)-1.0 + ($type)(-5.6)*$x)"
rounds=
if test -z "$rounds"; then
- AC_TRY_COMPILE([],
- [static_assert($ys1 == $y1 && $ys2 == $y2 && $zs1 == $z1 && $zs2 == $z2, "");],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [[typedef int verify[2*(
+ $ys1 == $y1 && $ys2 == $y2 && $zs1 == $z1 && $zs2 == $z2
+ ) - 1];]])
+ ],
[rounds=rounds_to_nearest])
fi
if test -z "$rounds"; then
- AC_TRY_COMPILE([],
- [static_assert($ys1 == $y1 && $ys2 == $y1 && $zs1 == $z1 && $zs2 == $z1, "");],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [[typedef int verify[2*(
+ $ys1 == $y1 && $ys2 == $y1 && $zs1 == $z1 && $zs2 == $z1
+ ) - 1];]])
+ ],
[rounds=rounds_to_zero])
fi
if test -z "$rounds"; then
- AC_TRY_COMPILE([],
- [static_assert($ys1 == $y2 && $ys2 == $y2 && $zs1 == $z1 && $zs2 == $z1, "");],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [[typedef int verify[2*(
+ $ys1 == $y2 && $ys2 == $y2 && $zs1 == $z1 && $zs2 == $z1
+ ) - 1];]])
+ ],
[rounds=rounds_to_infinity])
fi
if test -z "$rounds"; then
- AC_TRY_COMPILE([],
- [static_assert($ys1 == $y1 && $ys2 == $y1 && $zs1 == $z2 && $zs2 == $z2, "");],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [[typedef int verify[2*(
+ $ys1 == $y1 && $ys2 == $y1 && $zs1 == $z2 && $zs2 == $z2
+ ) - 1];]])
+ ],
[rounds=rounds_to_minus_infinity])
fi
if test -n "$rounds"; then
dnl 2.5495230282078065 = { 0x40 0x04 0x65 0x6C 0x54 0x54 0x69 0x4C } ..elTTiL
dnl 1.4139248369879473e214 = { 0x6C 0x65 0x00 0x00 0x4C 0x69 0x54 0x54 } le..LiTT
double_wordorder_bigendian_p=
- AC_TRY_COMPILE([double a[9] = {
- 0, 2.5479915693083957, 0, 1.4396527506122064e164,
- 0, 2.5495230282078065, 0, 1.4139248369879473e214,
- 0 };], [], [
- if grep LiTTle conftest.$ac_objext >/dev/null ; then
- double_wordorder_bigendian_p=0
- else
- if grep bIgeN conftest.$ac_objext >/dev/null ; then
- double_wordorder_bigendian_p=1
- fi
- fi])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ double a[9] = {
+ 0, 2.5479915693083957, 0, 1.4396527506122064e164,
+ 0, 2.5495230282078065, 0, 1.4139248369879473e214,
+ 0 };
+ ]],
+ [])
+ ],
+ [if grep LiTTle conftest.$ac_objext >/dev/null; then
+ double_wordorder_bigendian_p=0
+ else
+ if grep bIgeN conftest.$ac_objext >/dev/null; then
+ double_wordorder_bigendian_p=1
+ fi
+ fi
+ ])
if test -n "$double_wordorder_bigendian_p"; then
echo "#define double_wordorder_bigendian_p $double_wordorder_bigendian_p"
else
-# intparam.m4 serial 1
-dnl Copyright (C) 2005 Free Software Foundation, Inc.
+# intparam.m4 serial 4 -*- Autoconf -*-
+dnl Copyright (C) 1993-2008, 2017, 2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-dnl From Bruno Haible.
+dnl From Bruno Haible, Sam Steingold
AC_DEFUN([CL_INTPARAM_CROSS],
[
- AC_REQUIRE([CL_LONGLONG])
- AC_REQUIRE([CL_LONGDOUBLE])
AC_REQUIRE([AC_C_BIGENDIAN])
cl_machine_file_h=$1
{
CL_INTPARAM_BITSIZE([short], [short_bitsize])
CL_INTPARAM_BITSIZE([int], [int_bitsize])
CL_INTPARAM_BITSIZE([long], [long_bitsize])
- if test $cl_cv_c_longlong = yes; then
- CL_INTPARAM_BITSIZE([long long], [longlong_bitsize])
- fi
+ CL_INTPARAM_BITSIZE([long long], [longlong_bitsize])
CL_INTPARAM_BITSIZE([unsigned char], [uchar_bitsize])
CL_INTPARAM_BITSIZE([unsigned short], [ushort_bitsize])
CL_INTPARAM_BITSIZE([unsigned int], [uint_bitsize])
CL_INTPARAM_BITSIZE([unsigned long], [ulong_bitsize])
- if test $cl_cv_c_longlong = yes; then
- CL_INTPARAM_BITSIZE([unsigned long long], [ulonglong_bitsize])
- fi
+ CL_INTPARAM_BITSIZE([unsigned long long], [ulonglong_bitsize])
if test -n "$char_bitsize"; then
echo "/* Integers of type char have $char_bitsize bits. */"
echo "#define char_bitsize $char_bitsize"
else
echo "#error \"Integers of type long have no binary representation!!\""
fi
- if test $cl_cv_c_longlong = yes; then
- if test -n "$longlong_bitsize"; then
- echo "/* Integers of type long long have $longlong_bitsize bits. */"
- echo "#define long_long_bitsize $longlong_bitsize"
- echo
- else
- echo "#error \"Integers of type long long have no binary representation!!\""
- fi
+ if test -n "$longlong_bitsize"; then
+ echo "/* Integers of type long long have $longlong_bitsize bits. */"
+ echo "#define long_long_bitsize $longlong_bitsize"
+ echo
+ else
+ echo "#error \"Integers of type long long have no binary representation!!\""
fi
if test -n "$uchar_bitsize"; then
echo "/* Integers of type unsigned char have $uchar_bitsize bits. */"
else
echo "#error \"Integers of type unsigned long have no binary representation!!\""
fi
- if test $cl_cv_c_longlong = yes; then
- if test -n "$ulonglong_bitsize"; then
- echo "/* Integers of type unsigned long long have $ulonglong_bitsize bits. */"
- echo
- else
- echo "#error \"Integers of type unsigned long long have no binary representation!!\""
- fi
+ if test -n "$ulonglong_bitsize"; then
+ echo "/* Integers of type unsigned long long have $ulonglong_bitsize bits. */"
+ echo
+ else
+ echo "#error \"Integers of type unsigned long long have no binary representation!!\""
fi
if test "$char_bitsize" != "$uchar_bitsize"; then
echo "#error \"Integer types char and unsigned char have different sizes!!\""
if test "$long_bitsize" != "$ulong_bitsize"; then
echo "#error \"Integer types long and unsigned long have different sizes!!\""
fi
- if test $cl_cv_c_longlong = yes; then
- if test "$longlong_bitsize" != "$ulonglong_bitsize"; then
- echo "#error \"Integer types long long and unsigned long long have different sizes!!\""
- fi
+ if test "$longlong_bitsize" != "$ulonglong_bitsize"; then
+ echo "#error \"Integer types long long and unsigned long long have different sizes!!\""
fi
- AC_TRY_COMPILE([#include <stdint.h>], [static_assert(sizeof(char*) <= sizeof(intptr_t), "");],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]],
+ [[typedef int verify[2*(sizeof(char*)<=sizeof (intptr_t))-1];]])],
[], [echo "#error \"Type char * does not fit into an intptr_t!!\""])
_AC_COMPUTE_INT([sizeof (char *)], [pointer_size])
pointer_bitsize=`expr $pointer_size '*' $char_bitsize`
CL_INTPARAM_ALIGNOF([unsigned long], [alignment_ulong])
echo "/* Type unsigned long has sizeof = $sizeof_ulong and alignment = $alignment_ulong. */"
echo
- if test $cl_cv_c_longlong = yes; then
- CL_INTPARAM_SIZEOF([long long], [sizeof_longlong])
- CL_INTPARAM_ALIGNOF([long long], [alignment_longlong])
- echo "/* Type long long has sizeof = $sizeof_longlong and alignment = $alignment_longlong. */"
- echo "#define sizeof_long_long $sizeof_longlong"
- echo "#define alignment_long_long $alignment_longlong"
- echo
- CL_INTPARAM_SIZEOF([unsigned long long], [sizeof_ulonglong])
- CL_INTPARAM_ALIGNOF([unsigned long long], [alignment_ulonglong])
- echo "/* Type unsigned long long has sizeof = $sizeof_ulonglong and alignment = $alignment_ulonglong. */"
- echo
- fi
+ CL_INTPARAM_SIZEOF([long long], [sizeof_longlong])
+ CL_INTPARAM_ALIGNOF([long long], [alignment_longlong])
+ echo "/* Type long long has sizeof = $sizeof_longlong and alignment = $alignment_longlong. */"
+ echo "#define sizeof_long_long $sizeof_longlong"
+ echo "#define alignment_long_long $alignment_longlong"
+ echo
+ CL_INTPARAM_SIZEOF([unsigned long long], [sizeof_ulonglong])
+ CL_INTPARAM_ALIGNOF([unsigned long long], [alignment_ulonglong])
+ echo "/* Type unsigned long long has sizeof = $sizeof_ulonglong and alignment = $alignment_ulonglong. */"
+ echo
CL_INTPARAM_SIZEOF([float], [sizeof_float])
CL_INTPARAM_ALIGNOF([float], [alignment_float])
echo "/* Type float has sizeof = $sizeof_float and alignment = $alignment_float. */"
echo "#define sizeof_double $sizeof_double"
echo "#define alignment_double $alignment_double"
echo
- if test $cl_cv_c_longdouble = yes; then
- CL_INTPARAM_SIZEOF([long double], [sizeof_longdouble])
- CL_INTPARAM_ALIGNOF([long double], [alignment_longdouble])
- echo "/* Type long double has sizeof = $sizeof_longdouble and alignment = $alignment_longdouble. */"
- echo "#define sizeof_long_double $sizeof_longdouble"
- echo "#define alignment_long_double $alignment_longdouble"
- echo
- fi
+ CL_INTPARAM_SIZEOF([long double], [sizeof_longdouble])
+ CL_INTPARAM_ALIGNOF([long double], [alignment_longdouble])
+ echo "/* Type long double has sizeof = $sizeof_longdouble and alignment = $alignment_longdouble. */"
+ echo "#define sizeof_long_double $sizeof_longdouble"
+ echo "#define alignment_long_double $alignment_longdouble"
+ echo
CL_INTPARAM_SIZEOF([char *], [sizeof_char_ptr])
CL_INTPARAM_ALIGNOF([char *], [alignment_char_ptr])
echo "/* Type char * has sizeof = $sizeof_char_ptr and alignment = $alignment_char_ptr. */"
CL_INTPARAM_ALIGNOF([long *], [alignment_long_ptr])
echo "/* Type long * has sizeof = $sizeof_long_ptr and alignment = $alignment_long_ptr. */"
echo
- CL_INTPARAM_SIZEOF([void (*)(void)], [sizeof_function_ptr])
- CL_INTPARAM_ALIGNOF([void (*)(void)], [alignment_function_ptr])
+ dnl disabled because:
+ dnl - the results of these are not used anywhere
+ dnl - the results of non-cross are not generated (see src/intparam.h)
+ dnl - the C code fails with "expected identifier or '(' before ')' token"
+ dnl on the line "typedef int verify[2*(alignof(void (*)(void)) == 256) - 1];"
+ dnl CL_INTPARAM_SIZEOF([void (*)(void)], [sizeof_function_ptr])
+ dnl CL_INTPARAM_ALIGNOF([void (*)(void)], [alignment_function_ptr])
echo "/* Type function * has sizeof = $sizeof_function_ptr and alignment = $alignment_function_ptr. */"
echo
case $ac_cv_c_bigendian in
echo "#define int_big_endian"
echo "/* Type unsigned long is stored BIG-ENDIAN in memory (i.e. like mc68000 or sparc). */"
echo "#define long_big_endian"
- if test $cl_cv_c_longlong = yes; then
- echo "/* Type unsigned long long is stored BIG-ENDIAN in memory (i.e. like mc68000 or sparc). */"
- echo "#define long_long_big_endian"
- fi
+ echo "/* Type unsigned long long is stored BIG-ENDIAN in memory (i.e. like mc68000 or sparc). */"
+ echo "#define long_long_big_endian"
;;
no)
echo "/* Type unsigned short is stored LITTLE-ENDIAN in memory (i.e. like Z80 or VAX). */"
echo "#define int_little_endian"
echo "/* Type unsigned long is stored LITTLE-ENDIAN in memory (i.e. like Z80 or VAX). */"
echo "#define long_little_endian"
- if test $cl_cv_c_longlong = yes; then
- echo "/* Type unsigned long long is stored LITTLE-ENDIAN in memory (i.e. like Z80 or VAX). */"
- echo "#define long_long_little_endian"
- fi
+ echo "/* Type unsigned long long is stored LITTLE-ENDIAN in memory (i.e. like Z80 or VAX). */"
+ echo "#define long_long_little_endian"
;;
*)
echo "#error \"Type short is stored in memory in an obscure manner!!\""
echo "#error \"Type int is stored in memory in an obscure manner!!\""
echo "#error \"Type long is stored in memory in an obscure manner!!\""
- if test $cl_cv_c_longlong = yes; then
- echo "#error \"Type long long is stored in memory in an obscure manner!!\""
- fi
+ echo "#error \"Type long long is stored in memory in an obscure manner!!\""
;;
esac
echo
[
n=1; x="($1)2"
while true; do
- AC_TRY_COMPILE([], [typedef int verify[2*(($1)($x) == 0) - 1];],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
+ [[typedef int verify[2*(($1)($x) == 0) - 1];]])],
[$2=$n; break;],
[if test $n = 1000; then $2=; break; fi;])
n=`expr $n + 1`; x="$x * ($1)2"
dnl CL_INTPARAM_ALIGNOF(type, variable)
dnl puts into variable the determined alignment of the type.
-AC_DEFUN([CL_INTPARAM_ALIGNOF],
-[
+AC_DEFUN([CL_INTPARAM_ALIGNOF],[
dnl Simplify the guessing by assuming that the alignment is a power of 2.
n=1
while true; do
- AC_TRY_COMPILE([
-#ifdef __cplusplus
-# ifdef __GNUC__
-# define alignof(type) __alignof__ (type)
-# else
- template <class type> struct alignof_helper { char slot1; type slot2; };
-# define alignof(type) offsetof (alignof_helper<type>, slot2)
-# endif
-#else
-# define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2)
-#endif
-], [static_assert(alignof($1) == $n, "");],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <stddef.h>
+ #ifdef __cplusplus
+ #ifdef __GNUC__
+ #define alignof(type) __alignof__ (type)
+ #else
+ template <class type> struct alignof_helper { char slot1; type slot2; };
+ #define alignof(type) offsetof (alignof_helper<type>, slot2)
+ #endif
+ #else
+ #define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2)
+ #endif
+ ]],
+ [[typedef int verify[2*(alignof($1) == $n) - 1];]])],
[$2=$n; break;]
[if test $n = 0; then $2=; break; fi])
n=`expr $n '*' 2`
+++ /dev/null
-dnl Copyright (C) 1993-2006 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-
-dnl From Bruno Haible, Marcus Daniels, Paul Eggert.
-
-AC_PREREQ(2.13)
-
-AC_DEFUN([CL_LONGDOUBLE],
-[AC_CACHE_CHECK(for long double type, cl_cv_c_longdouble, [
-AC_TRY_RUN([
-#include <stdlib.h>
-int main()
-{ long double x = 2.7182818284590452354L; x = x*x; exit (x==0.0L); }
-],
-cl_cv_c_longdouble=yes, cl_cv_c_longdouble=no, [
-dnl When cross-compiling, use the test from gnulib.
-AC_TRY_COMPILE([
- /* The Stardent Vistra knows sizeof(long double), but does not support it. */
- long double foo = 0.0;
- /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
- int array [2*(sizeof(long double) >= sizeof(double)) - 1];
- ], , cl_cv_c_longdouble=yes, cl_cv_c_longdouble=no)])
-])
-if test $cl_cv_c_longdouble = yes; then
- AC_DEFINE(HAVE_LONGDOUBLE, ,[Define if compiler supports long double type])
-fi
-])
+++ /dev/null
-dnl -*- Autoconf -*-
-dnl Copyright (C) 1993-2006 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-
-dnl From Bruno Haible, Marcus Daniels, Sam Steingold, Paul Eggert.
-
-AC_PREREQ(2.57)
-
-AC_DEFUN([CL_LONGLONG],
-[AC_CACHE_CHECK(for long long type, cl_cv_c_longlong, [
-AC_TRY_RUN([
-#include <stdlib.h>
-int main()
-{
-/* long longs don't work right with gcc-2.7.2 on m68k */
-/* long longs don't work right with gcc-2.7.2 on rs6000: avcall/tests.c gets
- miscompiled. */
-#if defined(__m68k__) || (defined(_IBMR2) || defined(__powerpc))
-#if defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)
- exit(1);
-#endif
-#endif
- { long x = 944938507; long y = 737962842; long z = 162359677;
- exit(!(((long long) x)*((long long) y)>>32 == z));
- }
-}],
-cl_cv_c_longlong=yes, cl_cv_c_longlong=no, [
-dnl When cross-compiling, use the test from gnulib.
-AC_TRY_LINK([long long ll = 1LL; int i = 63;],
- [long long llmax = (long long) -1;
- return ll << i | ll >> i | llmax / ll | llmax % ll;],
- cl_cv_c_longlong=yes,
- cl_cv_c_longlong=no)])
-])
-if test $cl_cv_c_longlong = yes; then
- AC_DEFINE(HAVE_LONGLONG,,[compiler supports the `long long' type])
-fi
-])
dnl -*- Autoconf -*-
-dnl Copyright (C) 1993-2005 Free Software Foundation, Inc.
+dnl Copyright (C) 1993-2008, 2011, 2017 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
-AC_PREREQ(2.13)
+AC_PREREQ([2.61])
dnl CL_MACHINE([MESSAGE], [PROGRAM_TO_RUN], [CROSS_MACRO], [DESTINATION], [CACHE_VAR])
AC_DEFUN([CL_MACHINE],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_C_CHAR_UNSIGNED])dnl
-cl_machine_file_c=$2
-if test -z "$[$5]"; then
-AC_CHECKING(for [$1])
-if test $cross_compiling = no; then
-cl_machine_file_h=$4
-cat > conftest.$ac_ext <<EOF
-#include "confdefs.h"
-EOF
-cat "$cl_machine_file_c" >> conftest.$ac_ext
-ORIGCC="$CC"
-if test $ac_cv_prog_gcc = yes; then
-# gcc -O (gcc version <= 2.3.2) crashes when compiling long long shifts for
-# target 80386. Strip "-O".
-CC=`echo "$CC " | sed -e 's/-O //g'`
-fi
-AC_TRY_EVAL(ac_link)
-CC="$ORIGCC"
-if test -s conftest${ac_exeext}; then
- echo "creating $cl_machine_file_h"
- ./conftest${ac_exeext} > conftest.h
- if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then
- # The file exists and we would not be changing it
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_C_CHAR_UNSIGNED])
+ cl_machine_file_c=$2
+ if test -z "$[$5]"; then
+ AC_MSG_CHECKING(for [$1])
+ cl_machine_file_h=$4
+ cl_machine_file_program=`cat "$cl_machine_file_c"`
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([
+ #include "confdefs.h"
+ $cl_machine_file_program
+ ])],
+ [AC_MSG_RESULT([created $cl_machine_file_h])
+ if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then
+ # The file exists and we would not be changing it
+ rm -f conftest.h
+ else
+ rm -f "$cl_machine_file_h"
+ mv conftest.h "$cl_machine_file_h"
+ fi
+ [$5]=1
+ ],
+ [AC_MSG_RESULT([creation of $cl_machine_file_h failed])],
+ [AC_MSG_RESULT([creating $cl_machine_file_h])
+ $3([$4])
+ ])
rm -f conftest.h
- else
- rm -f "$cl_machine_file_h"
- mv conftest.h "$cl_machine_file_h"
fi
- [$5]=1
-else
- echo "creation of $cl_machine_file_h failed"
-fi
-rm -f conftest*
-else
-echo "creating $cl_machine_file_h"
-$3([$4])
-fi
-fi
])
return (uint32)high << 16;
}
-#ifdef HAVE_LONGLONG
-
// High-Word einer 64-Bit-Zahl bestimmen
// high32(wert)
inline uint32 high32 (uint64 wert)
return (uint64)high << 32;
}
-#endif /* HAVE_LONGLONG */
-
// Multipliziert zwei 16-Bit-Zahlen miteinander und liefert eine 32-Bit-Zahl:
// mulu16(arg1,arg2)
); \
unused (hi_zuweisung _hi); lo_zuweisung _lo; \
})
-#elif defined(__GNUC__) && defined(HAVE_LONGLONG) && !defined(__arm__)
+#elif defined(__GNUC__) && !defined(__arm__)
#define mulu32(x,y,hi_zuweisung,lo_zuweisung) \
({ var register uint64 _prod = (uint64)(uint32)(x) * (uint64)(uint32)(y); \
unused (hi_zuweisung (uint32)(_prod>>32)); \
})
#define divu_6432_3232_(xhi,xlo,y) \
({var uint32 ___q; divu_6432_3232(xhi,xlo,y,___q=,); ___q; })
-#elif defined(__GNUC__) && defined(HAVE_LONGLONG) && !defined(__arm__)
+#elif defined(__GNUC__) && !defined(__arm__)
#define divu_6432_3232(xhi,xlo,y,q_zuweisung,r_zuweisung) \
({var uint32 __xhi = (xhi); \
var uint32 __xlo = (xlo); \
// < uintL ergebnis : Wurzel, >=0, <2^16
extern uintL isqrt (uintL x);
-#ifdef HAVE_LONGLONG
// Extracts integer root of a 64-bit number and returns a 32-bit number.
// isqrt(x)
// > uintQ x : radicand, >=0, <2^64
// < uintL result : square root, >=0, <2^32
extern uintL isqrt (uintQ x);
-#endif
// Sorry for this. We need an isqrt function taking uintC arguments but we
// cannot use overloading since this would lead to ambiguities with any of the
#if (intDsize==16)
#define muluD mulu16
#endif
- #if (intDsize==32) && defined(HAVE_LONGLONG)
+ #if (intDsize==32)
#define muluD(arg1,arg2) ((uintDD)(uintD)(arg1)*(uintDD)(uintD)(arg2))
#endif
#else
#if (intDsize==16)
#define divuD divu_3216_1616
#endif
- #if (intDsize==32) && defined(HAVE_LONGLONG)
+ #if (intDsize==32)
#define divuD(x,y,q_zuweisung,r_zuweisung) \
{ var uint64 __x = (x); \
var uint32 __y = (y); \
#include "cln/floatparam.h"
#include "cln/exception.h"
-#if defined(HAVE_LONGDOUBLE) && (long_double_mant_bits > double_mant_bits) && (defined(__i386__) || defined(__m68k__) || (defined(__sparc__) && 0))
+#if (long_double_mant_bits > double_mant_bits) && (defined(__i386__) || defined(__m68k__) || (defined(__sparc__) && 0))
// Only these CPUs have fast "long double"s in hardware.
// On SPARC, "long double"s are emulated in software and don't work.
typedef long double fftc_real;
#include "cln/exception.h"
-#if defined(HAVE_LONGDOUBLE) && (long_double_mant_bits > double_mant_bits) && (defined(__i386__) || defined(__m68k__) || (defined(__sparc__) && 0))
+#if (long_double_mant_bits > double_mant_bits) && (defined(__i386__) || defined(__m68k__) || (defined(__sparc__) && 0))
// Only these CPUs have fast "long double"s in hardware.
// On SPARC, "long double"s are emulated in software and don't work.
typedef long double fftcs_real;
#include "cln/exception.h"
-#if defined(HAVE_LONGDOUBLE) && (long_double_mant_bits > double_mant_bits) && (defined(__i386__) || defined(__m68k__) || (defined(__sparc__) && 0))
+#if (long_double_mant_bits > double_mant_bits) && (defined(__i386__) || defined(__m68k__) || (defined(__sparc__) && 0))
// Only these CPUs have fast "long double"s in hardware.
// On SPARC, "long double"s are emulated in software and don't work.
typedef long double fftr_real;
}}
}
-#ifdef HAVE_LONGLONG
uintL isqrt (uintQ x)
{
// As isqrt (uintL) above, but with 64-bit numbers.
}
}}
}
-#endif
} // namespace cln
fprintdecimal_impl(stream,(intptr_t)x);
}
-#ifdef HAVE_LONGLONG
-
void fprintdecimal (std::ostream& stream, unsigned long long x)
{
#if long_long_bitsize <= pointer_bitsize
#endif
}
-#endif
-
} // namespace cln
fprinthexadecimal_impl(stream,(intptr_t)x);
}
-#ifdef HAVE_LONGLONG
-
void fprinthexadecimal (std::ostream& stream, unsigned long long x)
{
#if long_long_bitsize <= pointer_bitsize
#endif
}
-#endif
-
} // namespace cln