Commit Graph

505 Commits

Author SHA1 Message Date
jzmaddock
9a53f1c92f float128.hpp: Update so our code works even when Q literals are not allowed.
See: https://github.com/boostorg/multiprecision/issues/83
2018-10-13 11:32:19 +01:00
jzmaddock
bd8599bac6 Fix up more functions which don't correctly guard precision changes.
Fixes: https://github.com/boostorg/multiprecision/issues/91
2018-10-06 19:31:41 +01:00
jzmaddock
ebac17cca6 Merge branch 'develop' of https://github.com/boostorg/multiprecision into develop 2018-09-27 19:37:24 +01:00
jzmaddock
6f2823f183 Fix up and test mpc conversions.
See https://github.com/boostorg/multiprecision/issues/78.
2018-09-27 19:37:07 +01:00
jzmaddock
a3797ad7d4 Fix up mpfi changes for C++03 and C++17 2018-09-26 18:34:44 +01:00
jzmaddock
92e4f6c0e4 APPoS: Fix up mpfi and mpf support, update tests.
See https://github.com/boostorg/multiprecision/issues/87.
2018-09-25 09:55:11 +01:00
jzmaddock
7f5594c15c
Merge pull request #82 from boostorg/APPoS
Apply "Assignment Preserves Precision of Source".
2018-09-16 19:21:36 +01:00
jzmaddock
9d3326cb6d APPoS: Add assign with precision.
[CI SKIP]
2018-09-16 19:19:27 +01:00
jzmaddock
9f3ccdcb78 APPoS: Fix build error in determining the "precision" of string literals.
Update tests.
2018-09-15 10:58:56 +01:00
jzmaddock
01041bd7bf APPoS: correct test requirements. 2018-09-15 09:14:47 +01:00
jzmaddock
64115b729a APPoS: Add missing files. 2018-09-07 12:57:46 +01:00
jzmaddock
8d281cc47f Apply "Assignment Preserves Precision of Source".
APPoS for short, throughout the library including in mixed precision arithmetic which should now always promote to the highest precision of any of the arguments.
2018-09-06 20:37:56 +01:00
jzmaddock
27c80085b1
Merge branch 'develop' into issue66 2018-08-18 10:37:39 +01:00
jzmaddock
ba0bfe64e0 Guard use of std::move by BOOST_NO_CXX11_RVALUE_REFERENCES. 2018-08-18 09:38:04 +01:00
jzmaddock
5daa4e2fa7 Fix overloads of binary functions to allow mixed types in expression templates.
For example complex+real expression.
Mixed expression+expression is not currently supported (it's complicated!).
Fixes: https://github.com/boostorg/multiprecision/issues/69.
2018-08-18 09:36:04 +01:00
jzmaddock
aa56ab85a5 Document how to assign both value and precision in the variable precision types.
Add tests for the method suggested.
See https://github.com/boostorg/multiprecision/issues/72.
2018-08-17 11:01:46 +01:00
jzmaddock
314383dab9 string_view support:
Fix tests that aren't testing number (but boost::rational).
Add assignment support.
See https://github.com/boostorg/multiprecision/issues/66
2018-08-17 09:09:38 +01:00
jzmaddock
15330801e0 Add support for construction from a std::string_view.
See https://github.com/boostorg/multiprecision/issues/66.
2018-08-16 20:11:10 +01:00
jzmaddock
bbcac7c78b Fix more variable precision issues:
Make sure that temporaries use the same precision as the target.
Make sure that construction from mpfr_float's copies their precision.
2018-08-16 19:21:24 +01:00
jzmaddock
eed306e9c5 Correct change of precision in existing mpc_complex.
Correct expected test result on assignment to variable of differing precision.
See https://github.com/boostorg/multiprecision/issues/65.
2018-08-15 19:32:14 +01:00
jzmaddock
d0bc8a0d4e Tidy up more inconsistencies in precision setting.
See https://github.com/boostorg/multiprecision/issues/62.
2018-08-15 18:24:36 +01:00
jzmaddock
2d8e5c1d25 Add overloads for construction at specified precision.
Also document and update docs.
See https://github.com/boostorg/multiprecision/issues/62.
2018-08-15 13:40:47 +01:00
jzmaddock
bc34128da1 Disable rvalue tests when BOOST_NO_CXX11_RVALUE_REFERENCES is defined. 2018-08-09 10:54:28 +01:00
jzmaddock
4df64fc7f1 Fix test failures from previous commit and extend CI coverage to MPC and MPFI backends.
See https://github.com/boostorg/multiprecision/issues/60.
2018-08-09 09:09:08 +01:00
jzmaddock
2de27f70e0 MPC/MPFR: Fix up handling of precisions when copying values.
See: https://github.com/boostorg/multiprecision/issues/60.
2018-08-08 20:02:48 +01:00
jzmaddock
d5c7a7f701 Fix string parsing of complex types and update tests. Fixes https://github.com/boostorg/multiprecision/issues/59 2018-08-05 20:38:51 +01:00
jzmaddock
61f4fd8778 rational_adaptor: Fix some conceptual failures and add another test case. 2018-05-29 18:23:07 +01:00
jzmaddock
6c618018ea Disable long double tests if Boost.Math has long double support disabled.
[CI SKIP]
2018-05-27 11:08:14 +01:00
jzmaddock
bbe819f803 Conversion of between unsigned ints should be truncating. 2018-05-16 21:26:08 +01:00
jzmaddock
aff777636d
Merge pull request #48 from boostorg/shift_negative
Remove warning on shifting negative value.
2018-05-11 19:08:26 +01:00
jzmaddock
821eb5658f Complex: correct mpfr version check. 2018-04-17 19:04:18 +01:00
jzmaddock
73de592835 complex: re-enable some MPC specific tests. 2018-04-17 18:51:13 +01:00
jzmaddock
c1308b5cf1 Complex: Lot's of small updates to complete complex_adaptor and tests. 2018-04-17 18:49:09 +01:00
jzmaddock
7eee55776e complex: add complex_adaptor plus first tests. 2018-04-13 19:25:15 +01:00
jzmaddock
7c76ad97d8 complex/mpc: fix some test failures. 2018-04-02 19:28:21 +01:00
jzmaddock
8020ae0533 complex/mpc: reorganise build and test structure. 2018-04-01 19:20:36 +01:00
jzmaddock
5495b41f53 complex/mpc: test_move_mpfr fails for certain mpfr versions because our custom allocator functions are never called - just disable the test in this case as it's basically meaningless.
[CI SKIP]
2018-03-31 18:22:27 +01:00
jzmaddock
e6989777cf complex/mpc: Add overloads of real/imag setters for all the types supported by mpfr. 2018-03-31 11:34:49 +01:00
jzmaddock
24cb1375fd mpc/complex: Add real/imag setters.
[CI SKIP]
2018-03-31 11:09:29 +01:00
jzmaddock
e85952b4e8 complex/mpc: Add tests for Eigen compatibility. 2018-03-28 19:41:19 +01:00
jzmaddock
224212d1b3 complex/mpc: Fix some missing .template keywords. 2018-03-22 19:06:57 +00:00
jzmaddock
69249d8f22 complex/mpc/mpfr fix some more definitions. 2018-03-22 18:36:48 +00:00
jzmaddock
c68e8076b8 Complex/mpc: another try at fixing up the 2 argument constructor.
[CI SKIP]
2018-03-22 14:54:13 +00:00
jzmaddock
22789446f2 complex/mpc: There are no relational operators for complex types. 2018-03-21 20:17:17 +00:00
jzmaddock
1a32ade24c Complex/mpc: Add support for 2-arg construction from args of different types.
Add first cut at Eigen compatibility test suite.
2018-03-21 20:10:21 +00:00
Nick Thompson
3015d1401e [CI SKIP] No match for operator<= 2018-03-21 16:31:25 +08:00
Nick Thompson
62ad31c8da [CI SKIP] A couple more failing tests. 2018-03-21 11:06:50 +08:00
jzmaddock
d04aaa7f6d Fix type used in temporaries when expanding expression templates containing mixed expressions. 2018-03-19 20:06:59 +00:00
jzmaddock
26952775c6 complex/mpc: Add tests for poisoned operators, plus new test split split from sf_concept_check_beta_2.cpp. 2018-03-19 18:41:52 +00:00
jzmaddock
9255122b4f Merge branch 'complex' of https://github.com/boostorg/multiprecision into complex 2018-03-18 19:04:10 +00:00
jzmaddock
04b1191732 complex/mpc: add support for interconversions to and from std::complex. 2018-03-18 17:33:28 +00:00
Nick Thompson
458e2b90da [CI SKIP] One more failing test. 2018-03-18 20:44:38 +08:00
Nick Thompson
67505092d0 [CI SKIP] Test that the mixed arithmetic works. Add polar to the overload test. 2018-03-18 09:34:20 +08:00
jzmaddock
d0fc50fc4b Merge branch 'complex' of https://github.com/boostorg/multiprecision into complex 2018-03-17 19:50:10 +00:00
jzmaddock
4196c6ae62 Complex: Add support for single argument polar().
Update unary functions to handle case where we're creating a result type which is not the same as the function result type - for example when dealing with mixed scalar and complex arithmetic.
2018-03-17 19:08:36 +00:00
Nick Thompson
af73fe3672 Second failing overload. 2018-03-17 23:18:35 +08:00
Nick Thompson
4bcc02286f [ci skip] Add failing unit test for MPC overloads. 2018-03-17 23:02:11 +08:00
Nick Thompson
2144154954 Use literal ints rather than shifted negative values. 2018-03-17 15:23:34 +08:00
jzmaddock
8d2bd0a1d3 complex/mpc: Add value_type to class number, and overloads for polar function.
Split up one concept check that was generating over-large object file sizes.
2018-03-16 20:12:06 +00:00
jzmaddock
578f9cc7b9 complex/mpc: support the non-member complex functions norm/conj etc from non-complex types. 2018-03-14 20:13:51 +00:00
jzmaddock
35c7f80d37 complex/mpc: big name change search and replace. 2018-03-13 20:12:40 +00:00
jzmaddock
9a9a88b0e3 complex/mpc: test interaction with mpfr_float's and first fix on generic conversions to/from complex types. 2018-03-13 19:16:44 +00:00
Nick Thompson
5b3965b296 Remove warning on shifting negative value. 2018-03-13 15:36:32 +08:00
jzmaddock
cd3ee9e096 Merge branch 'develop' into complex
# Resolved Conflicts:
#	test/test_arithmetic.hpp
2018-03-12 18:35:38 +00:00
jzmaddock
3a5b6c3aa6 complex/mpc: another attempt at getting real/imag working with gcc. 2018-03-12 18:31:20 +00:00
jzmaddock
25474b49c8 Merge branch 'complex' of https://github.com/boostorg/multiprecision into complex 2018-03-12 18:11:43 +00:00
jzmaddock
2b18cecfff Complex/mpc: Fix up Jamfile. 2018-03-12 18:11:27 +00:00
John Maddock
9c891b7220 complex/mpc: finally get test case compiling with gcc/clang, though not yet the real() and imag() member functions. 2018-03-12 18:02:09 +00:00
jzmaddock
d4aa01f657 complex/mpc: begin fixing test failures. 2018-03-11 19:59:45 +00:00
jzmaddock
496ce3dbac complex/mpc: add hashing support, fix up a few gcc compile failures.
Add hashing support to concept checks and fix up most of the failures bar one obscure one.
2018-03-11 19:10:37 +00:00
jzmaddock
ead2781235 Complex/mpc: Add remaining non-member functions for complex types. 2018-03-11 12:55:47 +00:00
jzmaddock
032070a4df complex/mpc: more or less complete the transcendental functions. 2018-03-10 20:23:51 +00:00
jzmaddock
c441dca055 Complex/MPC: Start adding non-member functions.
Strip out more unneeded code from mpc.hpp.
2018-03-10 19:41:01 +00:00
jzmaddock
e94f507f64 complex/mpc: delete more irrelevant stuff and add initial support for real() and imag() accessors. 2018-03-10 13:41:55 +00:00
Nick Thompson
8867d6ca09 Swap out boost::math::gcd to boost::integer::gcd 2018-03-04 15:56:25 -08:00
jzmaddock
580905c528 Complex: Get arithmetic tests passing. 2018-03-04 18:31:17 +00:00
jzmaddock
a5ac1fbd4a Complex: mpc.hpp now compiles and passes test_arithmetic.hpp.
Disabled relational operators for complex types.
2018-03-04 17:53:38 +00:00
jzmaddock
d3f53c6c6d MPC: Get a few more things working. 2018-03-04 13:05:28 +00:00
jzmaddock
794a628590 Add initial search-and-replace version of mpc backend. 2018-03-04 09:37:28 +00:00
jzmaddock
0708fb99d3 cpp_int: incrementing to zero doesn't set the sign correctly.
Fix sign and add tests.
See https://github.com/boostorg/multiprecision/issues/43
2018-02-08 08:45:54 +00:00
jzmaddock
68ea8d6a40 Multiprecision: split up test_sf_import_c99.cpp some more to avoid over-large object files. 2017-12-30 18:11:31 +00:00
jzmaddock
b35f1c8f61 Multiprecision.Integer conversions: Enforce uniform error handling when converting out-of-range narrowing integer conversions.
See https://svn.boost.org/trac10/ticket/13109
2017-12-30 09:34:35 +00:00
jzmaddock
37c813f764 Multiprecision.generic interconversions: decimal to rational conversions need to treat 0 as a special case.
Fixes: https://svn.boost.org/trac10/ticket/13148
2017-12-27 19:40:03 +00:00
jzmaddock
1d19b31132 Multiprecision: begin to fix VC12 failures from last series of commits.... still one to go. 2017-12-27 19:38:08 +00:00
jzmaddock
8d04a03850 Multiprecision: Fix msvc-14.1 C++17 warnings. 2017-12-26 19:22:21 +00:00
jzmaddock
a4b198e1b7 Multiprecision.cpp_bin_float: Fix errors in exponent usage when exponent type is a long long.
See https://svn.boost.org/trac10/ticket/13264.
Fix previously unsupported situation: conversion of narrow cpp_bin_float to wider integer type.
See https://svn.boost.org/trac10/ticket/13301.
Improve test coverage for cpp_bin_floats with large exponent types, and/or dynamic allocators.
Fix issue in numeric_limits::max() that caused a complement of a signed integer number to be taken when the allocator is dynamic.
Fix heuristic in exp() function that caused a crazy number of iterations to be taken when the exponent was very large.
2017-12-26 17:54:41 +00:00
jzmaddock
9e4b524d00 Add test cases for fixed bugs. 2017-12-26 17:03:03 +00:00
jzmaddock
4daa1baf6d Multiprecision: disable explicit conversion operator if the target type is already constructible from *this.
Prevents ambiguity between the target types constructor and the conversion operator.
See https://github.com/boostorg/multiprecision/issues/30.
2017-12-25 18:07:48 +00:00
jzmaddock
d2ed3f881a Change expected value from logb(NaN) to largest/smallest value of the exponent type. 2017-06-12 09:11:13 +01:00
jzmaddock
e08fb96dce CI: Make serialization tests link-static on mingw.
Serialization lib is too often broken on that platform.
2017-06-05 13:13:15 +01:00
jzmaddock
4c36616841 CI: Fix some remaining issues:
* Build with --hash as otherwise command line gets too long on Windows machines.
* Disable tests that generate object files too large for gcc on windows.
* Split cpp_dec_float tests up a bit to reduce object file size.
* Use boost::int46_t not ::int64_t in test case.
* Disable test_arithmetic_backend_concept.cpp with original mingw32 which has issues fixed in mingw64.
2017-06-04 19:36:59 +01:00
jzmaddock
6a1ab1bc34 CI: Fix paths in appveryor.yml.
Add missing import to Jamfile.
Disable test_cpp_int_lit for older msvc when under CI testing (known failure).
2017-06-01 08:59:28 +01:00
jzmaddock
10efe3d169 Add test case for https://github.com/boostorg/multiprecision/issues/21
Add appveyor test coverage.
2017-05-31 19:31:35 +01:00
jzmaddock
841e1d71bb travis: move some test targets around trying to balance the load better.
Define CI_SUPPRESS_KNOWN_ISSUES when building and reduce the testing load when it's set.
2017-05-25 13:33:58 +01:00
jzmaddock
152ef49491 travis: still getting XCode timeouts, so split tests into smaller groups again. 2017-05-24 18:57:29 +01:00
jzmaddock
dd402577cc Travis: enable more tests,
move some tests between aliases as some OSX tests still time out.
2017-05-23 18:08:26 +01:00
jzmaddock
66f19e829e Fix warnings in sincos.ipp and test_round.cpp.
Move some targets out of the "conversions" alias to try to fix travis timeouts.
2017-05-23 13:38:06 +01:00
jzmaddock
2061889b77 Correct __float128 precision in cpp_bin_float.hpp
Enable some more travis tests.
2017-05-22 19:47:27 +01:00
jzmaddock
dbdda6aabc Update float128 support test to check Boost.Config.
Enable more tests for travis.
2017-05-22 19:00:24 +01:00
jzmaddock
63151ee01c Greatly simplify travis tests in the hopes they won't time out now... 2017-05-21 19:22:41 +01:00