2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 16:32:10 +00:00
Commit Graph

58 Commits

Author SHA1 Message Date
jzmaddock
141fcf0b15 Disable test case which invokes undefined behaviour 2017-04-06 11:34:08 +01:00
jzmaddock
7795ad3fd1 Merge branch 'gcd_polynomial' into gcd_cpp14 2017-04-06 11:28:32 +01:00
jzmaddock
f888dcb129 Including polynomial.hpp should get the gcd overloads as well. 2016-08-26 18:32:27 +01:00
Jeremy W. Murphy
64c887a3c9 Add overload of gcd() for polynomials with multi-precision integral coeffs.
And add a unit test to show that it works.
2016-08-25 23:02:03 +10:00
Jeremy W. Murphy
783dc6af46 Merge branch 'develop' into polynomial_ufd_gcd 2016-08-25 22:08:48 +10:00
Jeremy W. Murphy
f04643225a Define large integral test types for subresultant_gcd unit test. 2016-07-15 23:08:44 +10:00
Jeremy W. Murphy
2e024bd02d Merge branch 'polynomial_ufd_gcd' into polynomial_ufd_gcd_2
# Conflicts:
#	test/test_polynomial.cpp
2016-07-15 18:46:35 +10:00
Jeremy W. Murphy
579d6681bc Merge branch 'develop' into HEAD
# Conflicts:
#	test/test_polynomial.cpp
2016-07-15 18:42:53 +10:00
Jeremy W. Murphy
ce1d534414 Add case for zero to leading_coefficient and unit test. 2016-07-15 18:12:51 +10:00
Jeremy W. Murphy
208bd598e3 Tweak comment about normalization of result. 2016-07-15 18:05:31 +10:00
Jeremy W. Murphy
5ffcca3998 Remove Euclidean_gcd test; it's not relevant to this PR. 2016-07-15 18:05:14 +10:00
Jeremy W. Murphy
a27c8d5ad2 Consolidate merge further; test subresultant instead of Stein algorithm. 2016-07-15 18:00:06 +10:00
jzmaddock
cbb0cce89b Disable initializer_list support for GCC-4.4 as it doesn't fully support the new syntax and there appears to be no workaround. 2016-07-15 01:24:18 +01:00
Jeremy W. Murphy
6cf88b589e Grab test fixtures from another branch. 2016-07-14 18:38:38 +10:00
jzmaddock
2934670e51 Disable some tests for older msvc compilers. 2016-07-11 18:31:51 +01:00
Jeremy W. Murphy
6f5537d273 [polynomial] Move gcd code into a new file. 2016-06-20 09:58:39 +10:00
Jeremy W. Murphy
95d4976b86 [polynomial] Rename gcd_ufd to subresultant_gcd. 2016-06-19 15:37:42 +10:00
Jeremy W. Murphy
412f881740 [polynomial] Add more unit tests for gcd_ufd.
Also, remove short from the list of integral types tested because the
particular values tested in gcd_ufd require larger intermediate values.
2016-06-18 21:46:47 +10:00
Jeremy W. Murphy
7c705d6f10 [polynomial] Remove superfluous typedefs in unit test. 2016-06-17 23:14:22 +10:00
Jeremy W. Murphy
48e856cf34 Merge branch 'develop' into polynomial_ufd_gcd 2016-06-16 23:21:48 +10:00
Jeremy W. Murphy
d922f95fd5 Merge branch 'develop' into polynomial_ufd_gcd
# Conflicts:
#	include/boost/math/tools/polynomial.hpp
#	test/test_polynomial.cpp
2016-05-16 09:48:15 +10:00
Jeremy W. Murphy
94526e54c7 Merge branch 'develop' into polynomial_zero
# Conflicts:
#	test/test_polynomial.cpp
2016-05-15 21:03:12 +10:00
Kolya Matteo
42249f03e7 Simplify one and zero polynomial declarations 2016-05-13 09:06:36 -04:00
Jeremy W. Murphy
e608dc6657 Rename clear() to set_zero(). 2016-05-13 18:27:31 +10:00
Kolya Matteo
c7d7a0ce6e Add unit tests for polynomial pow 2016-05-11 15:05:13 -04:00
Jeremy W. Murphy
a737a3f5c2 operator bool() and clear(): test for zero and set to zero respectively.
Checking for zero or non-zero and setting to zero are common operations,
so fast implementations
2016-05-11 14:02:16 +10:00
jzmaddock
c9bf1df944 Merge branch 'polynomial_shift' of https://github.com/jeremy-murphy/math into develop
# Resolved Conflicts:
#	test/test_polynomial.cpp
2016-05-09 18:29:22 +01:00
jzmaddock
cace9b59de Merge branch 'gcd' into develop
# Resolved Conflicts:
#	test/test_polynomial.cpp
2016-05-09 18:15:54 +01:00
Jeremy W. Murphy
a56745b479 Merge branch 'develop' into polynomial_ufd_gcd
# Conflicts:
#	test/test_polynomial.cpp
2016-05-07 18:32:42 +10:00
Jeremy W. Murphy
a822400320 Merge branch 'develop' into polynomial_shift
# Conflicts:
#	test/test_polynomial.cpp
2016-05-07 18:27:46 +10:00
Kolya Matteo
3d3a1f8d2a Add tests for polynomial normalization with initializer lists (so the highest-degree term is nonzero) 2016-05-02 14:06:18 -04:00
Kolya Matteo
ece2283833 Add polynomial self-multiply-assign test case 2016-05-02 13:46:06 -04:00
Jeremy W. Murphy
d484fa657c Remove inferior generalized gcd; include integral size promotion. 2016-04-20 22:53:56 +10:00
Jeremy W. Murphy
dc81bc8e6e Add 4.6.1E, generalized gcd.
Should be useful for cross-validating 4.6.1C.
2016-04-20 01:38:05 +10:00
Jeremy W. Murphy
4dc7c31f48 Extra test for gcd of polynomial over ufd. But is it correct? 2016-04-18 01:46:43 +10:00
Jeremy W. Murphy
aa19132d74 4.6.1C: Greatest common divisor over a unique factorization domain. 2016-04-17 14:21:01 +10:00
Jeremy W. Murphy
573b9fc399 content and primitive_part of a polynomial over a ufd. 2016-04-15 13:14:18 +10:00
Jeremy W. Murphy
e963c67af2 Normalize after left-shift assignment to prevent denormalized zeroes. 2016-04-10 01:27:36 +10:00
jzmaddock
11500b787b Merge branch 'polynomial_shift' of https://github.com/jeremy-murphy/math into gcd
# 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-04-06 17:58:21 +01:00
Jeremy W. Murphy
238cd6078b polynomial: odd/even predicates.
We use the definition of odd and even consistent with considering x as the
smallest prime factor. That is, an even polynomial has a constant of zero.
2016-03-28 16:04:27 +11:00
Jeremy W. Murphy
e9da8a10bf polynomial: Left and right shift operators.
Shifting adds or removes a factor of x in the same way that shifting adds
or removes a factor of 2 to integers.
2016-03-27 22:03:33 +11:00
jzmaddock
65f7440c2f Minor fixes for polynomial division:
* Use Boost.Config macros not direct checks on C++ version.
* Use dedicated integer power function - fixes VC10 build failure, also prevents loss of digits when integer type is wider than double.
2016-03-02 19:37:46 +00:00
Jeremy W. Murphy
93a0ff967d Use the strictly correct brace initializer_list construction. 2016-03-02 13:38:36 +11:00
Jeremy W. Murphy
7969de6fae Add C++11 initializer_list constructor and assignment to polynomial class. 2016-01-31 19:04:37 +11:00
Jeremy W. Murphy
0e4bfc9f8e Test cpp_int, cpp_rational, cpp_bin_float_single and cpp_dec_float_50. 2016-01-16 14:54:00 +11:00
Jeremy W. Murphy
99e6e2c3cb A better and more instructive unit test for gcd. 2015-12-11 11:58:33 +11:00
Jeremy W. Murphy
c313aed73b Explicitly cast right-hand argument to avoid MSVC C2666. 2015-11-28 09:00:21 +11:00
Jeremy W. Murphy
292bfc6752 Denormalize zero in multiplication to fit algorithmic requirements.
Fixes bug introduced by normalizing zero to the empty set.
2015-11-20 11:33:00 +11:00
Jeremy W. Murphy
e459241687 Use a different polynomial to test arithmetic relations.
This one appears to reveal a bug in operator *=.
2015-11-19 09:08:27 +11:00
Jeremy W. Murphy
e6e1e9440b Make the single-argument constructor explicit.
Prevent unexpected conversion to polynomial!
2015-11-18 12:15:35 +11:00