1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #ifndef BOOST_MATH_MAX_DIGITS10_HPP
- #define BOOST_MATH_MAX_DIGITS10_HPP
- namespace boost {
- namespace multiprecision {
- namespace detail {
- template <unsigned digits>
- struct calc_max_digits10
- {
- static constexpr unsigned max_digits_10(unsigned d)
- {
-
-
-
-
-
-
-
- return static_cast<unsigned>(0.301029995663981195213738894724493026768189881462108541310 * d) + 2;
- }
- static constexpr const unsigned value = max_digits_10(digits);
- };
- template <unsigned digits>
- struct calc_digits10
- {
- static constexpr unsigned digits_10(unsigned d)
- {
-
-
-
-
-
- return static_cast<unsigned>(0.301029995663981195213738894724493026768189881462108541310 * (d - 1));
- }
- static constexpr const unsigned value = digits_10(digits);
- };
- }}}
- #endif
|