Tinko Bartels
63f14838a0
Fix a broken link to the Microsoft KB.
2019-04-23 21:29:53 +02:00
Andrey Semashev
33c165552c
Fixed incorrect loop termination in lcm_range.
...
lcm_range used to incorrectly terminate on value of 1. Instead, it should
terminate on 0 since any further elements of the range no longer affect
the result of the function.
Also, added tests for the gcd_range and lcm_range functions verifying
that they terminate their loops at the correct points.
2019-03-26 01:55:18 +03:00
Nick
289939a640
Merge branch 'develop' into remove_optional
2018-12-04 10:57:02 -07:00
Nick Thompson
51b259da19
Return integer with zero signaling common factor rather than boost::optional<Z>.
2018-12-04 10:55:03 -07:00
Andrey Semashev
4bc1a5eb75
Extracted DISABLE_MP_TESTS macro definition to a common header.
2018-11-05 22:56:03 +03:00
Andrey Semashev
682d4ac66b
Fixed tests not compiling on MSVC 8, added missing includes.
2018-11-04 01:00:57 +03:00
Andrey Semashev
2f634ca78b
Added missing includes, remove C++11 requirement, other code cleanup.
...
Also, use Boost.Swap instead of the direct unqualified call to std::swap
and boost::enable_if_c instead of std::enable_if.
2018-11-03 23:10:44 +03:00
Nick Thompson
3599683975
#include <boost/config.hpp>
2018-11-01 12:11:09 -06:00
Nick Thompson
b3680b77fd
Disable tests for gcc < version 5
2018-11-01 12:02:18 -06:00
Nick Thompson
a7da90a79e
Make changes suggested by reviewer.
2018-10-29 13:10:02 -06:00
Nick Thompson
df7adb52ca
Use std::enable_if to enable SFINAE rather than static_assert
2018-10-29 11:58:18 -06:00
Nick Thompson
6c58aa9a48
Merge remote-tracking branch 'upstream/develop' into develop
2018-10-29 08:53:12 -06:00
Nick Thompson
cd60c4c9f9
[CI SKIP] Disable multiprecision in certain compilers.
2018-10-29 08:52:20 -06:00
Andrey Semashev
7c5def9d39
Disable Boost.Multiprecision tests for gcc 4.7 in C++11 mode.
...
The compiler fails in Boost.TypeTraits which is used in Boost.Multiprecision.
2018-10-29 12:25:55 +03:00
Andrey Semashev
835ac98a23
Fail libgmpxx detection on Linux if libstdc++ is not used as the std library.
...
libgmpxx was built against libstdc++, so if the application uses e.g. libc++,
linking fails because of the standard symbols mismatch.
2018-10-29 12:07:06 +03:00
Nick Thompson
f76d776698
Define main when gcc version is < 5.
2018-10-28 23:28:28 -06:00
Nick Thompson
c4c3373708
Don't run tests on gcc 4 and earlier; not worth the pain.
2018-10-28 22:40:36 -06:00
Nick Thompson
bbb1da275b
Merge master; fix Jamfile
2018-10-28 21:14:31 -06:00
Nick Thompson
de0d24733b
Remove dependency on boost/typeindex in tests.
2018-10-26 19:23:11 -06:00
Nick Thompson
0c6ec8088d
Just use asserts, omg.
2018-10-26 18:42:39 -06:00
Nick Thompson
cdefe039ee
I'm flailing with this one.
2018-10-26 17:51:31 -06:00
Nick Thompson
f6525ae186
(Hopefully) green up build by giving path to Boost.Test.
2018-10-26 17:11:28 -06:00
Nick Thompson
e0646cb7ec
Add template argument to green up build. Remove discrete log as we do not have an overflow-resistant mul_mod in boost.
2018-10-26 16:58:30 -06:00
Nick Thompson
2d463f3ee7
a*p % m may overflow, do not perform naive multiplication in unit tests or undefined behavior may result. [CI SKIP]
2018-10-26 11:19:43 -06:00
Nick Thompson
87e5b365d8
Return custom struct from extended Euclidean algorithm rather than tuple. Reduce number of operations for tests to reduce CI system workload. Disable discrete log tests until we have time to figure out why they are failing.
2018-10-25 09:38:16 -06:00
Nick Thompson
ada03a59d7
Remove dependency on boost.format, remove unfettered use of auto in order to move towards C++03 compatibility, use BOOST_THROW_EXCEPTION.
2018-10-24 14:29:22 -06:00
Nick Thompson
faa61cd911
[ci skip] It is *not* the case that a discrete log exists when the base and modulus are coprime. Take 4^x = 2 mod 5 as a counterexample. Change API accordingly.
2018-02-10 17:51:59 -06:00
Nick Thompson
b3966428c4
[ci skip] Add test of short int to see if there's any obvious places for overflow (none are obvious, but no guarantees they still aren't there). Print basic information about the test to console so that failures are easier to track down.
2018-02-10 13:56:11 -06:00
Nick Thompson
8c415f77b1
[ci skip] Use less verbose naming. Add asserts as verfication of algorithms is a negligible fraction of total runtime. Use boost::multiprecision::powm and boost::multiprecision::sqrt rather than one-offs.
2018-02-09 17:19:26 -06:00
Nick Thompson
fc4d657201
[ci skip] Modular exponentiation, modular multiplicative inverse, extended Euclidean algorithm, discrete logarithm.
2018-01-28 14:47:14 -06:00
jzmaddock
10026d9b6f
Disable some tests on older compilers that we know won't pass.
2017-06-09 19:47:18 +01:00
John Maddock
0c956331a0
Fix gmp test failures
2017-05-09 19:52:20 +01:00
jzmaddock
943d63e309
Fix use of check-target-builds in Jamfile.
2017-05-09 18:03:03 +01:00
jzmaddock
7ccb820893
Test mpz_class when available.
...
And fix errors compiling with that type.
2017-05-07 13:15:15 +01:00
jzmaddock
9c75396c05
Fix more explicit instantiations in test cases.
2017-04-26 19:11:18 +01:00
jzmaddock
395735a193
Add tests for multiprecision types and fix test program to still compile.
2017-04-26 18:24:09 +01:00
jzmaddock
beb6871864
Switch over to using new Boost.Math version of gcd/lcm.
...
Please refer to the Boost.Math revision log for details of changes, but in summary:
* New version of gcd/lcm internals by Jeremy Murphy include mixed-binary algorithm and better selection logic.
* Support is now included for gcd's of polynomials.
* Full C++14 constexpr support.
2017-04-23 13:01:09 +01:00
jzmaddock
f650385f65
Disable test case that causes msvc internal error.
2017-03-30 18:50:57 +01:00
jzmaddock
39d9701857
Enable one more noexcept test
2017-03-28 19:30:48 +01:00
jzmaddock
13b36d8432
Add tests for C++14 support.
2017-03-28 19:06:13 +01:00
Vicente J. Botet Escriba
1ff7278d5f
Added compile fail test for uint_t<65>. related to #6169 .
2015-01-25 17:26:09 +01:00
jzmaddock
83feb20e51
Missing #include
...
Test case uses mpl:: types without including the needed header - exposed by ongoing type traits rewrite.
2015-01-23 19:05:59 +00:00
Peter Dimov
8dae82faeb
Replace math with integer, untabify.
2015-01-13 20:53:02 +02:00
Peter Dimov
1a72919419
Add common_factor_test to test/Jamfile, switch to lightweight_test.
2015-01-13 20:33:50 +02:00
Marshall Clow
9f43b6a7d6
Removed missed usage of deprecated macros in Boost.Math
...
[SVN r81586]
2015-01-13 19:41:32 +02:00
John Maddock
fecb6b5509
Fix numeric_limits specialization.
...
[SVN r79419]
2015-01-13 19:41:32 +02:00
Gennadiy Rozental
eea434b0f1
eliminated test_case_template.hpp
...
[SVN r74735]
2015-01-13 19:41:31 +02:00
Daniel James
bdafb07012
Replace a couple of non-ascii symbols.
...
[SVN r46943]
2015-01-13 19:41:28 +02:00
John Maddock
fe60fee95b
Fix more inspect report issues, and regenerated the docs.
...
[SVN r46839]
2015-01-13 19:41:28 +02:00
John Maddock
e20431e713
Changed long long to boost::long_long_type and unsigned long long to boost::ulong_long_type. A couple of other typo corrections, to get the code compiling with g++ -pedantic.
...
[SVN r44877]
2015-01-13 19:41:27 +02:00