18 #ifndef LIBMESH_FLOAT128_SHIMS_H 19 #define LIBMESH_FLOAT128_SHIMS_H 22 #include "libmesh/libmesh_config.h" 24 #ifdef LIBMESH_DEFAULT_QUADRUPLE_PRECISION 26 # include <boost/multiprecision/float128.hpp> 34 #define LIBMESH_FLOAT128_UNARY(funcname) \ 35 inline boost::multiprecision::float128 funcname \ 36 (const boost::multiprecision::float128 in) \ 38 return boost::multiprecision::funcname(in); \ 41 #define LIBMESH_FLOAT128_MATH_BOOL(funcname) \ 42 inline bool funcname \ 43 (const boost::multiprecision::float128 in) \ 45 return boost::math::funcname(in); \ 48 #define LIBMESH_FLOAT128_BINARY(funcname) \ 49 inline boost::multiprecision::float128 funcname \ 50 (const boost::multiprecision::float128 in1, \ 51 const boost::multiprecision::float128 in2) \ 53 return boost::multiprecision::funcname(in1, in2); \ 75 inline boost::multiprecision::float128
norm 76 (
const boost::multiprecision::float128 in)
81 inline boost::multiprecision::float128
real 82 (
const boost::multiprecision::float128 in)
87 inline boost::multiprecision::float128
imag 88 (
const boost::multiprecision::float128 )
94 struct plus<
boost::multiprecision::float128>
96 boost::multiprecision::float128 operator ()
97 (
const boost::multiprecision::float128 a,
98 const boost::multiprecision::float128 b)
105 struct multiplies<
boost::multiprecision::float128>
107 boost::multiprecision::float128 operator ()
108 (
const boost::multiprecision::float128 a,
109 const boost::multiprecision::float128 b)
121 inline boost::multiprecision::float128 modf
122 (
const boost::multiprecision::float128 in,
123 boost::multiprecision::float128 * intpart)
125 #ifdef BOOST_MP_USE_QUAD 126 return __modfq(in.backend().value(), &intpart->backend().value());
127 #elif defined(BOOST_MP_USE_FLOAT128) 128 return modfq(in.backend().value(), &intpart->backend().value());
138 inline boost::multiprecision::float128
pow 139 (
const boost::multiprecision::float128 in1,
154 #if BOOST_VERSION > 106300 159 inline long long llround
160 (
const boost::multiprecision::float128 in)
162 return boost::multiprecision::llround(in);
186 #endif // LIBMESH_DEFAULT_QUADRUPLE_PRECISION 188 #endif // LIBMESH_FLOAT128_SHIMS_H boost::multiprecision::float128 real(const boost::multiprecision::float128 in)
LIBMESH_FLOAT128_UNARY(sqrt) LIBMESH_FLOAT128_UNARY(exp) LIBMESH_FLOAT128_UNARY(log) LIBMESH_FLOAT128_UNARY(log10) LIBMESH_FLOAT128_UNARY(sin) LIBMESH_FLOAT128_UNARY(cos) LIBMESH_FLOAT128_UNARY(tan) LIBMESH_FLOAT128_UNARY(asin) LIBMESH_FLOAT128_UNARY(acos) LIBMESH_FLOAT128_UNARY(atan) LIBMESH_FLOAT128_UNARY(sinh) LIBMESH_FLOAT128_UNARY(cosh) LIBMESH_FLOAT128_UNARY(tanh) LIBMESH_FLOAT128_UNARY(abs) LIBMESH_FLOAT128_UNARY(fabs) LIBMESH_FLOAT128_UNARY(ceil) LIBMESH_FLOAT128_UNARY(floor) inline boost
LIBMESH_FLOAT128_BINARY(pow) LIBMESH_FLOAT128_BINARY(atan2) LIBMESH_FLOAT128_BINARY(fmod) inline boost
LIBMESH_FLOAT128_MATH_BOOL(isinf) LIBMESH_FLOAT128_MATH_BOOL(isnan) inline boost
boost::multiprecision::float128 imag(const boost::multiprecision::float128)
auto norm(const libMesh::TypeVector< T > &vector) -> decltype(std::norm(T()))