title: Boost muliprecision cpp_dec_float compare only to desired precision
body: <p>I am using the boost::multiprecision library for decimal float types, and wish to compare two floats to the specified precision.</p>
  
  <p>However, cpp_dec_float seems to compare the number not to the specified precision, but also includes the guard digits:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  #include &lt;boost/multiprecision/cpp_dec_float.hpp&gt;
  //#include &lt;boost/math/special_functions.hpp&gt;
  
  typedef boost::multiprecision::number&lt;boost::multiprecision::cpp_dec_float&lt;50&gt; &gt; flp_type;
  
  int main(int argc, char* argv[])
  {
      // 50 decimal digits
      flp_type sqrt2("1.4142135623730950488016887242096980785696718753769");
      // Contains calculated guard digits
      flp_type result(boost::multiprecision::sqrt(flp_type("2")));
  
      // The 50 digits of precision actually ompare equal
      std::cout &lt;&lt; std::setprecision(50) &lt;&lt; sqrt2 &lt;&lt; std::endl;
      std::cout &lt;&lt; std::setprecision(50) &lt;&lt; result &lt;&lt; std::endl;
      // I want this to compare to the specified precision of the type, not the guard digits
      std::cout &lt;&lt; (result==sqrt2) &lt;&lt; std::endl;
  
      return 0;
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>1.4142135623730950488016887242096980785696718753769
  1.4142135623730950488016887242096980785696718753769
  0
  </code></pre>
  
  <p>Expected:</p>
  
  <pre><code>1.4142135623730950488016887242096980785696718753769
  1.4142135623730950488016887242096980785696718753769
  1
  </code></pre>
  
  <p><a href="http://coliru.stacked-crooked.com/a/2e4c585af1848ea9" rel="nofollow">See on Coliru</a></p>
  
  <p>I have tried to "truncate" with precision(), but to no avail.
  Is there a way to compare the two numbers without resorting to epsilon comparisons?</p>