]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /////////////////////////////////////////////////////////////// |
2 | // Copyright 2012 John Maddock. Distributed under the Boost | |
3 | // Software License, Version 1.0. (See accompanying file | |
92f5a8d4 TL |
4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt |
5 | ||
6 | #define NO_MIXED_OPS | |
7c673cae | 7 | |
7c673cae FG |
8 | #include <boost/multiprecision/cpp_bin_float.hpp> |
9 | ||
10 | #include "libs/multiprecision/test/test_arithmetic.hpp" | |
11 | ||
12 | template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinExponent, Exponent MaxExponent, boost::multiprecision::expression_template_option ET> | |
92f5a8d4 | 13 | struct related_type<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent>, ET> > |
7c673cae | 14 | { |
92f5a8d4 TL |
15 | typedef boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent>, ET> number_type; |
16 | typedef boost::multiprecision::number<boost::multiprecision::cpp_bin_float<((std::numeric_limits<number_type>::digits / 2) > std::numeric_limits<long double>::digits ? Digits / 2 : Digits), DigitBase, Allocator, Exponent, MinExponent, MaxExponent>, ET> type; | |
7c673cae FG |
17 | }; |
18 | ||
19 | int main() | |
20 | { | |
21 | //test<boost::multiprecision::cpp_bin_float_50>(); | |
1e59de90 | 22 | test<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<1000, boost::multiprecision::digit_base_10, std::allocator<char>, long long> > >(); |
7c673cae FG |
23 | //test<boost::multiprecision::cpp_bin_float_quad>(); |
24 | return boost::report_errors(); | |
25 | } |