Commit Graph

505 Commits

Author SHA1 Message Date
jzmaddock
302c6f5c35 Fix up __float128 interoperability. 2017-05-21 11:16:29 +01:00
jzmaddock
76ad144e00 Disable new pow/exp underflow tests for interval types.
The resulting intervals are too wide for the tests to pass.
2017-05-15 12:03:32 +01:00
jzmaddock
f7dc0c74c5 Update test_pow.cpp/test_exp.cpp to handle types with no infinity.
Also adjusted start point of tests for float128.
2017-05-14 19:26:12 +01:00
jzmaddock
e691d23cd5 Fix for internal logic error in exp of large values.
See https://github.com/boostorg/multiprecision/issues/23.
2017-05-14 09:37:49 +01:00
jzmaddock
f2a266da6d Fix for trig functions of huge arguments.
See https://github.com/boostorg/multiprecision/issues/24.
Note that this is not a particularly clever fix!
2017-05-12 18:50:03 +01:00
jzmaddock
34dc9d1966 Add more overflow tests. 2017-03-05 17:10:44 +00:00
jzmaddock
2876565d86 Add new test to Jamfile. 2017-03-05 17:04:29 +00:00
jzmaddock
f333808577 Increase testing of truncated integer arithmetic. 2017-03-05 17:02:10 +00:00
jzmaddock
7a2df8ff0a Fix error handing in checked cpp_int multiply.
See https://github.com/boostorg/multiprecision/issues/16
2017-03-05 13:10:13 +00:00
jzmaddock
f4dceca5dc Disable some float128 tests when running under older gcc versions -
no point in testing for old bugs in libquadmath.
2017-03-03 09:20:58 +00:00
jzmaddock
cd2bbcba5b Fix bounded variable precision cpp_int's.
1) Removed some constexpr optimizations which were causing the code to fail to spot that truncation/overflow had occurred.
2) Change min/max code for numeric_limits to work for bounded variable precision types (this needs more work as the current code relies on being able to create a fixed-precision allocator-free type of equivalent width.
3) Add tests for bounded variable precision integers.
See: https://svn.boost.org/trac/boost/ticket/12798
2017-02-03 19:39:28 +00:00
jzmaddock
e108817e69 C99 tests: disable one more mpfr case fixed in recent releases. 2017-01-31 19:56:31 +00:00
jzmaddock
9341113864 C99 test: don't test buggy mpfr versions. 2017-01-31 19:54:49 +00:00
jzmaddock
7deabbe0d4 Previous commit was incomplete. 2017-01-31 19:46:26 +00:00
jzmaddock
c99bb4d418 Fix tests use of min/max types and correct type for the exponent of the number. 2017-01-31 19:41:35 +00:00
jzmaddock
6139de5732 Add MPFR version info to test. 2017-01-31 19:21:51 +00:00
jzmaddock
c81a5e410a Fix GCC-ubuntu failures induced by previous commits 2017-01-30 23:08:34 +00:00
jzmaddock
8179baf40f Fix cpp_int left shift in cases where there is bit-loss.
See https://svn.boost.org/trac/boost/ticket/12790.
Also add dedicated test case.
2017-01-29 19:20:29 +00:00
jzmaddock
c0df5b6747 Change ilogb to consistently return the minimum value of the exponent type
(which may be either narrower or wider than the int return type specified in C99).
Change transcendental code which uses ilogb for loop termination, to check for
a minimal value return to correctly handle the case that the value has gone to zero.
See https://svn.boost.org/trac/boost/ticket/12625
2016-12-03 08:50:38 +00:00
jzmaddock
26ceb6ef38 Get cpp_dec_float, float128, and mpfr passing the C99 annex F tests.
See https://svn.boost.org/trac/boost/ticket/12581.
2016-12-02 17:54:36 +00:00
jzmaddock
138a9055e2 Big commit to bring things into line with C99 Annex F.
See https://svn.boost.org/trac/boost/ticket/12581.
2016-11-30 19:00:55 +00:00
jzmaddock
ec018d5099 Increase testing for rounding when subtracting cpp_bin_float. 2016-11-18 10:56:58 +00:00
jzmaddock
618ef47611 Fix subtraction of small quantities in cpp_bin_float.
See: https://svn.boost.org/trac/boost/ticket/12580
2016-11-17 19:02:11 +00:00
jzmaddock
0e2195fa78 Improve performance of convert_to<Float>.
See https://svn.boost.org/trac/boost/ticket/12527.
2016-11-15 12:06:19 +00:00
jzmaddock
0230921010 Fix conversion of values to double that result in negative infinity.
See https://svn.boost.org/trac/boost/ticket/12527#comment:11.
2016-11-12 19:31:45 +00:00
jzmaddock
0006227416 Change cpp_bin_float rounding code to round in arbitrary location and modify convert-to-float to use it.
See https://svn.boost.org/trac/boost/ticket/12527.
2016-11-12 13:22:15 +00:00
jzmaddock
51686cae87 Fix sign when a conversion results in zero. 2016-11-06 13:12:44 +00:00
jzmaddock
4538e88a91 Fix integer sqrt for very small integers.
See https://svn.boost.org/trac/boost/ticket/12559.
2016-11-06 11:58:54 +00:00
jzmaddock
059cb63649 Prevent double rounding when converting to a denormalized float.
See https://svn.boost.org/trac/boost/ticket/12527.
2016-11-05 17:20:26 +00:00
jzmaddock
ed43204e92 Fix ceil cpp_bin_float to return signed zero when coming up from below.
Also fixes same issue in round/trunc.
See https://svn.boost.org/trac/boost/ticket/12525.
2016-10-26 18:48:53 +01:00
jzmaddock
5a5612c0a9 Fix sign of result when subtraction yields zero.
See https://svn.boost.org/trac/boost/ticket/12524.
2016-10-26 17:55:31 +01:00
jzmaddock
ef0ef9b515 Fix conversion to floating point types when the exponent value would overflow an int.
See https://svn.boost.org/trac/boost/ticket/12512
2016-10-24 18:48:09 +01:00
jzmaddock
75dc2ebb33 Switch floating point types to be zero initialized when default constructed.
This is now consistent between types, and matches what explicitly initialized built in types do.
See https://svn.boost.org/trac/boost/ticket/12500.
2016-10-23 19:12:56 +01:00
jzmaddock
4859528993 Fix mpfi conversions and tests. 2016-10-17 18:02:38 +01:00
jzmaddock
ea357ba6f6 Complete floating point conversion tests.
Allow float->int explicit conversions.
Remove float->int convert-fial tests.
Add enable_if restrictions on op= operators so explicit conversions don't inadvertently take place.
2016-10-12 19:52:28 +01:00
jzmaddock
fb9503920a Add more interconversion tests and fix resulting failures. 2016-10-03 18:01:16 +01:00
jzmaddock
ebfc08a07a Start adding interconversion test cases. 2016-09-28 19:56:39 +01:00
jzmaddock
94e3348f79 Add first comprehensive interconversion test case. 2016-09-28 19:39:44 +01:00
jzmaddock
cd20cf7db4 Merge branch 'develop' into c99
# Resolved Conflicts:
#	doc/html/boost_multiprecision/indexes/s01.html
#	doc/html/boost_multiprecision/indexes/s02.html
#	doc/html/boost_multiprecision/indexes/s03.html
#	doc/html/boost_multiprecision/indexes/s04.html
#	doc/html/index.html
#	include/boost/multiprecision/detail/default_ops.hpp
2016-09-23 09:01:56 +01:00
jzmaddock
105b324d9d Document eval_pow2,
Optimise default eval_pow2 for integer args.
2016-09-22 11:05:38 +01:00
jzmaddock
19e41b0155 Add exp2 support. 2016-09-22 10:53:06 +01:00
jzmaddock
9f5b8ab4ad Fix for libstdc++ bug 2016-09-19 19:10:02 +01:00
jzmaddock
87ae4edc75 C99: trivial test for comparison functions. 2016-09-18 18:36:18 +01:00
jzmaddock
d624d3fd94 C99: add scalbln, rinmt and tgamma. 2016-09-18 18:29:00 +01:00
jzmaddock
22928e00ad Suppress needless warning (unused parameter). 2016-09-18 17:35:14 +01:00
jzmaddock
d25834c52f C99: Add support for remainder and remquo. 2016-09-18 17:34:48 +01:00
jzmaddock
b2108867c7 Fix for cpp_int conversions. 2016-09-15 19:08:38 +01:00
jzmaddock
e1f3e4989f C99: Add nextafter and nexttoward 2016-09-09 19:39:04 +01:00
jzmaddock
67e0dc15ee C99: Add log1p and log2 support. 2016-09-08 18:42:20 +01:00
jzmaddock
5b7f9f1a03 C99: Add support for lgamma, lrint and llrint. 2016-09-07 18:18:31 +01:00
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