43#include "Teuchos_Assert.hpp"
50#ifdef HAVE_TEUCHOSCORE_QUADMATH
54operator<< (std::ostream& out,
const __float128& x)
56 const size_t bufSize = 128;
59 const int numCharPrinted = quadmath_snprintf (buf, bufSize,
"%.30Qe", x);
60 if (
static_cast<size_t> (numCharPrinted) >= bufSize) {
61 std::ostringstream os;
62 os <<
"Failed to print __float128 value: buffer has " << bufSize
63 <<
" characters, but quadmath_snprintf wanted " << numCharPrinted
65 throw std::runtime_error (os.str ());
72operator>> (std::istream& in, __float128& x)
78 x = strtoflt128 (tmpStr.c_str (), NULL);
88#ifdef TEUCHOS_SCALAR_TRAITS_THROW_NAN_INF_ERR
93#ifdef HAVE_TEUCHOS_GNU_MP
99 return !a.is_zero() && !b.is_zero();
102 return !a.is_zero() && !b.is_zero();
109 const float flt_nan = std::numeric_limits<float>::quiet_NaN();
110 const double dbl_nan = std::numeric_limits<double>::quiet_NaN();
Defines basic traits for the scalar field type.
Smart reference counting pointer class for automatic garbage collection.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...