Jeremy W. Murphy
|
db07507a75
|
Minor doc change to parameter names.
|
2015-12-11 11:56:56 +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
|
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
|
e7df87d3c6
|
Minor update to documentation.
|
2015-11-20 11:58:17 +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 |
|
Jeremy W. Murphy
|
37e8063420
|
Add missing heterogeneous division operators.
|
2015-11-18 12:14:45 +11:00 |
|
Jeremy W. Murphy
|
cca7e08d3f
|
Make an explicit note of which unit tests currently fail.
|
2015-11-17 10:17:30 +11:00 |
|
Jeremy W. Murphy
|
c92a89c6a6
|
Update documentation.
|
2015-11-17 10:15:42 +11: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 |
|
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 Murphy
|
6ee7f90bf8
|
Typedef the coefficient type.
|
2015-11-04 20:15:38 +11:00 |
|
Jeremy W. Murphy
|
ec764814a0
|
Update class interface documentation.
|
2015-11-04 12:25:46 +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
|
ac2943e053
|
Unit tests for arithmetic in general, especially for zero.
|
2015-11-03 23:59:29 +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
|
5cbeac0297
|
Update unit test; enable in Jamfile.
|
2015-11-01 16:11:53 +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 |
|
Jeremy W. Murphy
|
03de702ee5
|
Unit testing...
|
2015-10-28 22:27:13 +11:00 |
|
Jeremy W. Murphy
|
f8fc1e4e35
|
Start making a unit test.
|
2015-10-27 10:35:06 +11:00 |
|
Jeremy W. Murphy
|
86a92e2602
|
Use Boost.Operators for dividable and modable.
|
2015-10-27 08:53:51 +11:00 |
|
Jeremy W. Murphy
|
1fd285721c
|
Add some post-condition assertions.
|
2015-10-25 14:55:39 +11:00 |
|
Jeremy W. Murphy
|
240e4e6e0f
|
Separate out into unchecked_synthetic_division().
|
2015-10-25 12:05:32 +11:00 |
|
Jeremy W. Murphy
|
35041b318c
|
Add / and %.
|
2015-10-25 10:49:47 +11:00 |
|
Jeremy W. Murphy
|
cf840c4ce2
|
First draft of working quotient_remainder.
|
2015-10-25 01:46:20 +11:00 |
|
jzmaddock
|
a7a0117859
|
Tentative VC7.1 fix.
|
2015-10-22 10:51:04 +01:00 |
|
jzmaddock
|
cb33d01b00
|
Adjust minimax code to work with Boost.Multiprecision.
|
2015-10-22 10:13:37 +01:00 |
|
jzmaddock
|
5d42feb5c1
|
Reduce conceptual requirements on log_min_value/log_max_value.
|
2015-10-22 10:12:55 +01:00 |
|
jzmaddock
|
678d2e8383
|
Doc version update.
|
2015-10-15 10:39:36 +01:00 |
|
jzmaddock
|
aaa8a36a7e
|
Fix some gcc-5.1.0 warnings
|
2015-09-24 11:12:11 +01:00 |
|