jzmaddock
f6ae652756
Change obj to lib rule.
2016-04-04 13:05:13 +01:00
jzmaddock
c4e847b9fd
Fix handling of NaN's and Infinities in basic arithmetic.
...
Added more test cases to catch bugs.
See issue: https://svn.boost.org/trac/boost/ticket/12090 .
2016-03-24 10:13:01 +00:00
jzmaddock
d3c6beb721
Add exhaustive rounding test program for cpp_bin_float.
...
Note not run by default as it takes half a day to run.
See: https://svn.boost.org/trac/boost/ticket/12039 .
2016-03-22 08:16:30 +00:00
jzmaddock
eec1c310d5
Add support for denormals to float128.
...
Fixes https://svn.boost.org/trac/boost/ticket/12075
2016-03-20 09:28:51 +00:00
jzmaddock
63c1e26c97
Another no-eh fix.
2016-03-17 13:29:13 +00:00
jzmaddock
0baca0eb80
Another exception handling fix.
2016-03-17 13:26:39 +00:00
jzmaddock
57333128e8
Allow code and tests to compile without exceptions.
...
See https://svn.boost.org/trac/boost/ticket/12070 .
2016-03-17 11:50:06 +00:00
jzmaddock
a96bea66e1
Change cpp_bin_float::convert_to to round correctly to float.
...
Also add another test case from https://svn.boost.org/trac/boost/ticket/12039 ,
plus test case to check rounding of ties.
2016-03-15 18:24:04 +00:00
jzmaddock
8a8b2211d4
Change cpp_bin_float.convert_to<>() conversion routine to avoid double-rounding.
...
See https://svn.boost.org/trac/boost/ticket/12039 .
2016-03-15 08:15:35 +00:00
jzmaddock
d9bd529f71
Fix boost::rational comparison operators.
...
Add more tests for the above.
2016-03-12 08:54:59 +00:00
jzmaddock
df07c990af
Change declaration order to keep Oracle C++ happy.
2016-03-11 18:30:36 +00:00
jzmaddock
6a15426f2b
Basic fix for Oracle C++ in C++11 mode.
2016-03-11 12:21:52 +00:00
jzmaddock
0778773691
Merge branch 'develop' of https://github.com/boostorg/multiprecision into develop
2016-03-08 18:33:31 +00:00
John Maddock
a55e2c15a1
Misc minor workarounds for Oracle C++
2016-03-08 18:00:12 +00:00
jzmaddock
25cb064a14
Add some brackets around static assertion macros.
2016-03-05 17:59:55 +00:00
jzmaddock
f37a1b4e3d
Remove peek() before archive construction...
...
It fails with vc12 and earlier.
2016-03-05 17:59:29 +00:00
jzmaddock
53515e9a96
Add memcpy optimized import of binary data for cpp_int.
...
Fixes: https://svn.boost.org/trac/boost/ticket/9235 .
2016-02-25 19:01:11 +00:00
jzmaddock
cb1a41835f
Use memmove for bitshifts when machine is little endian.
...
See https://svn.boost.org/trac/boost/ticket/9233 .
2016-02-24 12:06:05 +00:00
jzmaddock
2f635b45ff
Fix right shifting of negative integers.
...
See https://svn.boost.org/trac/boost/ticket/11999 .
2016-02-19 19:29:40 +00:00
jzmaddock
f57bd6b31a
Add expression template enabled min/max overloads.
2016-02-18 18:37:18 +00:00
jzmaddock
df773c7ab2
Disable explicit conversions on expression templates when the target type is implicitly constructible from the number type.
...
See https://svn.boost.org/trac/boost/ticket/11922
2016-01-20 12:52:20 +00:00
jzmaddock
59395e2754
Fix integer stream input so it doesn't skip characters.
...
See https://svn.boost.org/trac/boost/ticket/11857
Update tests to match.
2015-12-22 18:28:23 +00:00
jzmaddock
5af4564698
Restrict noexcept on converting constructors.
...
See https://svn.boost.org/trac/boost/ticket/11826 .
2015-12-01 15:58:26 +00:00
jzmaddock
7dfea115f8
Fix cpp_bin_float conversions,
...
fix inverse trig logic to get as many digits as possible from std::asin.
Add test case.
Fixes: https://svn.boost.org/trac/boost/ticket/11764
2015-10-29 09:58:28 +00:00
jzmaddock
a1eafc4228
Fix division bug discovered by https://svn.boost.org/trac/boost/ticket/11648
2015-09-22 13:39:26 +01:00
jzmaddock
100afbcce8
Suppress some msvc warnings.
2015-09-20 12:00:09 +01:00
jzmaddock
d78767ef95
Add cpp_int import/export code.
...
See: https://svn.boost.org/trac/boost/ticket/11590 .
2015-09-20 08:45:03 +01:00
jzmaddock
fdbeedc609
Fix behaviour of fmod for negative divisor.
...
And add more tests, see https://svn.boost.org/trac/boost/ticket/11641 .
2015-09-11 17:13:34 +01:00
Marshall Clow
5621a90e45
Remove use of deprecated macros; use replacements
2015-09-10 15:43:35 -07:00
jzmaddock
7e457161e6
Fix digits10 to use +3 not +2 which doesn't always add enough.
2015-07-19 17:47:38 +01:00
jzmaddock
42c6ad2c8f
Fix test failures for special functions.
2015-06-04 13:17:29 +01:00
jzmaddock
1e1f5455fc
Split test up again - still too big!
2015-06-04 09:06:14 +01:00
jzmaddock
ea8586a9cf
Fix signed exclusive-bitwise-or to handle carry correctly.
...
See https://svn.boost.org/trac/boost/ticket/11364 .
2015-06-02 09:14:16 +01:00
jzmaddock
d5fd0312a4
Split some tests up.
2015-06-01 19:07:28 +01:00
jzmaddock
18023514cf
Add missing test case.
2015-06-01 19:07:02 +01:00
jzmaddock
d711ce23df
Fix mixed mode comparison operators.
...
See https://svn.boost.org/trac/boost/ticket/11328 .
And added tests for mixed mode comparisons and other operators.
2015-06-01 18:11:11 +01:00
jzmaddock
7bf2e838cc
Fix MSVC analyzer warnings.
2015-05-31 09:18:23 +01:00
jzmaddock
b7e1992b26
Fix right shifting of negative values in cpp_int.
...
To give the same values as 2's complement representations,
though not the same bit-pattern.
Updated tests.
Fixed assignment from float to not rely on shifting negative values.
2015-05-30 11:39:39 +01:00
jzmaddock
9262fa4884
Stop using run in configure rules:
...
It breaks testing for some strange reason.
2015-05-18 11:59:25 +01:00
jzmaddock
c36e15bd29
Fix self assignment bug in mpfr_float
...
Fixes: https://svn.boost.org/trac/boost/ticket/11193
2015-04-17 08:30:45 +01:00
jzmaddock
4f16c26457
Fix NaN comparisons.
...
Add tests to verify comparisons of NaN's are unordered.
Fix operators to check for unordered comparisons.
Fixes: https://svn.boost.org/trac/boost/ticket/11159
2015-04-03 09:35:58 +01:00
jzmaddock
f4a61d5f47
Add explicit conversion operators and tests to expression templates.
2015-03-12 17:55:13 +00:00
jzmaddock
0cfe21cf1c
Fix some more noexcept failures, and tighten up the tests.
2015-02-10 16:51:36 +00:00
jzmaddock
6df6b1c441
Fix tests for case where double_limb_type = __int128.
2015-02-09 17:58:44 +00:00
jzmaddock
9927d49cb9
Many more fixes and tests for noexcept issues, see https://svn.boost.org/trac/boost/ticket/10990
2015-02-08 18:16:31 +00:00
jzmaddock
33630bc407
Clean up and enhance noexcept support, add tests to validate cpp_int and cpp_rational are performing as expected. See https://svn.boost.org/trac/boost/ticket/10990
2015-02-07 17:54:09 +00:00
jzmaddock
63f53c48f3
Merge branch 'develop' of https://github.com/boostorg/multiprecision into develop
2014-10-09 16:13:21 +01:00
jzmaddock
761c7c8c38
Fix some C++03 mode failures.
2014-10-09 16:12:56 +01:00
jzmaddock
bae613e6aa
Abort test if there are too many errors
2014-09-23 17:01:14 +01:00
jzmaddock
cd1e62a4b0
Fix for issue https://svn.boost.org/trac/boost/ticket/10405
...
Change code snippets in docs to be complete programs to avoid any confusion.
Fix failure caused by change to Boost.Random.
Regenerate docs.
2014-08-29 18:54:09 +01:00
jzmaddock
2b86d278e9
Reduce program output.
2014-07-03 10:41:12 +01:00
jzmaddock
c2c2fd6d79
Enable correct rounding for mpq_rational -> floating point conversions.
2014-06-29 13:30:15 +01:00
jzmaddock
f779941205
Fix warnings and compiler errors, plus rounding error in generic_interconvert.hpp.
...
Add comments about rounding to gmp.hpp.
Update tests to check mpq_rational.
2014-06-29 10:36:19 +01:00
jzmaddock
6ae735d8d5
Commit test file and improve tests some more. Fix some bugs too!
2014-06-28 17:09:50 +01:00
jzmaddock
66fe81cdbc
Update and enhance tests.
2014-06-28 16:27:50 +01:00
jzmaddock
45e242d17d
Implement exact base-10 floating point to rational conversion.
2014-06-17 18:20:59 +01:00
jzmaddock
9f9394940a
Add scalbn, ilogb, logb and tests and docs.
2014-06-17 08:53:54 +01:00
jzmaddock
4b25b2a6c4
Limit max digits to print so stupid libc++ can actually parse the input.
2014-04-11 09:34:10 +01:00
jzmaddock
e7704434d5
Fix PP-logic on test case.
...
Don't explicitly request gnu++0x mode - it causes conflicts with testers running in c++1y mode.
2014-04-10 18:01:29 +01:00
jzmaddock
e0680a745b
Tentative fixes for VC9 failures, plus improve error reporting of failed lexical_casts in test_arithmetic.hpp.
2014-03-27 13:36:23 +00:00
jzmaddock
373fa10e18
Workarounds for VC-12 errors.
2014-03-25 13:10:00 +00:00
jzmaddock
3317ee0d4a
More fixes for compiling with -ftrapv under gcc
2014-03-09 10:04:38 +00:00
jzmaddock
bdacea2934
Partial fix for https://svn.boost.org/trac/boost/ticket/9740 to allow code to be used with -ftrapv in gcc.
2014-03-08 10:57:01 +00:00
jzmaddock
9bf3b419c1
Minor fixes for Intel C++ on Win32.
2014-02-21 17:29:05 +00:00
jzmaddock
9d59d0a56c
Remove reference to class that doesn't exist!!
2014-02-09 11:38:09 +00:00
jzmaddock
b3b9164bb9
Adjust big_lanczos now we have Sterling's approx in Boost.Math for large digit counts.
...
Add extra high-precision test for gamma functions.
2014-01-30 09:35:14 +00:00
jzmaddock
5302b484a4
Add serialization support to cpp_bin_float and document.
2013-12-22 13:35:56 +00:00
jzmaddock
787cd1101e
Update tests to exercise move-construct/copy better.
...
Fix exposed bug in tommath backend.
See also https://svn.boost.org/trac/boost/ticket/9497 .
2013-12-22 09:57:01 +00:00
jzmaddock
8fc8406008
Fix cpp_bin_float gcc compile.
...
Fix tests to work as intended.
2013-12-04 17:14:38 +00:00
John Maddock
59d2c0d383
Fix up error rates for cpp_bin_float: these are higher mostly down to less accurate sine and cosine than the competition :-(
...
[SVN r86786]
2013-11-22 17:13:35 +00:00
John Maddock
10ed707a68
Initial merge of cpp_bin_float code from sandbox.
...
[SVN r86781]
2013-11-21 19:05:42 +00:00
John Maddock
0a3a504f92
Merge multiprecision changes from Trunk.
...
[SVN r85681]
2013-09-15 18:04:02 +00:00
John Maddock
635d9aee34
Fix pp-logic.
...
[SVN r85662]
2013-09-13 16:45:52 +00:00
John Maddock
549eed8c92
TRy and improve error reporting.
...
[SVN r85650]
2013-09-11 18:14:32 +00:00
John Maddock
10e6f7227d
Fix path used to load test data.
...
[SVN r85642]
2013-09-10 17:40:30 +00:00
John Maddock
1e268d62ef
Improve error handling in serialization tests.
...
[SVN r85619]
2013-09-09 11:52:30 +00:00
John Maddock
07c1027919
Update for Intel 13.1
...
[SVN r85253]
2013-08-09 12:27:11 +00:00
John Maddock
c5e7d59a73
Add serialization support to float128 and adaptor backends.
...
Use __float128 via typedefs so recent Intel compilers don't complain.
[SVN r85241]
2013-08-08 17:43:54 +00:00
John Maddock
6ab42a5611
Fix binary archive serialization.
...
Add rational serialization.
[SVN r85231]
2013-08-07 08:15:51 +00:00
John Maddock
07369c61a2
Improve serialization tests.
...
[SVN r85219]
2013-08-06 08:08:13 +00:00
John Maddock
7aa0322d97
Fix gcc serialization code, and improve binary serialization.
...
[SVN r85214]
2013-08-05 15:03:07 +00:00
John Maddock
904b93f22c
Add tentative serialization support.
...
[SVN r85212]
2013-08-05 11:52:07 +00:00
John Maddock
af494a898b
Add support for integer square roots.
...
[SVN r85184]
2013-08-01 17:50:17 +00:00
John Maddock
84b9f86789
Fix gcc-4.8.x warning.
...
[SVN r85132]
2013-07-23 14:43:17 +00:00
John Maddock
9b7bf3303e
Fix mpfi pow function to correctly handle negative base with integer power.
...
Fixed error handling to not return numeric_limits<>::quiet_NaN if there is no NaN supported.
Fixed default pow implementation to handle integer args up to numeric_limits<uintmax_t>::max().
Fixed error handling in default pow implementation to return NaN for too large exponents (can't tell if they're integers or even or odd) and negative bases.
Fixed array subscript bug in cpp_dec_float.
Greatly increased pow testing.
Fixes #8809 .
[SVN r85008]
2013-07-12 16:13:34 +00:00
John Maddock
714b02ccfe
Fix bug in eval_pow that causes 0^N to be none-zero.
...
Fixes #8798 .
[SVN r84997]
2013-07-10 16:08:12 +00:00
John Maddock
87fb76c1be
Reorganise bit scanning code.
...
Add tests for msb function.
[SVN r84972]
2013-07-07 15:29:01 +00:00
John Maddock
f2821a0231
Fix left shift operator.
...
Fixes #8741 .
[SVN r84925]
2013-07-01 17:06:12 +00:00
John Maddock
73210bb222
Apply remaining fixes from #8732 .
...
Also adds msb (most significant bit) function to multiprecision.
Fixes #8732 .
[SVN r84921]
2013-07-01 15:43:28 +00:00
John Maddock
2a5a4b60f8
Add some typecasts to ensure conversion from negative values proceeds correctly.
...
Fix masking of values during construction so overflow wraps around in unchecked fixed precision integers.
Add tests for above changes.
Refs #8711 .
[SVN r84897]
2013-06-24 10:36:01 +00:00
John Maddock
61796abed2
Merge fixes for from Trunk.
...
Fixes #8692 .
Fixes #8670 .
Fixes #8667 .
[SVN r84799]
2013-06-15 17:38:45 +00:00
John Maddock
cdd63adfcd
Fix assignment operations to be safe after a move.
...
Added test cases to catch bug case.
Refs #8667 .
[SVN r84687]
2013-06-08 14:07:21 +00:00
John Maddock
dd420d8d3b
Add tentative support for user-defined-literals.
...
[SVN r84106]
2013-05-02 10:16:57 +00:00
John Maddock
a461ca170a
Add lot's of enable_if's to integer only operators to restrict them to integer types (improves error messages).
...
Update test coverage Makesfile.
Update tests for full coverage.
[SVN r84051]
2013-04-26 08:17:12 +00:00
John Maddock
5126fa8e74
Fix float128 compile error.
...
Add constexpr support to float128.
Add float128 docs and rebuild HTML.
[SVN r84016]
2013-04-22 17:50:55 +00:00
John Maddock
727b4c4643
Fixes to get the float128 tests passing with Intel C++ 13.0.
...
[SVN r83874]
2013-04-13 16:53:01 +00:00
John Maddock
74e46a3306
Initial Intel C++ _Quad support in float128.
...
[SVN r83856]
2013-04-12 09:01:20 +00:00
John Maddock
ba0232fb1e
Fix float128 string formatting.
...
[SVN r83831]
2013-04-10 16:30:13 +00:00
John Maddock
eb267293d7
Refactored build process to improve compile times.
...
Fixed expression-template incompatibility in spherical_harmonic.hpp.
Fixed expression template issues in log1p_expm1_test.hpp and test_cbrt.hpp.
[SVN r83775]
2013-04-06 08:54:04 +00:00
John Maddock
04b1c9e9f0
Initial commit of 128-bit float wrapper
...
[SVN r83713]
2013-04-02 17:26:48 +00:00
John Maddock
ff1c93b043
Fix bug(s) that cause variable reuse in function calls to fail.
...
Add additional test cases.
Fixes #8326 .
[SVN r83619]
2013-03-28 11:27:08 +00:00
John Maddock
b1a27b8c5c
Fix valgrind errors
...
[SVN r83519]
2013-03-22 16:55:36 +00:00
John Maddock
3aeea98da5
Suppress some msvc warnings.
...
[SVN r83441]
2013-03-15 18:07:05 +00:00
John Maddock
6582c85fd8
Improve uBas integration to allow use of expression templates inside uBas templates.
...
Fixes #8292 .
[SVN r83439]
2013-03-15 17:29:20 +00:00
John Maddock
2a4255861e
Fix operators that operate on unary-negated expressions.
...
Suppress some MSVC specific warnings.
Fix some bugs exposed by above changes and add new test cases.
Fixes #8176 .
[SVN r83227]
2013-03-01 13:15:56 +00:00
John Maddock
bea6a2bdfc
Change boolean context conversion operator so it's not convertible to void*.
...
Fixes #8177 .
[SVN r83162]
2013-02-26 12:43:14 +00:00
John Maddock
5245fd31e2
Fix bug in division of zero.
...
Document and add tests.
Fixes #8160 .
[SVN r83128]
2013-02-24 13:20:46 +00:00
John Maddock
1ef61ef160
Fix bug in subtraction routine that leads to -0 rather than 0.
...
Add test cases.
Fixes #8145 .
[SVN r83103]
2013-02-23 17:22:18 +00:00
John Maddock
4a43b9ef8e
Fix bug in subtraction of a limb_type.
...
Fix bug in division/modulus algorithms that results in incorrect sign when source and destination overlap.
Tweak performance of GCD algorithms.
Add test cases for bug reports.
Fixes #8133 .
Fixes #8126 .
[SVN r83080]
2013-02-22 10:37:36 +00:00
John Maddock
3111e69084
Fix sign of division in cpp_int when the values are small enough to fit in a double_limb_type.
...
Add test cases for above.
Fixes #8126 .
[SVN r83060]
2013-02-21 13:05:41 +00:00
John Maddock
b8f6ed0612
Change to use the unit test framework as the test exec monitor seems to be terminally broken.
...
[SVN r82944]
2013-02-17 08:59:46 +00:00
Christopher Kormanyos
fb748f698d
Refs #8065
...
[SVN r82920]
2013-02-16 10:55:06 +00:00
John Maddock
8ff620de3b
Add debug_adaptor.hpp.
...
Document debug_adaptor and VC++ visualizers.
[SVN r82517]
2013-01-17 12:23:21 +00:00
John Maddock
2b901734b2
Big search and replace name change of adapter -> adaptor.
...
[SVN r82501]
2013-01-15 11:43:27 +00:00
John Maddock
0d4b3d4b02
Add logged adapter.
...
Add docs for logged_adapter and mpfi_float.
[SVN r82499]
2013-01-15 09:25:05 +00:00
John Maddock
97ba7d573f
Fix bug that causes division by single limb to fail when the remainder is zero and the least significant limb of the quotient is 1.
...
Fixes #7878 .
[SVN r82460]
2013-01-12 10:51:46 +00:00
John Maddock
97b0b495a4
Split test_arithmetic_mpfr_50.cpp into two tests for faster compiles / smaller memory usage.
...
[SVN r82431]
2013-01-10 11:25:15 +00:00
John Maddock
42458450be
Add initial support for mpfi interval arithmetic
...
[SVN r82337]
2013-01-03 18:58:43 +00:00
John Maddock
27599ca09e
Apply patch for typos.
...
Regenerate docs.
Fixes #7806 .
[SVN r82073]
2012-12-18 11:28:04 +00:00
John Maddock
08fdb31fa2
Add some optimisation to gcd/lcm/lsb and cpp_int:
...
Use compiler intrinsics where possible for lsb.
Switch to using native integers when the values get small enough for gcd.
Re-run the performance tests and regenerate the docs.
Also change the series evaluation limits to make them depend on the precision in pow.hpp and trig.hpp.
[SVN r81946]
2012-12-14 18:37:27 +00:00
John Maddock
82e82e6b15
Disable debug info for a couple of slower compilers: speeds up the tests somewhat.
...
[SVN r81799]
2012-12-08 17:40:29 +00:00
John Maddock
f1830235bb
Fix inspection report issues.
...
Regenerate docs.
Fix performance test Jamfile.
[SVN r81740]
2012-12-06 13:37:51 +00:00
John Maddock
1b6d4082b4
Change to return test result!!
...
[SVN r81734]
2012-12-06 10:39:59 +00:00
John Maddock
bfd897f5d8
Fix some more GCC warnings and make compiles faster for slow compilers (Intel)
...
[SVN r81710]
2012-12-04 19:28:46 +00:00
John Maddock
672cd76754
Refactor test_arithmetic.cpp into lots of small files for reduced dependencies.
...
Changed use of __forceinline to release builds only.
[SVN r81654]
2012-12-01 16:19:23 +00:00
John Maddock
c77b46b4da
Add missing -= operator to tests.
...
[SVN r81622]
2012-11-29 11:04:22 +00:00
Marshall Clow
5eb7c69461
Removed usage of deprecated macros
...
[SVN r81558]
2012-11-26 17:20:55 +00:00
John Maddock
4d78b669b8
Improve testing macros and update test_arithmetic.cpp to use them and offer better error reporting.
...
[SVN r81497]
2012-11-23 17:19:11 +00:00
John Maddock
114aeb386b
Simply enable_if usage in cpp_int_backend: try to fix Intel-11 failures.
...
Improve test_cpp_int.cpp.
Improve config tests.
[SVN r81487]
2012-11-22 17:21:01 +00:00
John Maddock
09f3928f5a
Fix clang failures
...
[SVN r81464]
2012-11-21 17:54:50 +00:00
John Maddock
8f18e0b73f
Enhance config tests.
...
Split cpp_int tests into smaller chunks.
[SVN r81440]
2012-11-20 18:50:08 +00:00
John Maddock
77d07eb7e9
Fix Intel compile failure
...
[SVN r81434]
2012-11-20 12:00:15 +00:00
John Maddock
8ae04c68a6
Merge multiprecision from sandbox.
...
[SVN r81417]
2012-11-18 18:56:59 +00:00
John Maddock
4071dd8d59
Fix missing number constructor.
...
Fix is_explicitly_convertible to take account of the generic conversions.
Change sf_performance to use multiple files so we can actually compile the thing!
Minor doc updates.
Suppress some more warnings.
[SVN r81324]
2012-11-13 17:12:19 +00:00
John Maddock
3430188795
Add overloads of the integer-only functions which work with native integer types.
...
Ensure powm promotes fixed precision types to avoid numeric overflow.
Allow the Miller-Rabin code to be used by native integers.
Fix Miller Rabin tests to actually return the test result!
Fix some bugs in cpp_int unsigned arithmetic, and ensure the Miller Rabin and random number code can be safely used with checked fixed precision integers.
[SVN r81269]
2012-11-09 18:55:19 +00:00
John Maddock
e3deed1fdf
Optimize cpp_int multiplication with precision extension.
...
Turn off some warnings.
[SVN r81200]
2012-11-05 12:36:25 +00:00
John Maddock
836d765243
Fix Jamfile SNAFU.
...
[SVN r81170]
2012-11-04 12:14:22 +00:00
John Maddock
788449ffa5
Add non-member functions for mixed precision arithmetic + tests for same.
...
Fix a couple of bugs discovered along the way.
[SVN r81151]
2012-11-02 19:13:50 +00:00
John Maddock
b640732abd
Add additional template parameter to mpfr_float_backend to allow stack-based floats.
...
[SVN r81135]
2012-11-01 19:01:08 +00:00
John Maddock
c587f1550b
Update and regenerate docs.
...
Fix error in expression template unpacking that occasionally caused variable over-writes.
Update Math lib tests to test at least one non-ET type.
[SVN r81121]
2012-10-31 17:06:33 +00:00
John Maddock
645fe8865c
Add tests for checked ints and fix failures.
...
Make negating an unsigned int an error, and fix resulting test failures.
Change allocator defaults to be void when the allocator is not actually required.
[SVN r81070]
2012-10-27 17:48:33 +00:00
John Maddock
e3b56e3f7c
Fix constexpr support.
...
[SVN r81063]
2012-10-25 11:53:25 +00:00
John Maddock
82409d86a0
Minor changes for __int128 support and fix some C++0x issues
...
[SVN r81062]
2012-10-25 09:29:04 +00:00
John Maddock
a857186cb4
Big "blow it away and start again" refactoring of cpp_int.
...
Adds support for runtime checking, enumerated template params, fixed precision with allocator, and no "hidden" template parameters.
[SVN r81054]
2012-10-24 16:00:05 +00:00
John Maddock
5256e108a1
Fix Intel -x64 failures.
...
[SVN r80609]
2012-09-20 18:21:07 +00:00
John Maddock
4f2738fd6f
Add traits class to determine default ExpressionTemplate parameter value.
...
Add support for fused-multiply-add/subtract.
Optimise temporary usage when the LHS also appears on the RHS.
[SVN r80607]
2012-09-20 16:04:02 +00:00
John Maddock
dd7ee60431
Fix GCC C++11 mode failures.
...
Tidy up TODO list.
[SVN r80577]
2012-09-18 16:47:03 +00:00
John Maddock
9f8b30fcdf
Update docs with review comments.
...
Update a few tests based on review comments.
Regenerate docs.
[SVN r80539]
2012-09-16 12:25:14 +00:00
John Maddock
fc1cda1f62
Largely cosmetic change - add two new template params to cpp_dec_float - one for the exponent type, and one for an optional allocator.
...
[SVN r80431]
2012-09-07 08:31:49 +00:00
John Maddock
6dfcc7e526
Big search and replace change of name for the ExpressionTemplates template parameter to class number.
...
[SVN r80418]
2012-09-06 09:50:47 +00:00
John Maddock
9edbdc0ca4
Enable optimisations in the GMP and MPFR backends for mixed mode arithmetic.
...
Allow mixed arithmetic between two different expression templates.
Change docs to indicate mixed arithmetic is allowed and rebuild.
[SVN r80397]
2012-09-04 17:18:18 +00:00
John Maddock
ce3354335c
Allow mixed precision binary operations.
...
Add tests for basic mixed precision usage.
[SVN r80394]
2012-09-04 08:20:26 +00:00
John Maddock
c7230f94ff
Extra test cases for more complete coverage.
...
Added test coverage makefile.
Fixed errors from extra test cases.
Rename a few traits.
[SVN r80328]
2012-08-31 11:57:55 +00:00
John Maddock
1e00790703
Rename mp_number_archetype.
...
Update docs with explicit conversion info.
Regenerate docs.
[SVN r80261]
2012-08-27 12:30:53 +00:00
John Maddock
d9901b5144
Fix remaining GCC C++11 failures.
...
Fix buggy test cases.
[SVN r80166]
2012-08-24 11:08:44 +00:00
John Maddock
6157674972
Fix rational_adapter's implicit/explicit constructors.
...
Add converting constructors for trivial cpp_int's and test.
Both fix GCC errors.
[SVN r80120]
2012-08-21 18:17:57 +00:00
John Maddock
af9e0c2fe7
Add more explicit constructors and tests for them.
...
Centralise digits10 to digits2 conversions.
[SVN r80112]
2012-08-21 14:42:15 +00:00
John Maddock
1f35bfe581
Make some gmp constructors explicit.
...
Add tests to verify that explicit conversions fail.
Fix failures inside number.hpp.
[SVN r80083]
2012-08-19 16:39:24 +00:00
John Maddock
b892e3f5ab
Big breaking change - make lossy construction explicit.
...
[SVN r80058]
2012-08-16 08:13:51 +00:00
John Maddock
6fe80f07de
Much improved concept docs.
...
Regenerate docs.
Make some cpp_int specific routines generic instead.
Changed divide-by-zero to be an overflow error.
[SVN r79952]
2012-08-10 08:37:37 +00:00
John Maddock
e2ef393c23
Big search and replace rename, removing mp_ prefix.
...
[SVN r79932]
2012-08-08 18:14:50 +00:00
John Maddock
8807532ee4
Added explicit conversion operators.
...
Moved some files into /detail/
[SVN r79926]
2012-08-08 16:12:33 +00:00
John Maddock
3bcbb056e7
Add better error checking for moved-from types.
...
[SVN r79913]
2012-08-07 17:55:32 +00:00
John Maddock
c8c3610cdc
Fix uBlas tests and failures resulting from them.
...
[SVN r79902]
2012-08-07 11:47:25 +00:00
John Maddock
821afe64fb
Add uBlas interoperability tests.
...
Add file include tests.
[SVN r79894]
2012-08-07 08:10:07 +00:00
John Maddock
2fb7c1a044
Fix Linux x64 C++0x build issues.
...
[SVN r79854]
2012-08-02 17:14:17 +00:00
John Maddock
8a54889f35
Update comparison operators for better efficiency.
...
Rework delaunay performance test to use less disk space.
[SVN r79848]
2012-08-02 12:27:00 +00:00
John Maddock
c79fb41526
Rework comparison operators - note that existing backends are made less efficient by this at present.
...
[SVN r79823]
2012-07-31 18:14:14 +00:00
John Maddock
64fe0089d3
Refactor concept checks for faster compilers.
...
Add constexpr construction test.
[SVN r79724]
2012-07-24 18:03:54 +00:00
John Maddock
281c667b71
Update frontend to allow direct construction of backend.
...
Improve construction times for cpp_int from integers.
Allow constexpr construction.
Allow fixed precision cpp_int's with small bit counts.
[SVN r79692]
2012-07-23 08:57:44 +00:00
John Maddock
19ee491c55
Add noexcept support/markup where possible.
...
[SVN r79331]
2012-07-07 11:16:28 +00:00
John Maddock
26905dc5ea
Fix non ET operators to return by value (not rvalue refs as that's unsafe - thanks to Howard Hinnant for the test case).
...
Fix move constructors to actually move!
Add move test case.
Add better move support throughout the lib.
[SVN r79224]
2012-07-02 08:08:28 +00:00
John Maddock
1a4e3af5c8
Fix Linux x64 errors
...
[SVN r79165]
2012-06-29 11:53:25 +00:00
John Maddock
f09ead8e37
Some file renaming and fixes from Steven Watanabe's comments.
...
[SVN r79141]
2012-06-27 18:25:10 +00:00
Vicente J. Botet Escriba
cd741c1249
Multiprecision: added error log
...
[SVN r78803]
2012-06-03 20:51:41 +00:00
John Maddock
ebd7502fdc
Enhance pow and powm tests.
...
Quash some warnings.
Fix the IO tests on GCC.
[SVN r78423]
2012-05-11 17:19:13 +00:00
John Maddock
a8c73aea66
Change non-member functions to be protected by enable_if based on the type of the number.
...
Extend expression templates to 4 arguments.
Add pow and powm functions for integer types.
Update docs to match.
[SVN r78401]
2012-05-10 09:20:26 +00:00
John Maddock
d2bc0f90f7
Change non-member functions to use enable_if so they're restricted to the number type to which they apply (better error messages). Enhance concept checks to check things which weren't previously tested.
...
[SVN r78321]
2012-05-04 08:20:33 +00:00
Christopher Kormanyos
9ee0022c77
Re-factor cpp_dec_float class constants.
...
Extend cpp_dec_float low-digit range from 30 to 9.
Removed temporary storage from cpp_dec_float multiply routine.
Extended tests to 9, 18 and (sqrt test) to 1000 digits.
[SVN r78097]
2012-04-20 20:05:49 +00:00
John Maddock
462bec3925
Fix ldexp/frexp in default_ops.hpp. Improve 64-bit platform detection in cpp_int_core.hpp. Get examples building with GCC
...
[SVN r77971]
2012-04-14 16:51:02 +00:00
John Maddock
d4a2c46ac6
Update examples, reorganise docs, temporarily remove HTML before rebuilding.
...
Enhance test cases, including enabling loopback testing on cpp_dec_float io.
[SVN r77948]
2012-04-13 15:38:28 +00:00
John Maddock
426430a233
Fix MPFR error rates on Linux x86 64
...
[SVN r77782]
2012-04-05 17:19:57 +00:00
John Maddock
68a4a87438
Add string versions of constants for faster (and more accurate) constant initialization.
...
[SVN r77758]
2012-04-04 17:04:00 +00:00
John Maddock
3913771ea0
Change cpp_dec_float string conversion to generate a better error message when conversion fails.
...
Add generic inter-conversions and tests for them.
Fix bug in cpp_int convert_to.
[SVN r77630]
2012-03-29 18:00:06 +00:00
John Maddock
ec3cf57c91
Add licence and copyright.
...
[SVN r77624]
2012-03-29 12:15:05 +00:00
John Maddock
ead32b9563
Squash some MSVC level 4 compiler warnings.
...
[SVN r77623]
2012-03-29 09:12:08 +00:00
John Maddock
4c6065717b
Add a few more integer specific bit-fiddling functions.
...
Fix some bugs in cpp_int left shift code.
Document some missing backend API's, and update docs.
[SVN r77583]
2012-03-27 11:45:01 +00:00
John Maddock
6ead744223
Fix fixed precision ints to work with non obvious bit counts.
...
[SVN r77473]
2012-03-22 11:54:15 +00:00
John Maddock
8433c69175
Disable expression templates for fixed precision types.
...
Restrict integer functions to integer types.
Improve Miller Rabin performance by filtering out small primes etc.
Improve Miller Rabin tests.
Change mp_int to tom_int to avoid conflict with global ::mp_Int type.
[SVN r77471]
2012-03-22 10:29:30 +00:00
John Maddock
24cff33935
Update Miller Rabin test to use small prime filtering.
...
Add some new integer type operations.
Update performance tests to match.
[SVN r77451]
2012-03-21 09:19:57 +00:00
John Maddock
2349943cdb
Fix some GMP int errors, and simplify modulus code.
...
Fix some cpp_int errors.
Improve cpp_int tests.
[SVN r77362]
2012-03-17 19:43:26 +00:00
John Maddock
45a08da90e
Add simple version of the Miller Rabin test
...
[SVN r77353]
2012-03-17 09:18:20 +00:00
John Maddock
d82fa61c81
Mostly remove references to fixed_int.
...
Update docs.
[SVN r77335]
2012-03-14 18:23:44 +00:00
John Maddock
e1b23af8f5
Add files missing from last commit, and add new examples to tests.
...
[SVN r77324]
2012-03-13 18:40:52 +00:00
John Maddock
7bed8d02f9
Add support for disabling expression templates via a second template parameter to mp_number.
...
Begin to update docs to reflect new cpp_int code.
[SVN r77323]
2012-03-13 18:30:18 +00:00
John Maddock
5caa15f798
Reorganisation: rename methods "eval_foo" rather than "foo" to avoid conflict with classes of the same name (GCC bug).
...
Move backends into sub-namespaces to avoid namespace pollution.
[SVN r77312]
2012-03-12 09:18:44 +00:00
John Maddock
b42208c5df
Fix several division algorithm bugs.
...
Add cpp_rational to performance tests.
Add modular arithmetic test to test cases.
[SVN r77303]
2012-03-11 16:43:31 +00:00
John Maddock
5500ad3ea8
Add support for fixed precision and unsigned cpp_int's.
...
[SVN r77260]
2012-03-08 10:34:37 +00:00
John Maddock
bea3707326
Add initial version of an arbitrary precision integer type.
...
Hook up some more fixed_int tests.
[SVN r77141]
2012-02-29 13:05:51 +00:00
John Maddock
8d6dedf4b0
Complete renaming of cpp_float to cpp_dec_float.
...
Rebuild docs.
[SVN r77037]
2012-02-16 09:36:26 +00:00
John Maddock
380d627359
Big search and replace: change cpp_float to cpp_dec_float.
...
Also fix up some numeric_limits test failures.
[SVN r77032]
2012-02-15 13:09:45 +00:00
John Maddock
d69424adad
Fix bug in fixed_int::convert_to with negative numbers.
...
Fix bug in fixed_int shift operator when shifting by 0.
Add preliminary gcd/lcm support for integer types.
Add static asserts to floating-point only functions.
[SVN r76706]
2012-01-26 10:11:10 +00:00
John Maddock
4b844fc60c
Improve performance of fixed_int divide and string conversion.
...
Add mixed integer ops to fixed_int.
Improve fixed_int test cases.
Add improved default forwarding functions that preserve arithmetic type arguments.
Fix some operator overloads.
Update performance tests.
[SVN r76639]
2012-01-22 19:12:37 +00:00
John Maddock
a53f46637e
Fix Linux 64 failures
...
[SVN r76593]
2012-01-20 17:15:22 +00:00
John Maddock
3c13b7a4d1
Add missing file.
...
Fix some inconsistent uses of long long and intmax_t.
[SVN r76573]
2012-01-18 12:16:20 +00:00
John Maddock
66b67a1c09
Refactor SF tests for much faster compile times.
...
[SVN r76545]
2012-01-16 18:26:50 +00:00
John Maddock
a97c3bd896
Update docs to include fixed_int.hpp.
...
Remove 64-bit versions of fixed_int typedefs - better to use boost::int64_t instead.
[SVN r76433]
2012-01-12 13:56:22 +00:00
John Maddock
036dc2bacc
Rename files.
...
[SVN r76429]
2012-01-12 12:06:27 +00:00
John Maddock
db83a1c4ad
Tentative rename of packed_cpp_int to fixed_int.
...
[SVN r76428]
2012-01-12 11:55:09 +00:00
John Maddock
44d5a3e394
Change tests for faster compile times.
...
[SVN r76412]
2012-01-11 19:09:49 +00:00
John Maddock
8c28b89dfc
Fix GCC failures and generally improve performance of packed_cpp_int.
...
[SVN r76409]
2012-01-11 11:53:49 +00:00
John Maddock
99707d8925
Switch to faster division code and add better test case for packed int's.
...
[SVN r76398]
2012-01-10 13:20:29 +00:00
John Maddock
b607dc2c47
Move file.
...
[SVN r76253]
2012-01-01 11:46:48 +00:00
John Maddock
30310e4a52
Another Boost.Rational fix.
...
Add tentative version of a fixed width, bit-packed 2's complement integer type.
[SVN r76234]
2011-12-30 18:21:08 +00:00
John Maddock
d7578f242c
Add numerator/denominator accessor functions to rational_adapter.hpp.
...
Define predefined rational number type for libtommath.
Add rational number specific tests to test_arithmetic.cpp.
Document rational_adapter and related stuff, regenerate docs.
[SVN r76130]
2011-12-24 13:13:16 +00:00
John Maddock
c32e35aace
Fix File IO and string conversion for rational_adapter, and update tests accordingly.
...
[SVN r76129]
2011-12-24 11:59:25 +00:00
John Maddock
b9ea00966f
Fix modulus operations for negative numbers that should yield zero results (and update tests to match).
...
Fix boost::rational comparison operator support.
Fix GCC failures in test_rational_io.cpp.
Add adapter for rational types.
[SVN r76128]
2011-12-24 10:07:32 +00:00
John Maddock
a2dc3b968c
Fix remaining Boost.Rational support issues and add rational number IO test.
...
[SVN r76121]
2011-12-23 17:13:29 +00:00
John Maddock
6e3ab5380b
Add tests for Boost.Math special functions, and fix whatever errors came up in running those tests.
...
Add workaround for compilers that don't have a std::abs(long long).
[SVN r76079]
2011-12-20 16:19:55 +00:00
John Maddock
018ac8cd6c
Begin adding tests taken from Boost.Math and fix the issues they flag up.
...
[SVN r75832]
2011-12-06 19:03:41 +00:00
John Maddock
fdcc1a5034
Document libtommath support, add error checking to tommath bitwise operators.
...
[SVN r75746]
2011-11-30 12:08:59 +00:00
John Maddock
d76492ddaa
Suppress some GCC warnings.
...
[SVN r75723]
2011-11-29 12:27:40 +00:00
John Maddock
4a9845ac7e
Fix and test integer formatted output.
...
[SVN r75716]
2011-11-28 19:24:20 +00:00
John Maddock
7143af0191
Fix IO of infinities and NaN's.
...
Add IO round trip test and adjust max_digits10 accordingly.
[SVN r75714]
2011-11-28 16:28:31 +00:00
John Maddock
ffc6bcedc9
Fix float IO and add test.
...
[SVN r75707]
2011-11-28 09:13:12 +00:00
John Maddock
ecead4525a
Suppress MSVC warnings in tests.
...
Add support for std::ios_base::fmtflags in string formatting.
Fix the errors that result from above change!
[SVN r75586]
2011-11-21 09:52:32 +00:00
John Maddock
cd31fbde7a
Fix operator>> for mp_number.
...
Add template inter-conversions on cpp_float.
Adjust precision of test reporting.
[SVN r75520]
2011-11-17 18:08:51 +00:00
John Maddock
b653174c77
Add enhanced testing support.
...
Remove throw statements for BOOST_THROW_EXCEPTION.
Remove throw() qualifiers: they're a dis-optimization.
[SVN r75511]
2011-11-16 17:36:40 +00:00
John Maddock
050ae32c44
Add initial libtommath support.
...
Fix use of noexcept.
Remove dead files.
[SVN r75505]
2011-11-16 09:40:05 +00:00
John Maddock
0c413f7352
Change real_types to float_types.
...
[SVN r75489]
2011-11-14 13:39:10 +00:00
John Maddock
b85306e076
Fix remaining cpp_float bugs.
...
Fix use of expression templates in conditional expressions.
[SVN r75485]
2011-11-14 12:19:17 +00:00
John Maddock
40d1b2f1dd
Add sqrt tests.
...
Fix remaining cpp_float failures.
[SVN r75478]
2011-11-13 17:36:39 +00:00
John Maddock
c8eda6845e
Search and replace - rename mp_float cpp_float.
...
[SVN r75453]
2011-11-12 13:15:33 +00:00
John Maddock
47724a4221
Fixes for bugs in mp_float.
...
Fix constant initialization.
Add some instrumentation code.
Make mp_exp constructor explicit.
Remove some dead code.
Note mp_float division has outstanding bugs still!!
[SVN r75452]
2011-11-12 12:15:04 +00:00
John Maddock
0c4dde52ee
Get the rounding functions working and tested, update docs to match.
...
[SVN r75425]
2011-11-09 17:37:40 +00:00
John Maddock
b36be1f5c3
Tighten up and test the architypes.
...
[SVN r75404]
2011-11-08 12:50:21 +00:00
John Maddock
6e009f3029
Fix gcc warnings and errors.
...
Update docs.
[SVN r75284]
2011-11-03 11:06:05 +00:00
John Maddock
1c6577b5a6
Add conversion tests and update docs.
...
[SVN r75279]
2011-11-02 18:15:00 +00:00
John Maddock
79d630a068
Fix benchmark to build with new code.
...
[SVN r75169]
2011-10-29 17:41:31 +00:00
John Maddock
6372f8b638
Get mp_float passing all the tests, fix some bugs in acos and atan implementations.
...
[SVN r75166]
2011-10-29 11:57:54 +00:00
John Maddock
ad66feecbe
Add numeric_limits support for mp_float.
...
[SVN r75134]
2011-10-27 16:46:46 +00:00
John Maddock
b0ac20f391
Add port of e_float as a backend.
...
[SVN r75129]
2011-10-27 12:43:41 +00:00
John Maddock
9124ccb4c1
Enable native atan2 for mpfr.
...
[SVN r75095]
2011-10-23 16:03:29 +00:00
John Maddock
fc1eb9303f
Get the tests passing with gcc on Linux.
...
[SVN r75094]
2011-10-23 15:49:27 +00:00
John Maddock
c34e9f654f
Big search and replace namespace and class renaming: get rid of last references to "big_number" and "real".
...
[SVN r75093]
2011-10-23 11:23:13 +00:00
John Maddock
628c8cd62f
Added atan2, plus missing file.
...
[SVN r75090]
2011-10-22 17:32:01 +00:00
John Maddock
636fdc2e5d
Tidy up the tests with boilerplate relative error calculation.
...
Fix eval_ldexp for mpf_t.
Fix power and log calculations.
Add acos.
Get all the tests passing.
[SVN r75070]
2011-10-20 18:16:46 +00:00
John Maddock
8cf2a83683
Add sin/cos/tan/asin functions.
...
[SVN r75053]
2011-10-18 18:10:20 +00:00
John Maddock
5f15eaa679
Added pow, exp, log, sinh, cosh and tanh support.
...
[SVN r74781]
2011-10-07 18:14:34 +00:00
John Maddock
d6b9a6e980
Change log to give correct answer for log(1) and to not subtract towards the correct answer when that answer is small. Also improves series convergence.
...
[SVN r74736]
2011-10-05 11:26:31 +00:00
John Maddock
7be44c1683
Add log function and tests.
...
[SVN r74700]
2011-10-04 16:46:25 +00:00
John Maddock
b8a60ca6ca
Rename "big_number*" to "mp_number*".
...
[SVN r74671]
2011-10-03 17:15:55 +00:00
John Maddock
e0309c8492
More file renames to remove "big_" prefixes.
...
[SVN r74670]
2011-10-03 17:03:28 +00:00
John Maddock
01173bc59c
Changed namespace to "multiprecision".
...
Added some numberic constant calculations.
Added exp function support and test case.
[SVN r74669]
2011-10-03 16:56:24 +00:00
John Maddock
73960e2a46
Giant file and directory rename: changed directory name from math to multiprecision and updated code to match.
...
[SVN r74579]
2011-09-26 17:00:44 +00:00