]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /////////////////////////////////////////////////////////////// |
2 | // Copyright 2015 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 | ||
7 | #ifdef _MSC_VER | |
8 | # define _SCL_SECURE_NO_WARNINGS | |
9 | #endif | |
10 | ||
11 | #include <boost/detail/lightweight_test.hpp> | |
12 | #include <boost/array.hpp> | |
13 | #include "test.hpp" | |
14 | ||
15 | #include <boost/multiprecision/cpp_bin_float.hpp> | |
16 | #include <boost/math/constants/constants.hpp> | |
17 | ||
18 | int main() | |
19 | { | |
20 | using namespace boost::multiprecision; | |
21 | ||
22 | BOOST_STATIC_ASSERT((boost::is_convertible<float, cpp_bin_float_single>::value)); | |
23 | BOOST_STATIC_ASSERT(!(boost::is_convertible<double, cpp_bin_float_single>::value)); | |
24 | BOOST_STATIC_ASSERT(!(boost::is_convertible<long double, cpp_bin_float_single>::value)); | |
25 | ||
26 | cpp_bin_float_single s = boost::math::constants::pi<cpp_bin_float_single>(); | |
27 | ||
28 | typedef number<backends::cpp_bin_float<11, backends::digit_base_2, void, boost::int8_t, -14, 15>, et_off> cpp_bin_float_half; | |
29 | ||
30 | BOOST_STATIC_ASSERT(!(boost::is_convertible<float, cpp_bin_float_half>::value)); | |
31 | BOOST_STATIC_ASSERT(!(boost::is_convertible<double, cpp_bin_float_half>::value)); | |
32 | BOOST_STATIC_ASSERT(!(boost::is_convertible<long double, cpp_bin_float_half>::value)); | |
33 | ||
34 | cpp_bin_float_half hs = boost::math::constants::pi<cpp_bin_float_half>(); | |
35 | ||
36 | return boost::report_errors(); | |
37 | } | |
38 | ||
39 | ||
40 |