18 #ifdef HAVE_TEUCHOSCORE_QUADMATH
22 operator<< (std::ostream& out,
const __float128& x)
24 const size_t bufSize = 128;
27 const int numCharPrinted = quadmath_snprintf (buf, bufSize,
"%.30Qe", x);
28 if (static_cast<size_t> (numCharPrinted) >= bufSize) {
29 std::ostringstream os;
30 os <<
"Failed to print __float128 value: buffer has " << bufSize
31 <<
" characters, but quadmath_snprintf wanted " << numCharPrinted
33 throw std::runtime_error (os.str ());
46 x = strtoflt128 (tmpStr.c_str (), NULL);
51 #endif // HAVE_TEUCHOSCORE_QUADMATH
53 void Teuchos::throwScalarTraitsNanInfError(
const std::string &errMsg )
56 #ifdef TEUCHOS_SCALAR_TRAITS_THROW_NAN_INF_ERR
61 #ifdef HAVE_TEUCHOS_GNU_MP
62 gmp_randclass Teuchos::gmp_rng ( gmp_randinit_default );
65 #ifdef HAVE_TEUCHOS_QD
66 bool Teuchos::operator&&(
const dd_real &a,
const dd_real &b) {
67 return !a.is_zero() && !b.is_zero();
69 bool Teuchos::operator&&(
const qd_real &a,
const qd_real &b) {
70 return !a.is_zero() && !b.is_zero();
77 const float flt_nan = std::numeric_limits<float>::quiet_NaN();
78 const double dbl_nan = std::numeric_limits<double>::quiet_NaN();
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
ostream & operator<<(ostream &os, const pair< Packet, Packet > &arg)
std::istream & operator>>(std::istream &in, CustomDataType &object)
Defines basic traits for the scalar field type.