Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2005-12-17 05:43:14

> I was thinking of creating a continued fraction class for us, but
> then I saw a note about how continued fraction comparison is easier
> than regular fraction comparison. More importantly, c.f. comparison
> is just list entry checking, no arithmetic operations. Conversion
> from r.f. to c.f. involves only division and remainders. These facts
> combine to make a r.f. comparison that doesn't need multiplications,
> and therefore avoids overflow.

My understanding is that continued fractions aren't very useful for anything
that's involves actual arithmetic, but they can be used to solve specific
problems like the one raised for rational.

They're also extremely important for evaluating numeric approximations of
various functions, but rather hard to compute unfortunately. Even so the
modified Lenz's algorithm would be a useful addition to Boost at some point.


Boost list run by bdawes at, gregod at, cpdaniel at, john at