mirror of
https://github.com/boostorg/multiprecision.git
synced 2026-01-19 04:22:11 +00:00
* 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>
26 lines
1.6 KiB
C++
26 lines
1.6 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
|
|
|
|
#define NO_MIXED_OPS
|
|
|
|
#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>, long long> > >();
|
|
//test<boost::multiprecision::cpp_bin_float_quad>();
|
|
return boost::report_errors();
|
|
}
|