Files
multiprecision/test/test_arithmetic_cpp_bin_float_3.cpp
René Ferdinand Rivera Morell 6df8e19f00 Add support for modular build structure. (#632)
* Make the library modular usable.

* Switch to library requirements instead of source. As source puts extra source in install targets.

* Add missing import-search for cconfig/predef checks.

* Add requires-b2 check to top-level build file.

* Bump B2 require to 5.2

* Change all <source> references to <library>.

* Update copyright dates.

* Move inter-lib dependencies to a project variable and into the build targets.

* Adjust doc build to avoid boost-root references.

* Update build deps.

* Change Boost Test build refs to work with both old and modular test lib targets.

* Adjust CI for changes to the inspect tool. Also simplify the build and test to avoid future config problems as it can mor easily adjust to future CI changes.

* Use latest CI image to get a modern C++ compiler rthat doesn't ICE, we hope.

* Current CircleCI images need sudo to install packages.

* Undo search-lib change.

---------

Co-authored-by: Matt Borland <matt@mattborland.com>
2025-06-10 10:21:15 -04:00

24 lines
1.5 KiB
C++

///////////////////////////////////////////////////////////////
// Copyright 2012 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#include <boost/multiprecision/cpp_bin_float.hpp>
#include "test_arithmetic.hpp"
template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinExponent, Exponent MaxExponent, boost::multiprecision::expression_template_option ET>
struct related_type<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent>, ET> >
{
typedef boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinExponent, MaxExponent>, ET> number_type;
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;
};
int main()
{
//test<boost::multiprecision::cpp_bin_float_50>();
//test<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<1000, boost::multiprecision::digit_base_10, std::allocator<char> > > >();
test<boost::multiprecision::cpp_bin_float_quad>();
return boost::report_errors();
}