And while at it, remove some workarounds for ancient compilers.
CLN is known to work with:
=========================
- - Linux/x86, gcc-3.x, gcc-4.[0-9].x
- - Linux/x86_64, gcc-3.[3-4], gcc-4.[0-9].x, clang-2.8
- - Linux/ia64, gcc-3.[2-4], gcc-4.[0-4].x
- - Linux/arm, gcc-3.[0-3] (*), gcc-4.[0-9].x (*)
- - Linux/mips, gcc-3.3, gcc-4.[0-9].x
- - Linux/sparc, gcc-3.[1-3], gcc-4.[0-9].x
- - Linux/alpha, gcc-3.[0-3], gcc-4.[0-2].x
- - Linux/powerpc, gcc-3.[0-3], gcc-4.[0-9].x
- - Linux/hppa, gcc-4.2.x (*)
- - Solaris 2.4 (sparc), gcc-3.[1-3], gcc-4.[0-2].x (*)
- - OSF/1 V4.0 (alpha), gcc-3.1
- - Irix 6.5, gcc-3.0
- - OS X Leopard (x86), gcc 4.0.1
- - Windows/32-bit, MSVC 16.00.30319.01
+ - Linux/x86_64: gcc-3.[3,4], gcc-4.x.x, gcc-[5-7], clang-2.[8,9]
+ - Linux/x86: gcc-3.x.x, gcc-4.x.x, gcc-[5,6]
+ - Linux/ia64: gcc-3.[2-4], gcc-4.[0-4].x
+ - Linux/arm: gcc-3.[0-3], gcc-4.x.x, gcc-[5,6] (*)
+ - Linux/mips: gcc-3.3, gcc-4.[0-9].x, gcc-[5,6]
+ - Linux/sparc: gcc-3.[1-3], gcc-4.[0-9].x
+ - Linux/alpha: gcc-3.[0-3], gcc-4.[0-2].x
+ - Linux/powerpc: gcc-3.[0-3], gcc-4.[0-9].x, gcc-[5,6]
+ - Linux/hppa: gcc-4.2.x (*)
+ - Solaris 2.4 (sparc): gcc-3.[1-3], gcc-4.[0-2].x (*)
+ - OSF/1 V4.0 (alpha): gcc-3.1
+ - Irix 6.5: gcc-3.0
+ - OS X Leopard (x86): gcc 4.0.1
+ - Windows/32-bit: MSVC 16.00.30319.01
(*) On these platforms, problems with the assembler routines have been
reported. It may be best to add "-DNO_ASM" to CPPFLAGS before
configuring.
-Using gcc-4.9, the "make" step takes about 15 minutes, on an x86_64 / 2 GHz.
-
-If you use g++ from gcc-3.0.4 or older on Sparc, add either "-O", "-O1" or
-"-O2 -fno-schedule-insns" to the CXXFLAGS. With full "-O2", g++ miscompiles
-the division routines. Do not use gcc-3.0 on Sparc for compiling CLN, it
-won't work at all.
+Using gcc-6, the "make" step takes about 15 minutes, on an x86_64 @ 3 GHz.
More detailed installation instructions can be found in the documentation,
in the doc/ directory.
Class Library for Numbers
Copyright (c) Bruno Haible 1988-2008
-Copyright (c) Richard Kreckel 2000-2014
+Copyright (c) Richard Kreckel 2000-2017
Copyright (c) Alexei Sheplyakov 2008-2010
GPL
Richard B. Kreckel, @code{<kreckel@@ginac.de>}.
Copyright (C) Bruno Haible 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008.
-Copyright (C) Richard B. Kreckel 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014.
+Copyright (C) Richard B. Kreckel 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2017.
Copyright (C) Alexei Sheplyakov 2008, 2010.
Permission is granted to make and distribute verbatim copies of
#include "float/ffloat/cl_FF.h"
#include "integer/cl_I.h"
-#if defined(__mips__) && !defined(__GNUC__)
-
-// Workaround SGI Irix 6.2 C++ 7.0 bug.
-
-#include "float/cl_F.h"
-#include "dfloat/cl_DF.h"
-
-namespace cln {
-
-CL_INLINE const cl_idecoded_float CL_INLINE_DECL(integer_decode_float) (const cl_FF& x)
-{
- var cl_idecoded_float sem = integer_decode_float(cl_FF_to_DF(x));
- return cl_idecoded_float(sem.mantissa >> (DF_mant_len-FF_mant_len),
- sem.exponent + (DF_mant_len-FF_mant_len),
- sem.sign
- );
-}
-
-} // namespace cln
-
-#else
-
namespace cln {
CL_INLINE const cl_idecoded_float CL_INLINE_DECL(integer_decode_float) (const cl_FF& x)
}
} // namespace cln
-
-#endif
var uintC bitcount = exp % intDsize; // zu kopierende Bits danach, >=0, <intDsize
var uintD mask = minus_bit(intDsize-bitcount-1); // Maske mit bitcount+1 Bits
{var const uintD* mantptr = LF_MSDptr(x) mspop count;
- #if !(defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ == 7))
if ((mspref(mantptr,0) & -mask) ==0) goto ab; // Bit 16n-e-1 =0 -> abrunden
- #else
- // Work around gcc-2.7.x bug on i386/ELF
- if ((mspref(mantptr,0) & ((~mask)+1)) ==0) goto ab; // Bit 16n-e-1 =0 -> abrunden
- #endif
if (!((mspref(mantptr,0) & ~mask) ==0)) goto auf; // Bit 16n-e-1 =1 und Bits 16n-e-2..0 >0 -> aufrunden
if (test_loop_msp(mantptr mspop 1,len-count-1)) goto auf;
// round-to-even, je nach Bit 16n-e :
}
}
-#if defined(__GNUC__) && defined(__s390__) && (__GNUC__ == 2) // Workaround GCC-bug (see below)
- struct cl_sylow2gen_property : public cl_property {
- SUBCLASS_cl_property();
- public:
- cl_I h_rep;
- // Constructor.
- cl_sylow2gen_property (const cl_symbol& k, const cl_MI& h) : cl_property (k), h_rep (h.rep) {}
- };
-#endif
-
// Algorithm 3 (for p > 2 only):
// Tonelli-Shanks.
// [Cohen, A Course in Computational Algebraic Number Theory,
// Since this computation is a bit costly, we cache its result
// on the ring's property list.
static const cl_symbol key = (cl_symbol)(cl_string)"generator of 2-Sylow subgroup of (Z/pZ)^*";
-#if !(defined(__GNUC__) && defined(__s390__) && (__GNUC__ == 2)) // Workaround GCC-bug (see above)
struct cl_sylow2gen_property : public cl_property {
SUBCLASS_cl_property();
public:
// Constructor.
cl_sylow2gen_property (const cl_symbol& k, const cl_MI& h) : cl_property (k), h_rep (h.rep) {}
};
-#endif
var cl_sylow2gen_property* prop = (cl_sylow2gen_property*) R->get_property(key);
if (prop)
h = cl_MI(R,prop->h_rep);