Ticket #4931: boost-interval-typos.patch

File boost-interval-typos.patch, 6.6 KB (added by Vladimir Rutsky <altsysrq@…>, 12 years ago)

Patch for typos in Boost.Interval documentation

  • libs/numeric/interval/doc/guide.htm

     
    7171  not really interested by the inclusion property; you are only interested by
    7272  the computation algorithms the library provides. So you do not need to use
    7373  any rounding; the checking also may not be useful. Use an "exact
    74   computation" rounding (you are allowed to think the name stangely applies
     74  computation" rounding (you are allowed to think the name strangely applies
    7575  to the situation) and a checking that never tests for any invalid numbers
    7676  or empty intervals. By doing that, you will obtain library functions
    7777  reduced to their minimum (an addition of two intervals will only be two
  • libs/numeric/interval/doc/interval.htm

     
    146146  methods (for instance, toward minus or plus infinity) if we want to
    147147  guarantee the inclusion property. Note that we also may explicitely specify
    148148  no rounding, for instance if the base number type is exact, i.e. the result
    149   of a mathematic operation is always computed and represented without loss
     149  of a mathematical operation is always computed and represented without loss
    150150  of precision. If the number type is not exact, we may still explicitely
    151151  specify no rounding, with the obvious consequence that the inclusion
    152   property is no longuer guaranteed.</p>
     152  property is no longer guaranteed.</p>
    153153
    154154  <p>Finally, because heavy loss of precision is always possible, some
    155155  numbers have to represent infinities or an exceptional behavior must be
     
    480480  set of values the intervals contain. E.g. with the default policies,
    481481  intervals are subsets of the set of real numbers. The static functions
    482482  <code>empty</code> and <code>whole</code> produce the intervals/subsets
    483   that are repectively the empty subset and the whole set. They are static
     483  that are respectively the empty subset and the whole set. They are static
    484484  member functions rather than global functions because they cannot guess
    485485  their return types. Likewise for <code>hull</code>. <code>empty</code> and
    486486  <code>whole</code> involve the checking policy in order to get the bounds
     
    566566  <p>The functions <code>division_part1</code> and
    567567  <code>division_part2</code> are useful when the user expects the division
    568568  to return disjoint intervals if necessary. For example, the narrowest
    569   closed set containg [2,3] / [-2,1] is not ]-&infin;,&infin;[ but the union
     569  closed set containing [2,3] / [-2,1] is not ]-&infin;,&infin;[ but the union
    570570  of ]-&infin;,-1] and [2,&infin;[. When the result of the division is
    571571  representable by only one interval, <code>division_part1</code> returns
    572572  this interval and sets the boolean reference to <code>false</code>.
     
    808808
    809809  <h4>Comparisons</h4>
    810810
    811   <p>One of the biggest problems is problably the correct use of the
     811  <p>One of the biggest problems is probably the correct use of the
    812812  comparison functions and operators. First, functions and operators do not
    813813  try to know if two intervals are the same mathematical object. So, if the
    814814  comparison used is "certain", then <code>x != x</code> is always true
     
    831831  be equal: <code>x/x</code> and 1, <code>x*x</code> and
    832832  <code>square(x)</code>, <code>x-x</code> and 0, etc. So the main cause of
    833833  wide intervals is that interval arithmetic does not identify different
    834   occurences of the same variable. So, whenever possible, the user has to
     834  occurrences of the same variable. So, whenever possible, the user has to
    835835  rewrite the formulas to eliminate multiple occurences of the same variable.
    836836  For example, <code>square(x)-2*x</code> is far less precise than
    837837  <code>square(x-1)-1</code>.</p>
     
    884884  implementations of the rounding policy for the primitive types float and
    885885  double. In order for these implementations to be correct and fast, the
    886886  library needs to work a lot with rounding modes. Some processors are
    887   directly dealt with and some mecanisms are provided in order to speed up
     887  directly dealt with and some mechanisms are provided in order to speed up
    888888  the computations. It seems to be heavy and hazardous optimizations for a
    889889  gain of only a few computer cycles; but in reality, the speed-up factor can
    890890  easily go past 2 or 3 depending on the computer. Moreover, these
  • libs/numeric/interval/doc/rounding.htm

     
    4141  <pre>
    4242/* Rounding requirements */
    4343struct rounding {
    44   // defaut constructor, destructor
     44  // default constructor, destructor
    4545  rounding();
    4646  ~rounding();
    4747  // mathematical operations
     
    375375  argument correctly rounded accordingly to the current rounding mode if it
    376376  was not already the case. This function is necessary to handle delayed
    377377  rounding. Indeed, depending on the way the computations are done, the
    378   intermediate results may be internaly stored in a more precise format and
     378  intermediate results may be internally stored in a more precise format and
    379379  it can lead to a wrong rounding. So the function enforces the rounding.
    380380  <a href="#extreg">Here</a> is an example of what happens when the rounding
    381381  is not enforced.</p>
  • libs/numeric/interval/doc/todo.htm

     
    1616  <h2>Comments from the review process</h2>
    1717
    1818  <ul>
    19     <li>It would be nice to have a 100% portable Rouding policy class based
     19    <li>It would be nice to have a 100% portable Rounding policy class based
    2020    on LIA-1 only, with no additional requirement such as IEEE 754 or even
    2121    more.</li>
    2222
     
    4242    <li>Safe conversions from <code>interval&lt;double&gt;</code> to
    4343    <code>interval&lt;float&gt;</code>? Requires partial specialization.</li>
    4444
    45     <li>It would be nice to use the expression template mecanism to
     45    <li>It would be nice to use the expression template mechanism to
    4646    automatically use the more efficient unprotected rounding mode version
    4747    for small subexpressions (although you can do bigger expressions by
    4848    hand).</li>