home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C++ / Libraries / continued_fraction / continued_fraction about next >
Encoding:
Text File  |  1994-11-09  |  636 b   |  12 lines  |  [ttro/ttxt]

  1.  
  2. 'continued_fraction' is a C++ class for computing best rational approximations of floating point numbers. The class is called 'continued_fraction' because the approximations are computed using continued fractions.
  3.  
  4. 'continued_fraction' can be used to pretty-print numbers. For instance, one can use them to print 1.5 as 3/2. Implementing this in a useful way does require a lot of work, though.
  5.  
  6. The accompanying program demonstrates its use.
  7.  
  8. For details about continued fractions and rational approximations consult a
  9. book on number theory (number theory is a branch of mathematics)
  10.  
  11. This source code is placed in the public domain.
  12.