};
+// See polynomial.cc for an expalanation of this
+
+#if ((__GNUC__ == 3) && (__GNUC_MINOR__ == 1))
+#define SHIFT_TYPE double
+#else
+#define SHIFT_TYPE long double
+#endif
template <typename number>
void
c0 = new std::vector<number>(*c0);
c1 = new std::vector<number>(*c1);
- Polynomial<number>::shift(*c0, (long double) -1.);
+ Polynomial<number>::shift(*c0, (SHIFT_TYPE) -1.);
Polynomial<number>::scale(*c0, 2.);
- Polynomial<number>::shift(*c1, (long double) -1.);
+ Polynomial<number>::shift(*c1, (SHIFT_TYPE) -1.);
Polynomial<number>::scale(*c1, 2.);
Polynomial<number>::multiply(*c1, std::sqrt(3.));
shifted_coefficients[0]=c0;
// and compute the
// coefficients for [0,1]
ck = new std::vector<number>(*ck);
- shift(*ck,(long double) -1.);
+ shift(*ck,(SHIFT_TYPE) -1.);
Polynomial<number>::scale(*ck, 2.);
Polynomial<number>::multiply(*ck, std::sqrt(2.*k+1.));
shifted_coefficients[k] = ck;
template void Polynomial<float>::shift(const float offset);
template void Polynomial<float>::shift(const double offset);
-template void Polynomial<float>::shift(const long double offset);
template void Polynomial<double>::shift(const double offset);
-template void Polynomial<double>::shift(const long double offset);
template void Polynomial<long double>::shift(const long double offset);
+
+// gcc 3.1 crashes withan internal error when trying to instantiate
+// these functions.
+
+#if ((__GNUC__ == 3) && (__GNUC_MINOR__ == 1))
+#warning Polynomial::shift with long double has been disabled in gcc 3.1
+#else
+template void Polynomial<float>::shift(const long double offset);
+template void Polynomial<double>::shift(const long double offset);
+#endif