title: Express highest floating point quantity that is less than 1
body: <p>I was doing some rounding calculations and happened upon a question. How can I express the highest quantity less than 1 for a given floating point type?</p>
  
  <p>That is, how I write/represent value <code>x</code> such that <code>x &lt; 1, x + y &gt;= 1</code> for any <code>y &gt; 0</code>.</p>
  
  <p>In fractions this would be <code>x = (q-1)/q</code> where <code>q</code> is the <em>precision</em> of the type. For example, if you are counting in <code>1/999</code> increments then <code>x = 998/999</code>.</p>
  
  <p>For a given type (float, double, long double), how could one express the value <code>x</code> in code?</p>
  
  <hr>
  
  <p>I also wonder if such a value actually exists for all values of <code>y</code>. That is, as <code>y's</code> exponent gets smaller perhaps the relation doesn't hold anymore. So an answer with some range restriction on <code>y</code> is also acceptable. (The value of <code>x</code> I want still does exist, the relationship may just not properly express it.)</p>