README - libzahl - big integer library | |
git clone git://git.suckless.org/libzahl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
README (1220B) | |
--- | |
1 NAME | |
2 libzahl - Big integer library | |
3 | |
4 ETYMOLOGY | |
5 The bold uppercase 'Z' which represents the set of | |
6 all integers is derived from the german word 'Zahlen', | |
7 whose singular is 'Zahl'. | |
8 | |
9 DESCRIPTION | |
10 libzahl is a C library for arbitrary size integers, | |
11 that aims to be usable for robust programs, and be | |
12 fast. | |
13 | |
14 libzahl will accomplish this by using long jumps | |
15 when an error is detected, rather than letting the | |
16 caller also perform a check. This shall make the | |
17 code in the user program cleaner too. libzahl will | |
18 use dedicated temporary bignum integers whether | |
19 possible, and necessary, for its internal calculations. | |
20 libzahl will not deallocate allocations, but rather | |
21 cache them for reuse. | |
22 | |
23 With the exception of functions working with strings, | |
24 all output parameters are before the input parameters. | |
25 | |
26 RATIONALE | |
27 GMP MP cannot be used for robust programs. LibTomMath | |
28 is too slow, probably because of all memory allocations, | |
29 and has a nonintuitive API. TomsFastMath has an a | |
30 nonintuitive API, has limited precision (selected at | |
31 compile-time), and has limited functionality. All the | |
32 above are also bloated. Hebimath is promising, but I | |
33 think it can be done better. | |
34 | |
35 NOTES | |
36 libzahl is currently not thread-safe. |