Boost logo

Boost :

From: Fahad Syed (sydfhd_at_[hidden])
Date: 2020-05-14 11:46:38


Hello,

I am an Electrical Engineering fresher at National Institute of
Technology, Srinagar. I have a proposal for a Continued Fraction
class, with all arithmetic implemented through Gosper's HAKMEM
algorithm.

Here are some advantages/applications I can think of right now for a
continued fraction representation:
1. Exact, base-independant representation of rationals AND irrationals
(of course limited by the precision required)
2. Unlike rationals where numerator and denominator need to be
"canonicalized" (i.e. divided by gcd for optimal representation),
continued fraction arithmetic incorporates that naturally.
3. Approximation: Continued fraction give the best possible rational
approximation for a given number
4. Comparison is extremely easy and fast
5. Conversion to float and base-conversion do not require division.
Conversion to float, especially, is extremely fast and simple.

I propose to implement most of the functions supported by the
multi-precision library.

Although I am sure there are many more applications and advantages, I
would like some feedback on whether this library/extension would be of
enough interest to be included in boost.

Thank you.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk