Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/multiprecision/detail/digits.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 /////////////////////////////////////////////////////////////// | |
2 // Copyright 2012 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 #ifndef BOOST_MP_DIGITS_HPP | |
7 #define BOOST_MP_DIGITS_HPP | |
8 | |
9 namespace boost{ namespace multiprecision{ namespace detail{ | |
10 | |
11 inline unsigned long digits10_2_2(unsigned long d10) | |
12 { | |
13 return (d10 * 1000uL) / 301uL + ((d10 * 1000uL) % 301 ? 2u : 1u); | |
14 } | |
15 | |
16 inline unsigned long digits2_2_10(unsigned long d2) | |
17 { | |
18 return (d2 * 301uL) / 1000uL; | |
19 } | |
20 | |
21 }}} // namespaces | |
22 | |
23 #endif |