1 #ifndef _GLUCAT_SCALAR_IMP_H 2 #define _GLUCAT_SCALAR_IMP_H 36 #include <boost/numeric/ublas/traits.hpp> 48 template<
typename Other_Scalar_T >
57 template<
typename Other_Scalar_T >
64 #if defined(_GLUCAT_USE_QD) 72 {
return static_cast<long double>(val.x[0]) + static_cast<long double>(val.x[1]); }
81 {
return static_cast<long double>(val.x[0]) + static_cast<long double>(val.x[1]); }
90 {
return dd_real(
double(val),
double(val - static_cast<long double>(
double(val)))); }
99 {
return dd_real(val.x[0],val.x[1]); }
108 {
return qd_real(
double(val),
double(val - static_cast<long double>(
double(val))),0.0,0.0); }
117 {
return qd_real(val.x[0],val.x[1],0.0,0.0); }
121 template<
typename Scalar_T >
131 template<
typename Scalar_T >
141 #endif // _GLUCAT_SCALAR_IMP_H static Scalar_T to_scalar_t(const Other_Scalar_T &val)
Cast to Scalar_T.
numeric_traits< Scalar_T >::promoted::type to_promote(const Scalar_T &val)
Cast to promote.
static double to_double(const Scalar_T &val)
Cast to double.
numeric_traits< Scalar_T >::demoted::type to_demote(const Scalar_T &val)
Cast to demote.