aboutsummaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-04-26Add, and use, libzahl_memfailure for conciseness, also fix possible unset errnoMattias Andrée4-15/+15
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-04-26zzero1 did not guarantee that all arguments were evaulated exactly once, thus made static inlineMattias Andrée1-1/+6
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-04-26Ensure that failure does not result in memory leakMattias Andrée5-14/+91
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-04-08Fix warnings (that were not turned on by default)Mattias Andrée8-28/+23
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-04-07Split out zahl-inlines.h zahl-internals.h from zahl.h to hide uninteresting stuffMattias Andrée1-19/+13
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-04-07zptest: use DEFAULT_RANDOMMattias Andrée1-1/+1
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-27Add rand(3), lrand(3), and random(3) to zrandMattias Andrée1-28/+133
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-25zrand: add DEFAULT_RANDOM and FASTEST_RANDOMMattias Andrée1-0/+2
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-25zrand: add MODUNIFORM and add tests for QUASIUNIFORM and MODUNIFORMMattias Andrée1-0/+8
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-25Rename zsplit_unsigned_fast_small_tainted to zsplit_unsigned_fast_small_autoMattias Andrée2-2/+2
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-16Optimise zsqr, zmul, zstr, zdivmod, zpow, and zpowuMattias Andrée7-91/+168
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-15Fix bug in libzahl_msb_nz_* and optimise and simplify libzahl_reallocMattias Andrée2-17/+11
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-15Remove unnecessary trimMattias Andrée1-1/+0
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-15Optimise zsqr, and optimise zmul a littleMattias Andrée3-55/+112
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-15Optimise zsetup, zgcd, zmul, and zsqr and add -fltoMattias Andrée8-106/+156
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-15OptimisationsMattias Andrée10-137/+64
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-14Mostly optimisationsMattias Andrée15-158/+195
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-14Fix so that no workaround is required.Mattias Andrée1-6/+1
Thanks to Alexis Megas. Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-14Cleaner workaround for clang bugMattias Andrée1-32/+15
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-14Add reference to clang bug reportMattias Andrée1-0/+1
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-13Multiple changes:Mattias Andrée37-147/+219
1) Compile test with -O0, it takes too long otherwise. 2) Add error codes: ZERROR_0_POW_0, ZERROR_0_DIV_0, ZERROR_DIV_0, ZERROR_NEGATIVE. 3) Add workaround for a bug in clang (src/allocator.c). 4) Cleanups. 5) Minor optimisations. 6) Add inclusion guard for zahl.h. Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-13OptimisationsMattias Andrée34-143/+115
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-13Make zabs, zneg and zswap inlineMattias Andrée3-32/+0
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-1264 bits (severely) outshines 16 bits and 8 bits in performance: do some cleanupMattias Andrée2-20/+0
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-1264-bit chars out-perform 32-bit chars on almost all operations, and on all expensive operationsMattias Andrée4-22/+16
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-07A brief description of exponentiation by squaringMattias Andrée1-0/+6
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-07Fix another typoMattias Andrée1-1/+1
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-06Fix typoMattias Andrée1-1/+1
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-06A description of the Karatsuba algorithmMattias Andrée1-0/+6
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-05Clean upMattias Andrée1-2/+0
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-05Add memory pool, also let the user know that libzahl is not designed for cryptographyMattias Andrée5-16/+90
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-05zinit is now an inline functionMattias Andrée1-10/+0
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-05Improve zsub, only copy to temp when necessaryMattias Andrée2-15/+15
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-05Fix bugs and add a randomised testingMattias Andrée8-48/+63
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-04Clean up, add zerror and zperror, fix bugs and add more testsMattias Andrée23-109/+172
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-04Clean up, fix a few bugs, and add a testMattias Andrée17-47/+62
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-04Add makefile and fix errorsMattias Andrée48-97/+88
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-03Add zptestMattias Andrée2-2/+77
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-03Add zrandMattias Andrée2-1/+97
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-03Cleanup and fix bug in ztruncMattias Andrée23-193/+134
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-03zsets: minor optimisationMattias Andrée1-1/+4
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-03Add zmul and zsqrMattias Andrée2-0/+171
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-03Optimised zdivmodMattias Andrée4-10/+39
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-03Optimise zdivmodMattias Andrée2-12/+9
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-03Add zbsetMattias Andrée2-2/+50
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-03Add zdivmodMattias Andrée2-1/+80
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-03Optimise zpow and zmodpowMattias Andrée2-10/+20
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-03Add new functions: zpowu and zmodpowuMattias Andrée2-0/+77
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-03Add zabs, zadd, zdiv, zmod, zmodmul, zmodpow, zneg, zpow, zsub, and the newly introduced zmodsqrMattias Andrée11-1/+342
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-02Add zlsh and zrshMattias Andrée2-0/+99
Signed-off-by: Mattias Andrée <maandree@kth.se>