2
0
mirror of https://github.com/boostorg/math.git synced 2026-02-13 12:32:15 +00:00
Commit Graph

1827 Commits

Author SHA1 Message Date
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
jzmaddock
993cdcb42e Reduce dependencies by removing all use of Boost.Format.
We made only cursory use of the lib, so it's just as easy to do with it.
Also fixed a number of missing #includes which were hidden by including format.hpp.
2016-05-09 11:38:13 +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
Jeremy W. Murphy
e3101bc0eb Return pair of <T, I> that includes the termination position. 2016-05-07 14:33:35 +10:00
Jeremy W. Murphy
df8c6584dc Rename gcd_n to gcd_range. 2016-05-07 10:58:43 +10:00
Kolya Matteo
8336375c78 Fix corner cases for raise_error
This enables raise_error to work when no %1% appears in the `function` or
`message` parameters and for types without numeric_limits specializations.
Also removes misformat when BOOST_NO_RTTI is defined.
2016-05-05 18:10:43 -04:00
Kolya Matteo
430239841d Add missing normalization in polynomial initializer_list assignment 2016-05-02 14:08:25 -04:00
Kolya Matteo
589a18f63f Don't assume default-constructibility 2016-05-02 09:52:41 -04:00
Kolya Matteo
627a4cedfd Multiply into a new vector and swap 2016-05-01 23:55:28 -04:00
Kolya Matteo
9c8e3f2d4b Fix self-multiply-assign by backing down 2016-05-01 23:18:50 -04:00
Kolya Matteo
ca07aa8a0a Fix indefinite hang with p *= p 2016-05-01 20:47:54 -04:00
Jeremy W. Murphy
2168585e98 Compute delta as late as possible. 2016-04-27 12:13:49 +10:00
Jeremy W. Murphy
8e25e0a487 Improve comments, remove superfluous using directive. 2016-04-27 12:12:20 +10:00
Jeremy W. Murphy
60d6a05d2c Prefer immediate return to goto. 2016-04-22 13:32:34 +10: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
jzmaddock
1ef4bb6490 Add mixed binary algorithm plus gcd_traits class with bitscan support. 2016-04-18 13:50:01 +01: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
5bfe2a7b15 Efficient conversion to bool.
This will save a lot of (x == zero_element<...>(...)) syntax that is not
only unwieldy but inefficient.
2016-04-17 13:42:50 +10:00
Jeremy W. Murphy
d6dd40def6 Contextual comment and zero case for pp(). 2016-04-15 14:17:42 +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
b3d398636c gcd_n: Further comments. 2016-04-15 07:29:38 +10:00
Jeremy W. Murphy
af28716e31 Algorithm description. 2016-04-14 22:58:46 +10:00
Jeremy W. Murphy
5b8c448ce0 gcd of n values. 2016-04-14 14:22:12 +10:00
jzmaddock
e9bafa3236 We need some using std::swap declarations. 2016-04-12 18:35:01 +01:00
Jeremy W. Murphy
e963c67af2 Normalize after left-shift assignment to prevent denormalized zeroes. 2016-04-10 01:27:36 +10:00
jzmaddock
07f5e1666b Get the tests passing with Jeremy's new gcd. 2016-04-06 19:16:47 +01:00
jzmaddock
9f5d39c5e1 Merge branch 'gcd_revamp' of https://github.com/jeremy-murphy/math into gcd
# Fixed Conflicts:
#	reporting/performance/test_gcd.cpp
#	test/test_gcd.cpp
2016-04-06 18:09:45 +01: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
473cc9f209 Use std::numeric_limits rather than Boost's built-in type_traits.
The Boost type traits are too strict about what qualifies as a signed
number.
2016-04-05 09:48:15 +10:00
Jeremy W. Murphy
fd11b9a4da Use <<= rather than <<. 2016-04-05 09:44:28 +10:00
Jeremy W. Murphy
232a64424f Use unqualified swap to allow ADL. 2016-04-05 09:41:59 +10:00
Jeremy W. Murphy
11e502b4ac New gcd implementation. 2016-04-04 18:36:53 +10:00
Jeremy W. Murphy
cff8705458 Consistent white space. 2016-03-28 16:08:04 +11: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
Jeremy W. Murphy
521ee8a0af Use the template parameter N and container's size_type. 2016-03-08 19:24:45 +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
jzmaddock
2ed1361e73 Merge branch 'polynomial_initializer_list' of https://github.com/jeremy-murphy/math into develop 2016-03-02 18:47:11 +00:00
jzmaddock
7cecd8ddf4 Fix up mpfr support 2016-02-05 13:59:45 +00: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
0fae5d590a Explicitly specify the return type for Boost lambda on * and /.
Appears that return type deduction failed for multiprecision types.
2016-01-16 14:51:35 +11:00
jzmaddock
8e7660e909 Merge branch 'develop' of https://github.com/boostorg/math into develop 2016-01-10 11:51:38 +00:00
jzmaddock
1adea9929f Add missing inline declarations.
See https://svn.boost.org/trac/boost/ticket/11892.
2016-01-10 11:51:24 +00:00
Kohei Takahashi
fbd1393858 Qualify std:: for isnan in some situation.
Because isnan is implemented as a macro and libstdc++ undef it within
<cmath> (at least FreeBSD 10).
2016-01-06 19:39:55 +09:00
jzmaddock
74ff2db959 Change <quadmath.h> config to not use it at all if we don't have __has_include as GCC may be configured with --disable-libquadmath but still signal that it supports __float128 2016-01-01 16:49:48 +00:00
jzmaddock
587eb660aa Merge branch 'develop' of https://github.com/boostorg/math into develop 2015-12-14 18:03:22 +00:00
jzmaddock
b04e78b79e Fix msvc warnings. 2015-12-14 18:03:05 +00:00