]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/multiprecision/float128.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / multiprecision / float128.hpp
1 ///////////////////////////////////////////////////////////////
2 // Copyright 2013 John Maddock. Distributed under the Boost
3 // Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
5
6 #ifndef BOOST_MP_FLOAT128_HPP
7 #define BOOST_MP_FLOAT128_HPP
8
9 #include <boost/config.hpp>
10 #include <boost/scoped_array.hpp>
11 #include <boost/functional/hash.hpp>
12 #include <boost/multiprecision/number.hpp>
13
14 #if defined(BOOST_INTEL) && !defined(BOOST_MP_USE_FLOAT128) && !defined(BOOST_MP_USE_QUAD)
15 # if defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION >= 1310) && defined(__GNUC__)
16 # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6))
17 # define BOOST_MP_USE_FLOAT128
18 # endif
19 # endif
20
21 # ifndef BOOST_MP_USE_FLOAT128
22 # define BOOST_MP_USE_QUAD
23 # endif
24 #endif
25
26 #if defined(__GNUC__) && !defined(BOOST_MP_USE_FLOAT128) && !defined(BOOST_MP_USE_QUAD)
27 # define BOOST_MP_USE_FLOAT128
28 #endif
29
30 #if !defined(BOOST_MP_USE_FLOAT128) && !defined(BOOST_MP_USE_QUAD)
31 # error "Sorry compiler is neither GCC, not Intel, don't know how to configure this header."
32 #endif
33 #if defined(BOOST_MP_USE_FLOAT128) && defined(BOOST_MP_USE_QUAD)
34 # error "Oh dear, both BOOST_MP_USE_FLOAT128 and BOOST_MP_USE_QUAD are defined, which one should I be using?"
35 #endif
36
37 #if defined(BOOST_MP_USE_FLOAT128)
38
39 extern "C" {
40 #include <quadmath.h>
41 }
42
43 typedef __float128 float128_type;
44
45 #elif defined(BOOST_MP_USE_QUAD)
46
47 #include <boost/multiprecision/detail/float_string_cvt.hpp>
48
49 typedef _Quad float128_type;
50
51 extern "C" {
52 _Quad __ldexpq(_Quad, int);
53 _Quad __frexpq(_Quad, int*);
54 _Quad __fabsq(_Quad);
55 _Quad __floorq(_Quad);
56 _Quad __ceilq(_Quad);
57 _Quad __sqrtq(_Quad);
58 _Quad __truncq(_Quad);
59 _Quad __expq(_Quad);
60 _Quad __powq(_Quad, _Quad);
61 _Quad __logq(_Quad);
62 _Quad __log10q(_Quad);
63 _Quad __sinq(_Quad);
64 _Quad __cosq(_Quad);
65 _Quad __tanq(_Quad);
66 _Quad __asinq(_Quad);
67 _Quad __acosq(_Quad);
68 _Quad __atanq(_Quad);
69 _Quad __sinhq(_Quad);
70 _Quad __coshq(_Quad);
71 _Quad __tanhq(_Quad);
72 _Quad __fmodq(_Quad, _Quad);
73 _Quad __atan2q(_Quad, _Quad);
74
75 #define ldexpq __ldexpq
76 #define frexpq __frexpq
77 #define fabsq __fabsq
78 #define floorq __floorq
79 #define ceilq __ceilq
80 #define sqrtq __sqrtq
81 #define truncq __truncq
82 #define expq __expq
83 #define powq __powq
84 #define logq __logq
85 #define log10q __log10q
86 #define sinq __sinq
87 #define cosq __cosq
88 #define tanq __tanq
89 #define asinq __asinq
90 #define acosq __acosq
91 #define atanq __atanq
92 #define sinhq __sinhq
93 #define coshq __coshq
94 #define tanhq __tanhq
95 #define fmodq __fmodq
96 #define atan2q __atan2q
97 }
98
99 inline _Quad isnanq(_Quad v)
100 {
101 return v != v;
102 }
103 inline _Quad isinfq(_Quad v)
104 {
105 return __fabsq(v) > 1.18973149535723176508575932662800702e4932Q;
106 }
107
108 #endif
109
110 namespace boost{
111 namespace multiprecision{
112 namespace backends{
113
114 struct float128_backend;
115
116 }
117
118 using backends::float128_backend;
119
120 template<>
121 struct number_category<backends::float128_backend> : public mpl::int_<number_kind_floating_point> {};
122 #if defined(BOOST_MP_USE_QUAD)
123 template<>
124 struct number_category<float128_type> : public mpl::int_<number_kind_floating_point> {};
125 #endif
126
127 typedef number<float128_backend, et_off> float128;
128
129 namespace backends{
130
131 struct float128_backend
132 {
133 typedef mpl::list<signed char, short, int, long, boost::long_long_type> signed_types;
134 typedef mpl::list<unsigned char, unsigned short,
135 unsigned int, unsigned long, boost::ulong_long_type> unsigned_types;
136 typedef mpl::list<float, double, long double> float_types;
137 typedef int exponent_type;
138
139 private:
140 float128_type m_value;
141 public:
142 BOOST_CONSTEXPR float128_backend() BOOST_NOEXCEPT : m_value(0) {}
143 BOOST_CONSTEXPR float128_backend(const float128_backend& o) BOOST_NOEXCEPT : m_value(o.m_value) {}
144 float128_backend& operator = (const float128_backend& o) BOOST_NOEXCEPT
145 {
146 m_value = o.m_value;
147 return *this;
148 }
149 template <class T>
150 BOOST_CONSTEXPR float128_backend(const T& i, const typename enable_if_c<is_convertible<T, float128_type>::value>::type* = 0) BOOST_NOEXCEPT_IF(noexcept(std::declval<float128_type&>() = std::declval<const T&>()))
151 : m_value(i) {}
152 template <class T>
153 typename enable_if_c<is_arithmetic<T>::value || is_convertible<T, float128_type>::value, float128_backend&>::type operator = (const T& i) BOOST_NOEXCEPT_IF(noexcept(std::declval<float128_type&>() = std::declval<const T&>()))
154 {
155 m_value = i;
156 return *this;
157 }
158 float128_backend(long double const& f)
159 {
160 if(boost::math::isinf(f))
161 m_value = (f < 0) ? -1.0Q / 0.0Q : 1.0Q / 0.0Q;
162 else
163 m_value = f;
164 }
165 float128_backend& operator=(long double const& f)
166 {
167 if(boost::math::isinf(f))
168 m_value = (f < 0) ? -1.0Q / 0.0Q : 1.0Q / 0.0Q;
169 else
170 m_value = f;
171 return *this;
172 }
173 float128_backend& operator = (const char* s)
174 {
175 #ifndef BOOST_MP_USE_QUAD
176 char* p_end;
177 m_value = strtoflt128(s, &p_end);
178 if(p_end - s != (std::ptrdiff_t)std::strlen(s))
179 {
180 BOOST_THROW_EXCEPTION(std::runtime_error("Unable to interpret input string as a floating point value"));
181 }
182 #else
183 boost::multiprecision::detail::convert_from_string(*this, s);
184 #endif
185 return *this;
186 }
187 void swap(float128_backend& o) BOOST_NOEXCEPT
188 {
189 std::swap(m_value, o.value());
190 }
191 std::string str(std::streamsize digits, std::ios_base::fmtflags f)const
192 {
193 #ifndef BOOST_MP_USE_QUAD
194 char buf[100];
195 boost::scoped_array<char> buf2;
196 std::string format = "%";
197 if(f & std::ios_base::showpos)
198 format += "+";
199 if(f & std::ios_base::showpoint)
200 format += "#";
201 format += ".*";
202 if(digits == 0)
203 digits = 36;
204 format += "Q";
205 if(f & std::ios_base::scientific)
206 format += "e";
207 else if(f & std::ios_base::fixed)
208 format += "f";
209 else
210 format += "g";
211
212 int v = quadmath_snprintf (buf, 100, format.c_str(), digits, m_value);
213
214 if((v < 0) || (v >= 99))
215 {
216 int v_max = v;
217 buf2.reset(new char[v+3]);
218 v = quadmath_snprintf (&buf2[0], v_max + 3, format.c_str(), digits, m_value);
219 if(v >= v_max + 3)
220 {
221 BOOST_THROW_EXCEPTION(std::runtime_error("Formatting of float128_type failed."));
222 }
223 return &buf2[0];
224 }
225 return buf;
226 #else
227 return boost::multiprecision::detail::convert_to_string(*this, digits ? digits : 37, f);
228 #endif
229 }
230 void negate() BOOST_NOEXCEPT
231 {
232 m_value = -m_value;
233 }
234 int compare(const float128_backend& o)const
235 {
236 return m_value == o.m_value ? 0 : m_value < o.m_value ? -1 : 1;
237 }
238 template <class T>
239 int compare(const T& i)const
240 {
241 return m_value == i ? 0 : m_value < i ? -1 : 1;
242 }
243 float128_type& value()
244 {
245 return m_value;
246 }
247 const float128_type& value()const
248 {
249 return m_value;
250 }
251 };
252
253 inline void eval_add(float128_backend& result, const float128_backend& a)
254 {
255 result.value() += a.value();
256 }
257 template <class A>
258 inline void eval_add(float128_backend& result, const A& a)
259 {
260 result.value() += a;
261 }
262 inline void eval_subtract(float128_backend& result, const float128_backend& a)
263 {
264 result.value() -= a.value();
265 }
266 template <class A>
267 inline void eval_subtract(float128_backend& result, const A& a)
268 {
269 result.value() -= a;
270 }
271 inline void eval_multiply(float128_backend& result, const float128_backend& a)
272 {
273 result.value() *= a.value();
274 }
275 template <class A>
276 inline void eval_multiply(float128_backend& result, const A& a)
277 {
278 result.value() *= a;
279 }
280 inline void eval_divide(float128_backend& result, const float128_backend& a)
281 {
282 result.value() /= a.value();
283 }
284 template <class A>
285 inline void eval_divide(float128_backend& result, const A& a)
286 {
287 result.value() /= a;
288 }
289
290 inline void eval_add(float128_backend& result, const float128_backend& a, const float128_backend& b)
291 {
292 result.value() = a.value() + b.value();
293 }
294 template <class A>
295 inline void eval_add(float128_backend& result, const float128_backend& a, const A& b)
296 {
297 result.value() = a.value() + b;
298 }
299 inline void eval_subtract(float128_backend& result, const float128_backend& a, const float128_backend& b)
300 {
301 result.value() = a.value() - b.value();
302 }
303 template <class A>
304 inline void eval_subtract(float128_backend& result, const float128_backend& a, const A& b)
305 {
306 result.value() = a.value() - b;
307 }
308 template <class A>
309 inline void eval_subtract(float128_backend& result, const A& a, const float128_backend& b)
310 {
311 result.value() = a - b.value();
312 }
313 inline void eval_multiply(float128_backend& result, const float128_backend& a, const float128_backend& b)
314 {
315 result.value() = a.value() * b.value();
316 }
317 template <class A>
318 inline void eval_multiply(float128_backend& result, const float128_backend& a, const A& b)
319 {
320 result.value() = a.value() * b;
321 }
322 inline void eval_divide(float128_backend& result, const float128_backend& a, const float128_backend& b)
323 {
324 result.value() = a.value() / b.value();
325 }
326
327 template <class R>
328 inline void eval_convert_to(R* result, const float128_backend& val)
329 {
330 *result = static_cast<R>(val.value());
331 }
332
333 inline void eval_frexp(float128_backend& result, const float128_backend& arg, int* exp)
334 {
335 result.value() = frexpq(arg.value(), exp);
336 }
337
338 inline void eval_ldexp(float128_backend& result, const float128_backend& arg, int exp)
339 {
340 result.value() = ldexpq(arg.value(), exp);
341 }
342
343 inline void eval_floor(float128_backend& result, const float128_backend& arg)
344 {
345 result.value() = floorq(arg.value());
346 }
347 inline void eval_ceil(float128_backend& result, const float128_backend& arg)
348 {
349 result.value() = ceilq(arg.value());
350 }
351 inline void eval_sqrt(float128_backend& result, const float128_backend& arg)
352 {
353 result.value() = sqrtq(arg.value());
354 }
355 inline int eval_fpclassify(const float128_backend& arg)
356 {
357 if(isnanq(arg.value()))
358 return FP_NAN;
359 else if(isinfq(arg.value()))
360 return FP_INFINITE;
361 else if(arg.value() == 0)
362 return FP_ZERO;
363
364 float128_backend t(arg);
365 if(t.value() < 0)
366 t.negate();
367 if(t.value() < 3.36210314311209350626267781732175260e-4932Q)
368 return FP_SUBNORMAL;
369 return FP_NORMAL;
370 }
371
372 inline void eval_increment(float128_backend& arg)
373 {
374 ++arg.value();
375 }
376 inline void eval_decrement(float128_backend& arg)
377 {
378 --arg.value();
379 }
380
381 /*********************************************************************
382 *
383 * abs/fabs:
384 *
385 *********************************************************************/
386
387 inline void eval_abs(float128_backend& result, const float128_backend& arg)
388 {
389 result.value() = fabsq(arg.value());
390 }
391 inline void eval_fabs(float128_backend& result, const float128_backend& arg)
392 {
393 result.value() = fabsq(arg.value());
394 }
395
396 /*********************************************************************
397 *
398 * Floating point functions:
399 *
400 *********************************************************************/
401
402 inline void eval_trunc(float128_backend& result, const float128_backend& arg)
403 {
404 result.value() = truncq(arg.value());
405 }
406 /*
407 //
408 // This doesn't actually work... rely on our own default version instead.
409 //
410 inline void eval_round(float128_backend& result, const float128_backend& arg)
411 {
412 if(isnanq(arg.value()) || isinf(arg.value()))
413 {
414 result = boost::math::policies::raise_rounding_error(
415 "boost::multiprecision::trunc<%1%>(%1%)", 0,
416 number<float128_backend, et_off>(arg),
417 number<float128_backend, et_off>(arg),
418 boost::math::policies::policy<>()).backend();
419 return;
420 }
421 result.value() = roundq(arg.value());
422 }
423 */
424
425 inline void eval_exp(float128_backend& result, const float128_backend& arg)
426 {
427 result.value() = expq(arg.value());
428 }
429 inline void eval_log(float128_backend& result, const float128_backend& arg)
430 {
431 result.value() = logq(arg.value());
432 }
433 inline void eval_log10(float128_backend& result, const float128_backend& arg)
434 {
435 result.value() = log10q(arg.value());
436 }
437 inline void eval_sin(float128_backend& result, const float128_backend& arg)
438 {
439 result.value() = sinq(arg.value());
440 }
441 inline void eval_cos(float128_backend& result, const float128_backend& arg)
442 {
443 result.value() = cosq(arg.value());
444 }
445 inline void eval_tan(float128_backend& result, const float128_backend& arg)
446 {
447 result.value() = tanq(arg.value());
448 }
449 inline void eval_asin(float128_backend& result, const float128_backend& arg)
450 {
451 result.value() = asinq(arg.value());
452 }
453 inline void eval_acos(float128_backend& result, const float128_backend& arg)
454 {
455 result.value() = acosq(arg.value());
456 }
457 inline void eval_atan(float128_backend& result, const float128_backend& arg)
458 {
459 result.value() = atanq(arg.value());
460 }
461 inline void eval_sinh(float128_backend& result, const float128_backend& arg)
462 {
463 result.value() = sinhq(arg.value());
464 }
465 inline void eval_cosh(float128_backend& result, const float128_backend& arg)
466 {
467 result.value() = coshq(arg.value());
468 }
469 inline void eval_tanh(float128_backend& result, const float128_backend& arg)
470 {
471 result.value() = tanhq(arg.value());
472 }
473 inline void eval_fmod(float128_backend& result, const float128_backend& a, const float128_backend& b)
474 {
475 result.value() = fmodq(a.value(), b.value());
476 }
477 inline void eval_pow(float128_backend& result, const float128_backend& a, const float128_backend& b)
478 {
479 result.value() = powq(a.value(), b.value());
480 }
481 inline void eval_atan2(float128_backend& result, const float128_backend& a, const float128_backend& b)
482 {
483 result.value() = atan2q(a.value(), b.value());
484 }
485 inline void eval_multiply_add(float128_backend& result, const float128_backend& a, const float128_backend& b, const float128_backend& c)
486 {
487 result.value() = fmaq(a.value(), b.value(), c.value());
488 }
489
490 inline int eval_signbit BOOST_PREVENT_MACRO_SUBSTITUTION(const float128_backend& arg)
491 {
492 return ::signbitq(arg.value());
493 }
494
495 inline std::size_t hash_value(const float128_backend& val)
496 {
497 return boost::hash_value(static_cast<double>(val.value()));
498 }
499
500 } // namespace backends
501
502 template<boost::multiprecision::expression_template_option ExpressionTemplates>
503 inline boost::multiprecision::number<float128_backend, ExpressionTemplates> asinh BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<float128_backend, ExpressionTemplates>& arg)
504 {
505 return asinhq(arg.backend().value());
506 }
507 template<boost::multiprecision::expression_template_option ExpressionTemplates>
508 inline boost::multiprecision::number<float128_backend, ExpressionTemplates> acosh BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<float128_backend, ExpressionTemplates>& arg)
509 {
510 return acoshq(arg.backend().value());
511 }
512 template<boost::multiprecision::expression_template_option ExpressionTemplates>
513 inline boost::multiprecision::number<float128_backend, ExpressionTemplates> atanh BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<float128_backend, ExpressionTemplates>& arg)
514 {
515 return atanhq(arg.backend().value());
516 }
517 template<boost::multiprecision::expression_template_option ExpressionTemplates>
518 inline boost::multiprecision::number<float128_backend, ExpressionTemplates> cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<float128_backend, ExpressionTemplates>& arg)
519 {
520 return cbrtq(arg.backend().value());
521 }
522 template<boost::multiprecision::expression_template_option ExpressionTemplates>
523 inline boost::multiprecision::number<float128_backend, ExpressionTemplates> erf BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<float128_backend, ExpressionTemplates>& arg)
524 {
525 return erfq(arg.backend().value());
526 }
527 template<boost::multiprecision::expression_template_option ExpressionTemplates>
528 inline boost::multiprecision::number<float128_backend, ExpressionTemplates> erfc BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<float128_backend, ExpressionTemplates>& arg)
529 {
530 return erfcq(arg.backend().value());
531 }
532 template<boost::multiprecision::expression_template_option ExpressionTemplates>
533 inline boost::multiprecision::number<float128_backend, ExpressionTemplates> expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<float128_backend, ExpressionTemplates>& arg)
534 {
535 return expm1q(arg.backend().value());
536 }
537 template<boost::multiprecision::expression_template_option ExpressionTemplates>
538 inline boost::multiprecision::number<float128_backend, ExpressionTemplates> lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<float128_backend, ExpressionTemplates>& arg)
539 {
540 return lgammaq(arg.backend().value());
541 }
542 template<boost::multiprecision::expression_template_option ExpressionTemplates>
543 inline boost::multiprecision::number<float128_backend, ExpressionTemplates> tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<float128_backend, ExpressionTemplates>& arg)
544 {
545 return tgammaq(arg.backend().value());
546 }
547 template<boost::multiprecision::expression_template_option ExpressionTemplates>
548 inline boost::multiprecision::number<float128_backend, ExpressionTemplates> log1p BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<float128_backend, ExpressionTemplates>& arg)
549 {
550 return log1pq(arg.backend().value());
551 }
552
553 template <multiprecision::expression_template_option ExpressionTemplates>
554 inline boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> copysign BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates>& a, const boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates>& b)
555 {
556 return ::copysignq(a.backend().value(), b.backend().value());
557 }
558
559 inline void eval_remainder(float128_backend& result, const float128_backend& a, const float128_backend& b)
560 {
561 result.value() = remainderq(a.value(), b.value());
562 }
563 inline void eval_remainder(float128_backend& result, const float128_backend& a, const float128_backend& b, int* pi)
564 {
565 result.value() = remquoq(a.value(), b.value(), pi);
566 }
567
568 } // namespace multiprecision
569
570 namespace math {
571
572 using boost::multiprecision::signbit;
573 using boost::multiprecision::copysign;
574
575 } // namespace math
576
577 } // namespace boost
578
579 namespace boost{
580 namespace archive{
581
582 class binary_oarchive;
583 class binary_iarchive;
584
585 }
586
587 namespace serialization{ namespace float128_detail{
588
589 template <class Archive>
590 void do_serialize(Archive& ar, boost::multiprecision::backends::float128_backend& val, const mpl::false_&, const mpl::false_&)
591 {
592 // saving
593 // non-binary
594 std::string s(val.str(0, std::ios_base::scientific));
595 ar & s;
596 }
597 template <class Archive>
598 void do_serialize(Archive& ar, boost::multiprecision::backends::float128_backend& val, const mpl::true_&, const mpl::false_&)
599 {
600 // loading
601 // non-binary
602 std::string s;
603 ar & s;
604 val = s.c_str();
605 }
606
607 template <class Archive>
608 void do_serialize(Archive& ar, boost::multiprecision::backends::float128_backend& val, const mpl::false_&, const mpl::true_&)
609 {
610 // saving
611 // binary
612 ar.save_binary(&val, sizeof(val));
613 }
614 template <class Archive>
615 void do_serialize(Archive& ar, boost::multiprecision::backends::float128_backend& val, const mpl::true_&, const mpl::true_&)
616 {
617 // loading
618 // binary
619 ar.load_binary(&val, sizeof(val));
620 }
621
622 } // detail
623
624 template <class Archive>
625 void serialize(Archive& ar, boost::multiprecision::backends::float128_backend& val, unsigned int /*version*/)
626 {
627 typedef typename Archive::is_loading load_tag;
628 typedef typename mpl::bool_<boost::is_same<Archive, boost::archive::binary_oarchive>::value || boost::is_same<Archive, boost::archive::binary_iarchive>::value> binary_tag;
629
630 float128_detail::do_serialize(ar, val, load_tag(), binary_tag());
631 }
632
633 } // namepsace archive
634
635 } // namespace boost
636
637 namespace std{
638
639 template <boost::multiprecision::expression_template_option ExpressionTemplates>
640 class numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >
641 {
642 typedef boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> number_type;
643 public:
644 BOOST_STATIC_CONSTEXPR bool is_specialized = true;
645 static number_type (min)() BOOST_NOEXCEPT { return 3.36210314311209350626267781732175260e-4932Q; }
646 static number_type (max)() BOOST_NOEXCEPT { return 1.18973149535723176508575932662800702e4932Q; }
647 static number_type lowest() BOOST_NOEXCEPT { return -(max)(); }
648 BOOST_STATIC_CONSTEXPR int digits = 113;
649 BOOST_STATIC_CONSTEXPR int digits10 = 33;
650 BOOST_STATIC_CONSTEXPR int max_digits10 = 36;
651 BOOST_STATIC_CONSTEXPR bool is_signed = true;
652 BOOST_STATIC_CONSTEXPR bool is_integer = false;
653 BOOST_STATIC_CONSTEXPR bool is_exact = false;
654 BOOST_STATIC_CONSTEXPR int radix = 2;
655 static number_type epsilon() { return 1.92592994438723585305597794258492732e-34Q; }
656 static number_type round_error() { return 0.5; }
657 BOOST_STATIC_CONSTEXPR int min_exponent = -16381;
658 BOOST_STATIC_CONSTEXPR int min_exponent10 = min_exponent * 301L / 1000L;
659 BOOST_STATIC_CONSTEXPR int max_exponent = 16384;
660 BOOST_STATIC_CONSTEXPR int max_exponent10 = max_exponent * 301L / 1000L;
661 BOOST_STATIC_CONSTEXPR bool has_infinity = true;
662 BOOST_STATIC_CONSTEXPR bool has_quiet_NaN = true;
663 BOOST_STATIC_CONSTEXPR bool has_signaling_NaN = false;
664 BOOST_STATIC_CONSTEXPR float_denorm_style has_denorm = denorm_present;
665 BOOST_STATIC_CONSTEXPR bool has_denorm_loss = true;
666 static number_type infinity() { return 1.0q / 0.0q; }
667 static number_type quiet_NaN() { return number_type("nan"); }
668 static number_type signaling_NaN() { return 0; }
669 static number_type denorm_min() { return 6.475175119438025110924438958227646552e-4966Q; }
670 BOOST_STATIC_CONSTEXPR bool is_iec559 = true;
671 BOOST_STATIC_CONSTEXPR bool is_bounded = false;
672 BOOST_STATIC_CONSTEXPR bool is_modulo = false;
673 BOOST_STATIC_CONSTEXPR bool traps = false;
674 BOOST_STATIC_CONSTEXPR bool tinyness_before = false;
675 BOOST_STATIC_CONSTEXPR float_round_style round_style = round_to_nearest;
676 };
677
678 template <boost::multiprecision::expression_template_option ExpressionTemplates>
679 BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::is_specialized;
680 template <boost::multiprecision::expression_template_option ExpressionTemplates>
681 BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::digits;
682 template <boost::multiprecision::expression_template_option ExpressionTemplates>
683 BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::digits10;
684 template <boost::multiprecision::expression_template_option ExpressionTemplates>
685 BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::max_digits10;
686
687 template <boost::multiprecision::expression_template_option ExpressionTemplates>
688 BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::is_signed;
689 template <boost::multiprecision::expression_template_option ExpressionTemplates>
690 BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::is_integer;
691 template <boost::multiprecision::expression_template_option ExpressionTemplates>
692 BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::is_exact;
693 template <boost::multiprecision::expression_template_option ExpressionTemplates>
694 BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::radix;
695
696
697 template <boost::multiprecision::expression_template_option ExpressionTemplates>
698 BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::min_exponent;
699 template <boost::multiprecision::expression_template_option ExpressionTemplates>
700 BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::max_exponent;
701 template <boost::multiprecision::expression_template_option ExpressionTemplates>
702 BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::min_exponent10;
703 template <boost::multiprecision::expression_template_option ExpressionTemplates>
704 BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::max_exponent10;
705
706 template <boost::multiprecision::expression_template_option ExpressionTemplates>
707 BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::has_infinity;
708 template <boost::multiprecision::expression_template_option ExpressionTemplates>
709 BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::has_quiet_NaN;
710 template <boost::multiprecision::expression_template_option ExpressionTemplates>
711 BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::has_signaling_NaN;
712 template <boost::multiprecision::expression_template_option ExpressionTemplates>
713 BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::has_denorm_loss;
714
715 template <boost::multiprecision::expression_template_option ExpressionTemplates>
716 BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::is_iec559;
717 template <boost::multiprecision::expression_template_option ExpressionTemplates>
718 BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::is_bounded;
719 template <boost::multiprecision::expression_template_option ExpressionTemplates>
720 BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::is_modulo;
721 template <boost::multiprecision::expression_template_option ExpressionTemplates>
722 BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::traps;
723 template <boost::multiprecision::expression_template_option ExpressionTemplates>
724 BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::tinyness_before;
725
726 template <boost::multiprecision::expression_template_option ExpressionTemplates>
727 BOOST_CONSTEXPR_OR_CONST float_round_style numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::round_style;
728 template <boost::multiprecision::expression_template_option ExpressionTemplates>
729 BOOST_CONSTEXPR_OR_CONST float_denorm_style numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >::has_denorm;
730
731 } // namespace std
732
733
734 #endif