title: boost::multiprecision: What's the cheapest way to multiply or divide by a huge power of 10? Something like bitshift op for powers of 10?
body: <p>Consider the following MCVE:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;boost/multiprecision/cpp_int.hpp&gt;
  
  int main()
  {
      boost::multiprecision::cpp_int x = 10;
      x *= 10000000000000000000000000000000000000000000000000000000000000;
      std::cout&lt;&lt;x&lt;&lt;std::endl;
      return 0;
  }
  </code></pre>
  
  <p>It produces a wrong result, due to the obvious overflow from that <code>int</code>. How can I do this correctly, assuming I don't want to involve strings? Is there something like a "digit shift operator" or a power function that can do this cheaply (or cheapest possible)?</p>
  
  <p>Why? Because I have a fixed-precision library that I wrote, and scaling the internal integer requires such operations to be 100% safe.</p>
  
  <p>Find the example <a href="https://coliru.stacked-crooked.com/a/355e1d83bded4b8f" rel="nofollow noreferrer">here</a>.</p>