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
pabristow
7a7d3321fe
Moved polystuff to tools, added JWM as author and numerous minor edits
2015-12-14 16:13:05 +00:00
jzmaddock
c36506f852
Merge pull request #17 from jeremy-murphy/polynomial_division
...
Polynomial division
2015-12-13 12:06:00 +00:00
Jeremy W. Murphy
25ed0ffbca
Negation depends only on negation, not on multiplication.
2015-12-13 12:15:09 +11:00
jzmaddock
56f74cbfe9
Fix msvc warning.
2015-11-27 18:52:54 +00:00
Jeremy W. Murphy
09dd190e5a
Move identity transformation into detail namespace.
2015-11-21 14:28:39 +11:00
Jeremy W. Murphy
6773baf318
Move arithmetic implementation into private functions.
...
Primarily so that they can be used inside loops where normalization is not
required or is even erroneous.
2015-11-21 14:26:00 +11:00
Jeremy W. Murphy
f8d6220e4e
More documentation updates and parameter name consistency.
2015-11-20 12:06:13 +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
e6e1e9440b
Make the single-argument constructor explicit.
...
Prevent unexpected conversion to polynomial!
2015-11-18 12:15:35 +11:00
Jeremy W. Murphy
37e8063420
Add missing heterogeneous division operators.
2015-11-18 12:14:45 +11:00
jzmaddock
477ab19672
Restrict use of __float128 to cases where quadmath.h is available
2015-11-16 18:35:16 +00:00
Jeremy W. Murphy
87268a735a
Division of polynomials over integers.
...
Test int and double throughout most of test suite.
2015-11-16 00:41:37 +11:00
Jeremy W. Murphy
b981995cc0
Replace synthetic division with algorithm D from Knuth.
...
Simpler, specific to division of polynomials over a field.
2015-11-15 14:08:40 +11:00
jzmaddock
e8c74af768
Fix error in cyl_neumann(2, x) introduced by previous reorganisation.
2015-11-11 19:19:11 +00:00
jzmaddock
3f342bfa60
More MacOS fixes: apply fixes from main template to <double> specialization.
2015-11-11 17:49:50 +00:00
jzmaddock
7a84f91de1
Merge branch 'develop' of https://github.com/boostorg/math into develop
2015-11-10 12:47:26 +00:00
jzmaddock
824c28f09f
Another try at getting MacOS tests passing.
2015-11-10 12:47:06 +00:00
Jeremy W. Murphy
94e961ec7c
Division and modulus by a number.
...
Test that multiplication by 0.5 is equal to division by 2.
2015-11-09 00:43:29 +11:00
Jeremy W. Murphy
3c147eb77a
Revert "is_field_like checks that type T is not integral, nor complex, and has /=."
...
This reverts commit 9c6d10644b .
2015-11-09 00:15:48 +11:00
Jeremy W. Murphy
9c6d10644b
is_field_like checks that type T is not integral, nor complex, and has /=.
2015-11-07 22:36:38 +11:00
Jeremy W. Murphy
115585481c
Merge remote-tracking branch 'refs/remotes/jeremy/polynomial_division' into polynomial_division
2015-11-05 00:02:31 +11:00
Jeremy W. Murphy
ec913ea3df
Multiplicative identity element.
2015-11-05 00:02:24 +11:00
Jeremy Murphy
4510ecaa8a
Disable division and remainder for integer types.
...
Use std::numeric_limits<T>::is_integer.
Also removed the "unchecked_" prefix from synthetic_division.
2015-11-04 20:17:06 +11:00
Jeremy W. Murphy
cb36a289e3
Simplify addition: there is actually no need to check for zero.
...
The likely frequency of zero makes it silly to check for it.
2015-11-04 12:24:31 +11:00
Jeremy W. Murphy
72f35334d3
Unary minus (negate) operator.
2015-11-03 23:57:11 +11:00
Jeremy W. Murphy
babd53e857
Multiplication bugfixes for zero.
2015-11-03 23:56:53 +11:00
Jeremy W. Murphy
cba0dc6e7e
Throw logic_error for degree() if size() == 0.
...
Use size() in place of degree() internally.
2015-11-03 23:55:37 +11:00
Jeremy W. Murphy
066885dc5a
Whoops, need sign function for addition of constant values too.
2015-11-03 14:43:03 +11:00
Jeremy W. Murphy
b39391cb02
Change exception to assertion (according to my design philosophy).
2015-11-02 23:42:13 +11:00
Jeremy W. Murphy
fed9a626be
Rename linear_translation to addition.
2015-11-02 23:24:06 +11:00
Jeremy W. Murphy
964c49c70e
Generalize addition and subtraction of constant values.
...
Simplify the implementation by not checking for infrequent cases.
2015-11-02 23:23:47 +11:00
Jeremy W. Murphy
38edca726d
Rename remove_high_degree_zeroes to normalize.
2015-11-02 23:04:32 +11:00
Jeremy W. Murphy
eaa54b1bab
remove_high_degree_zeroes(): trim zeroes from the right of m_data.
2015-11-01 16:01:26 +11:00
Jeremy W. Murphy
2479c2ae90
Fixed some installation problems, now lambda works.
2015-11-01 13:25:46 +11:00
Jeremy W. Murphy
f6d014d15e
Tidying up and trying out algorithmic forms of loops.
2015-11-01 12:49:24 +11:00
Jeremy W. Murphy
739c056f2b
Enforce representation of zero polynomial as {}, not {0}.
...
Simplify addition and subtraction into one function.
Add short-circuit logic for zero to arithmetic.
2015-11-01 03:38:13 +11:00
Jeremy W. Murphy
6080afee77
Fix quotient_remainder to use the correct ordering of coefficients.
...
Add equality operator and zero_element() for multiplication.
2015-11-01 03:28:59 +11:00
pabristow
57a71ba5f8
#11768 : Skewness formula for triangular distribution corrected, tests added and docs updated.
2015-10-29 18:19:46 +00:00