boost/libs/multiprecision/doc/reference_mpfr_float.qbk
2021-10-05 21:37:46 +02:00

41 lines
1.8 KiB
Plaintext

[/
Copyright 2011 - 2020 John Maddock.
Copyright 2013 - 2019 Paul A. Bristow.
Copyright 2013 Christopher Kormanyos.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:mpfr_ref mpfr_float_backend]
namespace boost{ namespace multiprecision{
template <unsigned Digits10>
class mpfr_float_backend;
typedef number<mpfr_float_backend<50> > mpfr_float_50;
typedef number<mpfr_float_backend<100> > mpfr_float_100;
typedef number<mpfr_float_backend<500> > mpfr_float_500;
typedef number<mpfr_float_backend<1000> > mpfr_float_1000;
typedef number<mpfr_float_backend<0> > mpfr_float;
}} // namespaces
Class template `mpfr_float_backend` fulfils all of the requirements for a [link boost_multiprecision.ref.backendconc Backend] type.
Its members and non-member functions are deliberately not documented: these are considered implementation details that are subject
to change.
The class takes a single template parameter - `Digits10` - which is the number of decimal digits precision the type
should support. When this parameter is zero, then the precision can be set at runtime via `number::default_precision`
and `number::precision`. Note that this type does not in any way change the GMP or MPFR library's global state (for example
it does not change the default precision of the mpfr_t data type), therefore you can safely mix this type with existing
code that uses GMP or MPFR, and also mix `mpfr_float_backend`s of differing precision.
The type of `number_category<cpp_int<Args...> >::type` is `std::integral_constant<int, number_kind_floating_point>`.
More information on this type can be found in the [link boost_multiprecision.tut.floats.mpfr_float tutorial].
[endsect]