jzmaddock
de84bd4902
C99: Add support for number comparison functions plus hypot.
2016-09-07 11:51:55 +01:00
jzmaddock
00fc161f3c
C99: Fix regression failures in new code.
...
Test for negative interactions with std:: functions.
2016-09-04 10:21:28 +01:00
jzmaddock
e1b66e8e7e
C99: Initial fma support.
2016-09-02 16:48:37 +01:00
jzmaddock
6e3f814cec
Fix bug in self assignment of complex expression templates.
...
Fixes https://svn.boost.org/trac/boost/ticket/12408 .
2016-08-27 18:27:54 +01:00
jzmaddock
339818c018
Fix compiler errors when converting from cpp_int's to cpp_bin_float's
...
As reported on the mailing list.
Also adds new test case.
2016-08-17 18:12:41 +01:00
jzmaddock
11d6776b3d
Change negate to negate_value to avoid gcc-4.4 error.
2016-08-14 18:46:42 +01:00
jzmaddock
963c150746
Add fdim support.
2016-08-10 19:03:00 +01:00
jzmaddock
7c34000953
Add missing qualifier to isnan call.
2016-08-07 19:12:03 +01:00
jzmaddock
e266a5ad51
Fix up float128 preliminary C99 support
2016-08-07 14:08:28 +01:00
jzmaddock
e6fab45edf
Add missing test file.
2016-08-06 19:12:51 +01:00
jzmaddock
38117c2ad1
Begin adding C99 floating-point support.
2016-08-06 19:09:22 +01:00
jzmaddock
a9c40598a1
Merge branch 'modf' into develop
...
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2016-08-04 13:15:27 +01:00
John Maddock
0492ba22bb
Merge branch 'develop' of https://github.com/boostorg/multiprecision into develop
2016-07-26 16:57:34 +00:00
John Maddock
3d18f5002f
Fix remaining Solaris test failures.
2016-07-26 16:57:28 +00:00
jzmaddock
7ebd9dfd9b
Fix fencepost error in rational->float conversion.
...
Add some test cases for the issue.
Fixes https://svn.boost.org/trac/boost/ticket/12327 .
2016-07-25 18:57:39 +01:00
jzmaddock
028a0f7e30
Fix some big-endian misconceptions.
...
Not all constructors are available when we're not little-endian.
2016-07-23 19:06:22 +01:00
jzmaddock
9f43e1c88e
Correct conversion to signed integer.
...
Add tests for integer round-trip.
Fixes: https://svn.boost.org/trac/boost/ticket/12343 .
2016-07-22 17:54:40 +01:00
jzmaddock
489843a549
Disable runtime checks in msvc tests as it breaks the STL.
2016-07-22 09:16:01 +01:00
jzmaddock
c7e29b02ff
Test and allow MSVC compiled code to be used with /RTC1 /RTCc etc.
2016-06-16 13:07:10 +01:00
jzmaddock
9c7210e859
Fix result of sqrt(infinity) in cpp_bin_float.
...
See: https://svn.boost.org/trac/boost/ticket/12227
2016-06-06 13:17:57 +01:00
jzmaddock
7fa93b8821
Fix conversion to signed-zero of cpp_bin_float.
...
See https://svn.boost.org/trac/boost/ticket/12213
2016-06-06 12:42:04 +01:00
jzmaddock
aaeb4d737e
Fix subtraction of signed infinities in cpp_bin_float.
...
See: https://svn.boost.org/trac/boost/ticket/12209
2016-06-05 20:00:09 +01:00
jzmaddock
acca72019e
Merge branch 'develop' of https://github.com/boostorg/multiprecision into develop
2016-06-05 18:31:22 +01:00
jzmaddock
34a0600394
Quash lots of warnings and fix PR issue
...
see: https://github.com/boostorg/multiprecision/pull/14
2016-06-05 18:30:41 +01:00
jzmaddock
818073a0f8
Fixes for clang warnings
2016-06-04 15:50:02 +01:00
jzmaddock
10e2be2c1e
Fix expected error rates for mpf_float variable-precision, also squash one warning
2016-06-03 15:10:12 +01:00
jzmaddock
6e7b08a77e
Update to allow mpf_float to be used with Boost.Math at variable precision.
2016-06-02 18:48:46 +01:00
jzmaddock
e6715486a1
Merge branch 'develop' of https://github.com/boostorg/multiprecision into develop
2016-06-02 11:46:08 +01:00
jzmaddock
246172b58c
Fix mpfr error rate
2016-06-02 11:45:33 +01:00
jzmaddock
2991b3ac31
Fix mpfr test failures in Math lib tests
2016-06-01 00:08:08 +01:00
jzmaddock
816edd2ed6
Update tests for variable precision math.
2016-05-31 10:05:34 +01:00
jzmaddock
02d71e6757
Fix fencepost error in cpp_bin_float rounding.
...
Add tests to verify.
2016-05-31 09:52:57 +01:00
jzmaddock
0397d8bcd8
Test rounding code better in cpp_bin_float.
...
See: https://svn.boost.org/trac/boost/ticket/12199 .
2016-05-16 12:43:03 +01:00
jzmaddock
6a16ac95c5
Fix add and subtract of cpp_bin_float when the exponents would overflow.
...
Fixes: https://svn.boost.org/trac/boost/ticket/12198 .
2016-05-15 19:01:50 +01:00
jzmaddock
c2499c2d16
Fix buggy add and subtract of signed zeros in cpp_bin_float.
2016-05-14 20:11:20 +01:00
jzmaddock
6e7e2e8010
Fix cpp_bin_float conversions of infinities and NaN's.
...
Fixes: https://svn.boost.org/trac/boost/ticket/12196 .
2016-05-14 19:15:14 +01:00
jzmaddock
0245c0b286
Add signed zero support to cpp_bin_float.
2016-05-13 19:20:34 +01:00
jzmaddock
a61976e878
Merge branch 'sign_functions' of https://github.com/boostorg/multiprecision into sign_functions
2016-05-13 13:46:30 +01:00
jzmaddock
6d54dd6a6b
Fix sign of infinite results.
...
See https://svn.boost.org/trac/boost/ticket/12195 .
2016-05-13 13:45:47 +01:00
jzmaddock
ee22746f56
Add signed zero support to mpfr and float128
2016-05-13 10:48:30 +01:00
jzmaddock
4b65082f88
Begin adding and testing sign manipulation functions.
2016-05-12 12:49:53 +01:00
jzmaddock
ad245b44ff
Fix division over/underflow in cpp_bin_float.
...
See https://svn.boost.org/trac/boost/ticket/12167
2016-05-11 19:34:13 +01:00
jzmaddock
2745328444
Add missing #include.
2016-05-10 18:57:02 +01:00
jzmaddock
8684c4fbcb
Fix interval tests for 0 * INF.
2016-05-03 12:31:23 +01:00
jzmaddock
d619a8e3db
Fix arithmetic operations that should result in a NaN.
...
See https://svn.boost.org/trac/boost/ticket/12157 .
2016-05-02 18:53:41 +01:00
jzmaddock
a0bb538a2a
Add hashing support to the remaining backends, plus tests etc.
2016-04-30 04:29:07 +01:00
jzmaddock
12cbf96025
Add missing file test_hash.cpp
2016-04-29 18:59:15 +01:00
jzmaddock
efbb9e272d
Begin adding support for boost::hash.
...
Fix cpp_int import/export of negative numbers.
2016-04-29 18:52:57 +01:00
jzmaddock
9458f69fa9
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-04-12 19:07:49 +01:00
jzmaddock
aeab24b4fb
Fix various conversions from infinities and NaN's.
...
See: https://svn.boost.org/trac/boost/ticket/12112
2016-04-05 19:32:56 +01:00
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