John Maddock
af494a898b
Add support for integer square roots.
...
[SVN r85184]
2013-08-01 17:50:17 +00:00
John Maddock
87fb76c1be
Reorganise bit scanning code.
...
Add tests for msb function.
[SVN r84972]
2013-07-07 15:29:01 +00:00
John Maddock
f2821a0231
Fix left shift operator.
...
Fixes #8741 .
[SVN r84925]
2013-07-01 17:06:12 +00:00
John Maddock
5245fd31e2
Fix bug in division of zero.
...
Document and add tests.
Fixes #8160 .
[SVN r83128]
2013-02-24 13:20:46 +00:00
John Maddock
1ef61ef160
Fix bug in subtraction routine that leads to -0 rather than 0.
...
Add test cases.
Fixes #8145 .
[SVN r83103]
2013-02-23 17:22:18 +00:00
John Maddock
4a43b9ef8e
Fix bug in subtraction of a limb_type.
...
Fix bug in division/modulus algorithms that results in incorrect sign when source and destination overlap.
Tweak performance of GCD algorithms.
Add test cases for bug reports.
Fixes #8133 .
Fixes #8126 .
[SVN r83080]
2013-02-22 10:37:36 +00:00
John Maddock
3111e69084
Fix sign of division in cpp_int when the values are small enough to fit in a double_limb_type.
...
Add test cases for above.
Fixes #8126 .
[SVN r83060]
2013-02-21 13:05:41 +00:00
John Maddock
97ba7d573f
Fix bug that causes division by single limb to fail when the remainder is zero and the least significant limb of the quotient is 1.
...
Fixes #7878 .
[SVN r82460]
2013-01-12 10:51:46 +00:00
John Maddock
27599ca09e
Apply patch for typos.
...
Regenerate docs.
Fixes #7806 .
[SVN r82073]
2012-12-18 11:28:04 +00:00
John Maddock
08fdb31fa2
Add some optimisation to gcd/lcm/lsb and cpp_int:
...
Use compiler intrinsics where possible for lsb.
Switch to using native integers when the values get small enough for gcd.
Re-run the performance tests and regenerate the docs.
Also change the series evaluation limits to make them depend on the precision in pow.hpp and trig.hpp.
[SVN r81946]
2012-12-14 18:37:27 +00:00
John Maddock
bfd897f5d8
Fix some more GCC warnings and make compiles faster for slow compilers (Intel)
...
[SVN r81710]
2012-12-04 19:28:46 +00:00
John Maddock
c77b46b4da
Add missing -= operator to tests.
...
[SVN r81622]
2012-11-29 11:04:22 +00:00
John Maddock
114aeb386b
Simply enable_if usage in cpp_int_backend: try to fix Intel-11 failures.
...
Improve test_cpp_int.cpp.
Improve config tests.
[SVN r81487]
2012-11-22 17:21:01 +00:00
John Maddock
09f3928f5a
Fix clang failures
...
[SVN r81464]
2012-11-21 17:54:50 +00:00
John Maddock
645fe8865c
Add tests for checked ints and fix failures.
...
Make negating an unsigned int an error, and fix resulting test failures.
Change allocator defaults to be void when the allocator is not actually required.
[SVN r81070]
2012-10-27 17:48:33 +00:00
John Maddock
a857186cb4
Big "blow it away and start again" refactoring of cpp_int.
...
Adds support for runtime checking, enumerated template params, fixed precision with allocator, and no "hidden" template parameters.
[SVN r81054]
2012-10-24 16:00:05 +00:00
John Maddock
af9e0c2fe7
Add more explicit constructors and tests for them.
...
Centralise digits10 to digits2 conversions.
[SVN r80112]
2012-08-21 14:42:15 +00:00
John Maddock
b892e3f5ab
Big breaking change - make lossy construction explicit.
...
[SVN r80058]
2012-08-16 08:13:51 +00:00
John Maddock
e2ef393c23
Big search and replace rename, removing mp_ prefix.
...
[SVN r79932]
2012-08-08 18:14:50 +00:00
John Maddock
19ee491c55
Add noexcept support/markup where possible.
...
[SVN r79331]
2012-07-07 11:16:28 +00:00
John Maddock
ebd7502fdc
Enhance pow and powm tests.
...
Quash some warnings.
Fix the IO tests on GCC.
[SVN r78423]
2012-05-11 17:19:13 +00:00
John Maddock
a8c73aea66
Change non-member functions to be protected by enable_if based on the type of the number.
...
Extend expression templates to 4 arguments.
Add pow and powm functions for integer types.
Update docs to match.
[SVN r78401]
2012-05-10 09:20:26 +00:00
John Maddock
4c6065717b
Add a few more integer specific bit-fiddling functions.
...
Fix some bugs in cpp_int left shift code.
Document some missing backend API's, and update docs.
[SVN r77583]
2012-03-27 11:45:01 +00:00
John Maddock
24cff33935
Update Miller Rabin test to use small prime filtering.
...
Add some new integer type operations.
Update performance tests to match.
[SVN r77451]
2012-03-21 09:19:57 +00:00
John Maddock
2349943cdb
Fix some GMP int errors, and simplify modulus code.
...
Fix some cpp_int errors.
Improve cpp_int tests.
[SVN r77362]
2012-03-17 19:43:26 +00:00
John Maddock
b42208c5df
Fix several division algorithm bugs.
...
Add cpp_rational to performance tests.
Add modular arithmetic test to test cases.
[SVN r77303]
2012-03-11 16:43:31 +00:00
John Maddock
5500ad3ea8
Add support for fixed precision and unsigned cpp_int's.
...
[SVN r77260]
2012-03-08 10:34:37 +00:00
John Maddock
bea3707326
Add initial version of an arbitrary precision integer type.
...
Hook up some more fixed_int tests.
[SVN r77141]
2012-02-29 13:05:51 +00:00