title: How can I write a C++ function returning true if a real number is exactly representable with a double?
body: <p>How can I write a C++ function returning true if a real number is exactly representable with a double?</p>
  
  <pre><code>bool isRepresentable( const char* realNumber )
  {
     bool answer = false;
     // what goes here?
     return answer;
  }
  </code></pre>
  
  <p>Simple tests:</p>
  
  <pre><code>assert( true==isRepresentable( "0.5" ) );
  assert( false==isRepresentable( "0.1" ) );
  </code></pre>