|
7e47ae65
|
2019-11-05T20:09:43
|
|
Merge pull request #443 from libtom/rename-maxfast
rename MP_MAXFAST to MP_MAX_COMBA
|
|
93f8e760
|
2019-11-05T18:04:05
|
|
rename MP_MAXFAST to MP_MAX_COMBA
|
|
b4c42576
|
2019-11-05T19:40:30
|
|
Merge pull request #436 from fperrad/20191029_lint
some linting
|
|
40342807
|
2019-11-01T20:08:41
|
|
explicit operator precedence
|
|
146becbd
|
2019-10-31T19:26:55
|
|
literal suffix
|
|
3035e22f
|
2019-11-05T17:55:04
|
|
Merge pull request #434 from libtom/simplifications
Simplifications
|
|
80176de3
|
2019-11-05T17:53:08
|
|
re-enable checks for memcpy&memset
[skip ci]
|
|
410bf493
|
2019-10-29T20:26:50
|
|
apply a series of simplifications
* this is the final commit of a series of simplifications,
containing only the regenerated files and the explanation in the
commit message
* This is in preparation of the size_t change/a potential representation change to use
full width as in tfm, if a (partial?) merge with tfm is desired.
These changes have their own merits however.
* Remove obfuscating tmpx digit pointers (fewer variables, it is more obvious what is
being manipulated)
* Reduce scope of variables where possible
* Stricter error handling/checking (for example handling in karatsuba
was broken)
* In some cases the result was written even in the case of an error
(e.g. s_mp_is_divisible). This will hide bugs, since the user should
check the return value (enforced by MP_WUR). Furthermore if the user
accesses the non-initialized result, valgrind will complain for
example. Global static analysis like coverity will also detect the issue.
Therefore this improves the status quo.
* Introduce generic, private MP_EXCH macro which can be used to swap values.
* Introduce s_mp_copy_digs/s_mp_zero_digs/s_mp_zero_buf
* Some control flow simplifications, e.g, loops instead of goto
* Renamings of variables/labels for consistency
* Renamings of mul/sqr functions for more consistency, e.g., comba
instead of fast suffix
* I didn't read through some very complex functions.
They are so complex, I am too afraid and lazy to touch them.
Maybe someone resposible wants to simplify them if possible. Hint... Hint...
- mp_prime_strong_lucas_selfridge.c
- s_mp_exptmod.c
- s_mp_exptmod_fast.c
|
|
5c335f84
|
2019-10-30T17:26:27
|
|
rename mul/sqr functions for consistency, comba instead of fast suffix
|
|
3b710fbd
|
2019-11-03T11:00:33
|
|
simplify mp_complement
|
|
bcda8fc6
|
2019-10-29T22:38:49
|
|
simplifications: remove unnecessary optimization
* these double checks are not necessary
* the compiler will move the early return outside of the called
function, basically the functions is partially inlined
* however lto/amalgamation needed for the optimization
|
|
8ac49351
|
2019-10-29T20:06:20
|
|
simplifications: mul/sqr comba
|
|
7b6c6965
|
2019-10-29T20:05:30
|
|
simplifications: toom and karatsuba
|
|
795cd201
|
2019-10-29T21:48:50
|
|
simplifications: add s_mp_zero_(digs|buf) and s_mp_copy_digs
Originally I made those as macros. However we have many
other small functions like mp_clamp, mp_exch which are also not implemented
as macros right now.
If we would use c99, I would implement them as private static inline
functions. And mp_exch would be a public static inline function.
But since we are bound to c89, we simply use normal functions.
To achieve optimal performance one should either use link time
optimization or amalgamation.
|
|
b1f9bff1
|
2019-10-29T20:21:22
|
|
simplifications: invmod
|
|
56144eed
|
2019-10-29T20:08:42
|
|
simplifications: reduce functions
|
|
448f35e2
|
2019-10-29T20:07:29
|
|
simplifications: prime functions
|
|
143e0376
|
2019-10-29T20:02:32
|
|
simplifications: basic arithmetic functions
|
|
e60149de
|
2019-10-29T20:26:25
|
|
simplifications: replace mp_mod_d by macro
|
|
2d3262af
|
2019-11-04T14:06:19
|
|
Merge pull request #442 from libtom/bug-min-prec
MP_MIN_PREC too small, test with MP_PREC=MP_MIN_PREC
|
|
2bbdbd06
|
2019-11-03T16:55:35
|
|
MP_MIN_PREC>=3 is needed for s_mp_div_school
test with MP_PREC=MP_MIN_PREC
|
|
820f4bb0
|
2019-10-29T21:27:01
|
|
Merge pull request #435 from libtom/simple-simplifications
first batch of simplifications
|
|
3cdcec43
|
2019-10-29T18:41:25
|
|
first batch of simplifications
|
|
b9977adf
|
2019-10-29T08:44:51
|
|
use uint8_t instead of unsigned char
|
|
98753c67
|
2019-10-29T17:20:40
|
|
Merge pull request #432 from libtom/no-deprecated-pragma
introduce MP_NO_DEPRECATED_PRAGMA
|
|
af376edc
|
2019-10-29T16:37:56
|
|
no more MP_WUR in timing.c
|
|
8456782c
|
2019-10-29T15:40:47
|
|
don't allow disabling of WUR checks
|
|
57fbf5a8
|
2019-10-29T13:14:31
|
|
also build support/ branches in CI
(cherry picked from commit 783ffb82dd5ddddce3d3bbd88661bcda44162458)
|
|
e95dd24e
|
2019-10-27T21:34:23
|
|
introduce MP_NO_DEPRECATED_PRAGMA
|
|
57ccd9f0
|
2019-10-29T15:38:31
|
|
Merge pull request #431 from libtom/rework-tests
clean-up test.c
|
|
4500d066
|
2019-10-29T14:41:33
|
|
also no MP_WUR in mtest_opponent()
|
|
b250ec44
|
2019-10-29T13:24:34
|
|
clean-up test.c
* no more `MP_WUR` in test.c
* clean-up console output
|
|
8bf82f94
|
2019-10-29T08:44:03
|
|
Merge pull request #425 from libtom/replace-gen-by-cat
replace gen.pl by cat, rename mpi.c to mp_all.c
|
|
d800071e
|
2019-10-28T16:36:40
|
|
ignore&clean tommath_amalgam.c [skip ci]
|
|
a598e61b
|
2019-10-28T15:42:23
|
|
rename to tommath_amalgam.c
|
|
02f4ee11
|
2019-10-28T15:23:34
|
|
compare logs before and after single-object profiling
|
|
04ee1e75
|
2019-10-28T15:07:58
|
|
improve demo/timing a bit
* less verbose output on console
* allow changing name for logs
* pre-heat caches before starting the timing
|
|
8e3a4404
|
2019-10-28T13:41:30
|
|
use pre_gen/mp_all.c for profiled_single
+ clean-up defines
|
|
43804ed7
|
2019-10-28T13:39:08
|
|
remove logs and generated PNG's
this fixes #423
|
|
1ece193a
|
2019-10-27T22:48:53
|
|
replace gen.pl by cat, rename mpi.c to mp_all.c
|
|
da8b9787
|
2019-10-28T15:29:30
|
|
Merge pull request #426 from libtom/rework-read-radix
mp_read_radix and mp_fread should behave the same
|
|
a5d5b101
|
2019-10-27T23:51:38
|
|
mp_read_radix and mp_fread should behave the same
|
|
50abc11a
|
2019-10-27T22:10:25
|
|
Merge pull request #422 from libtom/remove-ltm-rng
remove ltm_rng (deprecated function)
|
|
85699be1
|
2019-10-27T21:58:43
|
|
remove ltm_rng (deprecated function)
|
|
bde40c44
|
2019-10-27T22:06:11
|
|
Merge pull request #421 from libtom/doc-fix
manual: don't mention obsolete MP_DIV_SMALL
|
|
2122b511
|
2019-10-27T19:48:13
|
|
manual: don't mention obsolete MP_DIV_SMALL
|
|
baabf563
|
2019-10-27T21:22:53
|
|
Merge pull request #405 from libtom/add-sub-opt
stdbool/stdint refactoring, various optimizations/simplifications
|
|
e2f8df33
|
2019-10-27T21:19:37
|
|
fix doc [skip ci]
+ ignore bak files generated by latexindent
+ silence latexindent
|
|
7afecabd
|
2019-10-24T17:33:38
|
|
regen files
|
|
f662e1f7
|
2019-10-27T19:02:49
|
|
fix c89 issues
|
|
43769139
|
2019-10-27T18:41:05
|
|
remove inttypes.h includes in c89 mode
|
|
d27dff92
|
2019-10-27T18:39:14
|
|
update manual: replace mp_bool/MP_YES/MP_NO references by bool/true/false
|
|
8ecf7eae
|
2019-10-27T09:19:32
|
|
better comment in tommath_c89.h
|
|
17d59c2c
|
2019-10-27T09:06:05
|
|
replace PRIx64 by MP_PRIx64 for c89 mode
|
|
cf004265
|
2019-10-27T08:54:09
|
|
define mp_isodd in terms of mp_iseven
|
|
17a846f2
|
2019-10-26T19:33:36
|
|
add "make c99" to convert back
|
|
9f01ba14
|
2019-10-26T18:48:41
|
|
add "testme.sh --c89" and "make c89"
* replace int*_t and bool by custom typedefs
* the result is tested in CI
|
|
bf9507a9
|
2019-10-24T22:02:29
|
|
replace mp_bool by stdbool
* This gives the advantage that static analysis **understands** bool,
but complains about using an enum type instead of bool.
* If stdbool.h is not desired, true/false/bool can be replaced using sed
as in the no-stdint-h branch.
* We already include stdint.h and stdbool.h is not more harmful than
this header
|
|
c91c1ba2
|
2019-10-24T21:32:31
|
|
rework mp_add_d and mp_sub_d
|
|
58fb93fd
|
2019-10-24T18:14:18
|
|
cleanup prime rand function
|
|
eb70378b
|
2019-10-23T20:06:33
|
|
mp_iseven/mp_isodd should be inline
|
|
27e142bc
|
2019-10-24T17:52:03
|
|
remove unnecessary == MP_YES/MP_NO comparisons
|
|
a44e68e6
|
2019-10-24T17:43:31
|
|
remove MP_IS_* macros
|
|
f8b2f5d6
|
2019-10-23T20:07:33
|
|
s_mp_reverse is only used by mp_to_radix
|
|
f21ea6ce
|
2019-10-23T20:06:08
|
|
add fast path to mp_add_d and mp_sub_d
|
|
68c15948
|
2019-10-27T16:32:10
|
|
Merge pull request #410 from czurnieden/update_manual
Cleanup and update of manual
|
|
8862ca83
|
2019-10-27T16:29:30
|
|
fix index
added new API functions found by `helper.pl -d`
removed old API functions found via
```sh
awk -F',' '/item/ {print $1}' doc/bn.ind | \
awk '/mp/ {print $2}' | \
sed -e 's/\\//g' | \
xargs -I {} sh -c "grep -q {} tommath.h || echo {}"
```
|
|
9d954dc8
|
2019-10-27T16:19:02
|
|
also check doc when running `helper.pl -a`
|
|
59ee1416
|
2019-10-27T15:48:38
|
|
fix `./helper.pl -d`
|
|
2efbdd54
|
2019-10-25T02:44:42
|
|
more clean-ups and addition of a latexinden.pl configuration file
|
|
3947ffda
|
2019-10-25T00:41:09
|
|
backup
|
|
8b31c193
|
2019-10-24T18:24:28
|
|
Cleanup and update of manual
|
|
19424313
|
2019-10-27T14:51:05
|
|
Merge pull request #402 from fperrad/20191023_lint
some linting
|
|
814d0387
|
2019-10-22T17:54:33
|
|
literal suffix
|
|
f2efe746
|
2019-10-22T17:53:27
|
|
more cast
|
|
14dbad6d
|
2019-10-27T13:16:14
|
|
Merge pull request #414 from libtom/fix-comments-fast
Fix some comments
|
|
b26bd508
|
2019-10-26T00:31:11
|
|
Fix some comments
|
|
5a0c39f5
|
2019-10-27T13:15:16
|
|
Merge pull request #412 from libtom/fix-win32-includes
fix win32 includes, remove support for everything older than Windows XP
|
|
a8ca1c3c
|
2019-10-25T13:02:45
|
|
fix win32 includes, remove support for everything older than Windows XP
|
|
a4789908
|
2019-10-27T13:14:13
|
|
Merge pull request #413 from libtom/ignore-eclipse-settings
Ignore Eclipse .settings directory
|
|
867f08b0
|
2019-10-26T00:05:41
|
|
Ignore Eclipse .settings directory
|
|
8e21616a
|
2019-10-27T13:12:28
|
|
Merge pull request #411 from fperrad/20191024_lint
some linting
|
|
c4622f53
|
2019-10-24T21:44:55
|
|
only include tommath_private.h
|
|
17afe155
|
2019-10-24T18:16:05
|
|
needs mp_word
|
|
90516948
|
2019-10-24T18:11:36
|
|
literal suffix
|
|
d0e26bb3
|
2019-10-24T18:26:25
|
|
explicit operator precedence
|
|
2bd76ac1
|
2019-10-24T10:13:41
|
|
Merge pull request #408 from libtom/comment-fix-in-helper
Fix comment in helper.pl
|
|
448d0080
|
2019-10-23T23:25:37
|
|
Fix commit in helper.pl
|
|
a69babcf
|
2019-10-24T08:44:59
|
|
Merge pull request #403 from libtom/log2
move out s_mp_log_pow2, fix limitation of base
|
|
87b4e517
|
2019-10-23T09:06:04
|
|
move out s_mp_log_pow2, fix limitation of base
|
|
e1994d99
|
2019-10-23T18:23:51
|
|
Merge pull request #400 from libtom/rename-cutoffs
add prefix to cutoff variables
|
|
14642642
|
2019-10-22T18:01:08
|
|
add prefix to cutoff variables
|
|
121973fc
|
2019-10-23T18:20:22
|
|
Merge pull request #399 from libtom/private-mp-word
remove private_mp_word
|
|
00b263f3
|
2019-10-22T17:52:26
|
|
remove private_mp_word
|
|
4bab432c
|
2019-10-23T18:18:02
|
|
Merge pull request #397 from libtom/bbs-style
mp_prime_next_prime: use mp_bool for bbs_style
|
|
3180c66c
|
2019-10-23T18:17:20
|
|
also use MP_YES/NO in tests
|
|
31e64aa6
|
2019-10-22T15:04:36
|
|
mp_prime_next_prime: use mp_bool for bbs_style
|
|
1f210d29
|
2019-10-23T18:13:49
|
|
Merge pull request #370 from czurnieden/recursive_division
Addition of fast division (recursive divrem only)
|
|
9edd185f
|
2019-10-04T17:41:09
|
|
Addition of fast division (recursive divrem only)
|
|
6378a90a
|
2019-10-22T15:08:28
|
|
Merge pull request #396 from libtom/radix-size-t
use size_t for mp_radix_size
|