Steffen Jaeckel
44ee82cd34
Merge pull request #484 from Prince213/msvc-x86-mp_set_double-fix
...
Add _M_IX86 for testing for MSVC x86
2020-04-30 13:56:56 +02:00
Sizhe Zhao
56dc9df1a6
Add _M_IX86 for testing for MSVC x86
2020-04-26 11:36:28 +08:00
Steffen Jaeckel
aa8b4571fb
Merge pull request #477 from J08nY/fix/makefile-echo
...
Fix clang detection when cross-compiling.
2020-03-10 22:51:15 +01:00
J08nY
f01cc5d266
Fix clang detection when cross-compiling.
...
`echo` needs -e to output newlines, without the switch make complains:
<stdin>:1:17: warning: extra tokens at end of #ifdef directive
<stdin>:1: error: unterminated #ifdef
and does not detect clang properly when cross-compiling.
2020-03-06 09:58:17 +01:00
Steffen Jaeckel
fe382afd82
Merge pull request #478 from MasterDuke17/make_exptmod_with_modulus_1_always_0
...
Give correct values for invmod with modulus of 1
2020-03-05 22:37:59 +01:00
Daniel Green
ea65456607
Give correct values for invmod with modulus of 1
2020-03-05 15:52:28 -05:00
Steffen Jaeckel
ce4e6ae114
Merge pull request #476 from libtom/fix-double-check
...
Build+test bn_mp_set_double.c on more platforms
2020-03-05 14:25:43 +01:00
Steffen Jaeckel
c1cf807382
introduce MP_HAS_SET_DOUBLE
2020-03-05 14:11:13 +01:00
Steffen Jaeckel
c5cb0c6f62
fix compile error on MSVC
2020-03-05 14:08:38 +01:00
Daniel Green
4e90f3185a
Build+test bn_mp_set_double.c on more platforms
...
Not all platforms/environments/architectures that support enough of
IEEE 754 for the purposes of mp_set_double() actually support enough
to legitimately define __STDC_IEC_559__, so only relying on that is
too strict. Fixes https://github.com/libtom/libtommath/issues/159
2020-02-18 00:00:22 +01:00
Steffen Jaeckel
ffd80665d1
Merge pull request #471 from libtom/prevent-overflow
...
Prevent overflow
2020-01-07 18:35:50 +01:00
Daniel Mendler
ca6924b7e6
add error code MP_OVF for integer overflow (too many digits)
2019-12-23 11:12:42 +01:00
Daniel Mendler
876c5fc3f6
disable __func__ in c89 compilers
2019-12-05 14:54:38 +01:00
Daniel Mendler
40177e18e5
test: print __func__
2019-12-05 13:50:14 +01:00
Daniel Mendler
c375b03819
test cleanup; add randomized radix_size test
2019-12-05 13:50:11 +01:00
Daniel Mendler
08d281c462
introduce MP_MAX_DIGIT_COUNT to prevent overflow
2019-12-05 10:52:41 +01:00
Daniel Mendler
3a744dc46d
s_mp_radix_size_overestimate: remove overflow check
2019-12-05 00:40:04 +01:00
Steffen Jaeckel
6ac0b0c1b6
Merge pull request #469 from czurnieden/radix_overestimate_29bits
...
Radix overestimate with 29 bits precision
2019-12-04 22:27:09 +01:00
Daniel Mendler
9d0bdc7efb
run the test always
2019-12-04 22:23:24 +01:00
czurnieden
1e65c0bfe4
Introduction of a fast but slightly over-estimating radix_size
2019-12-04 21:39:02 +01:00
Steffen Jaeckel
795485bf9d
Merge pull request #467 from czurnieden/change_helper_pl
...
Changed generate_def to use the uncommited file list
2019-12-04 11:59:20 +01:00
czurnieden
cecfd1f66c
changed generate_def to use the uncommited, raw file list
2019-11-27 20:55:22 +01:00
Steffen Jaeckel
220a4deb31
Merge pull request #463 from libtom/long_long_fixes
...
Proposal: Remove long long support
2019-11-25 11:18:10 +01:00
Daniel Mendler
cd1bf5e2f0
regen files
2019-11-25 11:14:48 +01:00
Daniel Mendler
b800b7610a
remove *_ll* setters/getters
...
* they are non standard
* they are incompatible with older compilers
* u64/i64 functions should be used instead
* these functions should be deprecated again in 1.x
2019-11-25 11:14:48 +01:00
Daniel Mendler
f0ab662ffc
do not use long long for minimum prec calculation, improve comment
2019-11-25 11:14:48 +01:00
Steffen Jaeckel
a8357d4328
Merge pull request #459 from libtom/less-long-long
...
Don't use long long where not necessary, some platforms lack it
2019-11-25 11:13:53 +01:00
Jan Nijtmans
4cbd7d59f2
Don't use long long where not necessary, some platforms lack it
2019-11-25 11:06:35 +01:00
Steffen Jaeckel
fc5f50768b
Merge pull request #464 from czurnieden/fix_sigma_div_recursive
...
Corrected startvalue for sigma and changed cutoff in mp_div
2019-11-25 11:04:35 +01:00
czurnieden
244c698ecd
corrected startvalue for sigma and cutoff in mp_div
2019-11-24 05:44:29 +01:00
Steffen Jaeckel
6e779e69a8
Merge pull request #462 from czurnieden/repair_div_recursive
...
Repair of sign handling in mp_div_recursive
2019-11-22 11:31:20 +01:00
czurnieden
5f3063fb2a
correction of typo in test.c
2019-11-22 03:14:59 +01:00
czurnieden
642032ddc7
wrong sign in mp_div_recursive
2019-11-22 02:56:48 +01:00
Steffen Jaeckel
86d7d718e3
Merge pull request #457 from libtom/wrong-use-of-ull-for-develop
...
Wrong use of ull for develop
2019-11-14 14:22:06 +01:00
Jan Nijtmans
bb1e56e775
Fix compilation of demo/test.c using C++
2019-11-14 14:18:45 +01:00
Jan Nijtmans
0730a31ab6
Make sure that c89 conversion doesn't produce LL or uLL postfix, since that isn't c89 at all
2019-11-14 14:18:45 +01:00
Jan Nijtmans
6804835181
more spacing around PRIu64, needed for C++ compatibility
2019-11-14 14:18:45 +01:00
Jan Nijtmans
9f2cd04301
more unnecessary type-casts, correct type-case for malloc
2019-11-14 14:18:45 +01:00
Jan Nijtmans
e9d54e9867
remove unnecessary type-casts
2019-11-14 14:18:45 +01:00
Jan Nijtmans
a91eb5a0d9
fix build (hopefully)
2019-11-14 14:18:45 +01:00
Jan Nijtmans
9cfb6c3298
use type-cast in stead of UINT64_C
2019-11-14 14:18:45 +01:00
Jan Nijtmans
02aa95c2b5
Fix wrong use of uLL suffix
2019-11-14 14:18:45 +01:00
Steffen Jaeckel
83b74bac6e
Merge pull request #446 from libtom/suffix-renamings2
...
Alternative 2: Suffix renamings (_n suffix)
2019-11-14 11:08:33 +01:00
Daniel Mendler
41eca3425f
regen
2019-11-14 09:17:00 +01:00
Daniel Mendler
f6a7bedb95
suffix _u32 -> _n of mp_(expt|log|root) functions, use int for now
2019-11-14 09:16:00 +01:00
Steffen Jaeckel
86648a0d23
Merge pull request #456 from libtom/mp-has-comment
...
s_mp_rand_platform: add comment regarding MP_HAS requiring dead code elim
2019-11-13 15:55:01 +01:00
Daniel Mendler
c47d5e87b2
s_mp_rand_platform: add comment regarding MP_HAS requiring dead code elim
2019-11-12 01:16:33 +01:00
Steffen Jaeckel
59d62c9bf6
Merge pull request #454 from libtom/better-use-of-isneg
...
Better use of isneg
2019-11-11 21:53:00 +01:00
nijtmans
1cc289d215
better use of mp_isneg() and mp_iszero()
2019-11-11 21:52:20 +01:00
Steffen Jaeckel
0bc5c3292d
Merge pull request #450 from libtom/sqr-opt
...
make mp_sqr and mp_div_3 internal and add optimizations
2019-11-10 15:30:57 +01:00