#include <continued_fraction.h>
Public Types | |
| typedef IntType | integral_type |
| typedef boost::rational< IntType > | rational_type |
Public Member Functions | |
| continued_fraction (integral_type a0) | |
| Construct the continued fraction [a0]. | |
| void | append (integral_type a) |
| [a_0, ... , a_n] --> [a_0, ... , a_n, a] | |
| rational_type | as_rational () |
| Rational value. | |
| template<typename FloatType> | |
| FloatType | as_real () |
| Real value. | |
Static Public Member Functions | |
| template<typename FloatType> | |
| static continued_fraction | from_real (FloatType x, FloatType eps=std::numeric_limits< FloatType >::epsilon()) |
| A continued fraction approximating x with the given precision. | |
1.5.6