11#include "Teuchos_Assert.hpp"
18#ifdef HAVE_TEUCHOSCORE_QUADMATH
22operator<< (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 ());
40operator>> (std::istream& in, __float128& x)
46 x = strtoflt128 (tmpStr.c_str (), NULL);
56#ifdef TEUCHOS_SCALAR_TRAITS_THROW_NAN_INF_ERR
61#ifdef HAVE_TEUCHOS_GNU_MP
67 return !a.is_zero() && !b.is_zero();
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();
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,...