Moved README to website.
[frac.git] / README
blob562a0e21ddfa5fcb5e73333156e6644e4cb9e1dc
1 == Installation ==
3 The GMP library is required. Type:
4  
5   $ make
7 to compile.
9 Then try "pi 2000" to generate 2000 digits of pi using a continued
10 fraction. It takes longer than I had hoped, but it's faster than
12   $ echo "scale = 2000; 4*a(1)" | bc -l
14 Also try "hakmem 1000" to compute 1000 digits of the example continued fraction
15 constant from HAKMEM, which compares favourably with:
17   $ echo "scale=1000
18           pi=4*a(1)
19           x=2*sqrt(5)
20           (sqrt(3/pi^2+e(1)))/((e(x)-1)/(e(x)+1)-s(69))" | bc -l
22 Unlike frac, bc can only output the final answer in one go after all
23 calculations are complete.
25 There's no API documentation; see the source.
27 == Bugs and other issues ==
29 I intend to devote time to projects that operate on real numbers rather than
30 study real numbers for its own sake. But perhaps then I'll find a perfect
31 application for continued fractions, which will push me to fix deficiencies in
32 this code:
34 - I want to replace the condition variable with a semaphore to silence Helgrind
35   (whose documentation states that condition variables almost unconditionally
36   and invariably raise false alarms).
38 - Computing the continued fraction expansion of pi from the Chudnovsky
39   brothers' Ramanujan formula would be much faster. More constants could
40   benefit from using efficiently computable sequences of narrower intervals
41   for their continued fraction expansions.
43 - The API could use cosmetic surgery.
45 - The Makefile is fragile and annoying to maintain and use.
47 - The testing infrastructure needs upgrading.
49 - Much more, e.g. see TODOs sprinkled throughout the code.