Commit Graph

149 Commits

Author SHA1 Message Date
John Maddock
2ea2ab8a2b Add better rvalue reference support to the non-expression template operators.
Add numeric_limits member definitions.

[SVN r79187]
2012-06-30 16:48:17 +00:00
John Maddock
1a4e3af5c8 Fix Linux x64 errors
[SVN r79165]
2012-06-29 11:53:25 +00:00
John Maddock
f09ead8e37 Some file renaming and fixes from Steven Watanabe's comments.
[SVN r79141]
2012-06-27 18:25:10 +00:00
Christopher Kormanyos
a6a4ff0c5e Improve the pow_imp function with the S-and-X binary method (Knuth, Vol 2, 4.6.3).
[SVN r79092]
2012-06-25 21:17:27 +00:00
John Maddock
ea4ff852c6 Fix valgrind spotted bug in cpp_int subtraction routine.
Add missing numeric_limits members.
Fix GCC warning in gmp.hpp.

[SVN r78953]
2012-06-15 09:10:47 +00:00
John Maddock
e0a8f821c5 Change BOOST_MP_NOEXCEPT to BOOST_NOEXCEPT.
Add some missing #includes.

[SVN r78943]
2012-06-14 10:26:15 +00:00
John Maddock
f543ec2639 Address doc concerns of Vincente Botet Escriba in pre-review comments.
Rebuild docs.

[SVN r78807]
2012-06-04 17:50:57 +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
Christopher Kormanyos
62c5ef6ca0 Switched erroneous use of old enum_fpclass to correct new fpclass_type.
[SVN r78363]
2012-05-06 20:42:55 +00:00
John Maddock
d2bc0f90f7 Change non-member functions to use enable_if so they're restricted to the number type to which they apply (better error messages). Enhance concept checks to check things which weren't previously tested.
[SVN r78321]
2012-05-04 08:20:33 +00:00
Christopher Kormanyos
0279459351 Ensure that potentially truncated digit counts in cpp_dec_float are properly used.
[SVN r78105]
2012-04-20 23:17:48 +00:00
Christopher Kormanyos
9ee0022c77 Re-factor cpp_dec_float class constants.
Extend cpp_dec_float low-digit range from 30 to 9.
Removed temporary storage from cpp_dec_float multiply routine.
Extended tests to 9, 18 and (sqrt test) to 1000 digits.

[SVN r78097]
2012-04-20 20:05:49 +00:00
John Maddock
b6d6d5ea01 Fix __int128 selection logic
[SVN r78034]
2012-04-17 09:20:47 +00:00
John Maddock
1f15fc5ad9 Deleted some dead files, moved some others around.
[SVN r78014]
2012-04-16 16:28:57 +00:00
John Maddock
538415e0ef Correct wrong function-call argument in docs.
Change max_digits10 in numeric_limits<cpp_dec_float> to include all the *possible* digits.

[SVN r77996]
2012-04-15 17:46:42 +00:00
Christopher Kormanyos
a53f4f3fee - Re-factor constants in cpp_dec_float.hpp.
- Tighten up tolerance on multiply, do trivial cleanup in cpp_dec_float.
- Change digit progression in iteration in sqrt and atan.

[SVN r77983]
2012-04-15 09:27:55 +00:00
John Maddock
462bec3925 Fix ldexp/frexp in default_ops.hpp. Improve 64-bit platform detection in cpp_int_core.hpp. Get examples building with GCC
[SVN r77971]
2012-04-14 16:51:02 +00:00
John Maddock
b424123c9d Fix GCC compile failure
[SVN r77783]
2012-04-05 17:20:50 +00:00
John Maddock
cd398028e8 Add static assert to protect multiplication algorithm from excessive limb counts.
[SVN r77775]
2012-04-05 08:22:20 +00:00
John Maddock
19113e841a Correct logic to detect when string representation has enough bits.
[SVN r77774]
2012-04-05 07:54:09 +00:00
John Maddock
d98d1ccf7d Change max_digits10 to allow some headroom for subsequent calculations.
[SVN r77759]
2012-04-04 17:10:39 +00:00
John Maddock
68a4a87438 Add string versions of constants for faster (and more accurate) constant initialization.
[SVN r77758]
2012-04-04 17:04:00 +00:00
John Maddock
3913771ea0 Change cpp_dec_float string conversion to generate a better error message when conversion fails.
Add generic inter-conversions and tests for them.
Fix bug in cpp_int convert_to.

[SVN r77630]
2012-03-29 18:00:06 +00:00
John Maddock
0cc1c727d8 Squash some more MSVC level 4 warnings.
[SVN r77625]
2012-03-29 12:28:16 +00:00
John Maddock
ead32b9563 Squash some MSVC level 4 compiler warnings.
[SVN r77623]
2012-03-29 09:12:08 +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
366ec67ddc Fix GCC Random number and Miller Rabin build errors.
[SVN r77478]
2012-03-22 17:32:43 +00:00
John Maddock
f657a2fd59 Remove dead statement
[SVN r77475]
2012-03-22 13:27:12 +00:00
John Maddock
6ead744223 Fix fixed precision ints to work with non obvious bit counts.
[SVN r77473]
2012-03-22 11:54:15 +00:00
John Maddock
8433c69175 Disable expression templates for fixed precision types.
Restrict integer functions to integer types.
Improve Miller Rabin performance by filtering out small primes etc.
Improve Miller Rabin tests.
Change mp_int to tom_int to avoid conflict with global ::mp_Int type.

[SVN r77471]
2012-03-22 10:29:30 +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
6deafa525b Fix bug in cpp_int shown up by random number generations and change example to use it.
[SVN r77359]
2012-03-17 13:23:32 +00:00
John Maddock
45a08da90e Add simple version of the Miller Rabin test
[SVN r77353]
2012-03-17 09:18:20 +00:00
John Maddock
0f6a527cee Add random number support.
[SVN r77344]
2012-03-15 18:41:00 +00:00
John Maddock
fe94baae50 Allow construction/assignment from expression templates that yield a different type to *this.
[SVN r77340]
2012-03-15 10:47:48 +00:00
John Maddock
d82fa61c81 Mostly remove references to fixed_int.
Update docs.

[SVN r77335]
2012-03-14 18:23:44 +00:00
John Maddock
e1b23af8f5 Add files missing from last commit, and add new examples to tests.
[SVN r77324]
2012-03-13 18:40:52 +00:00
John Maddock
7bed8d02f9 Add support for disabling expression templates via a second template parameter to mp_number.
Begin to update docs to reflect new cpp_int code.

[SVN r77323]
2012-03-13 18:30:18 +00:00
John Maddock
5caa15f798 Reorganisation: rename methods "eval_foo" rather than "foo" to avoid conflict with classes of the same name (GCC bug).
Move backends into sub-namespaces to avoid namespace pollution.

[SVN r77312]
2012-03-12 09:18:44 +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
2178bef843 Fix some bugs in division and addition code
[SVN r77266]
2012-03-08 17:54:28 +00:00
John Maddock
b680077687 enable 128-bit arithmetic on x64 systems.
[SVN r77265]
2012-03-08 16:56:32 +00:00
John Maddock
78cfa00b07 Fix Clang failure.
[SVN r77262]
2012-03-08 13:17:13 +00:00
John Maddock
c82710fee6 Fix gcc compiler errors.
[SVN r77261]
2012-03-08 13:01:36 +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
6e494e59fd Begin refactoring cpp_int code.
[SVN r77180]
2012-03-03 18:39:37 +00:00
John Maddock
8f0e6e12b2 Fix range error
[SVN r77175]
2012-03-03 15:25:35 +00:00
John Maddock
d45e66bc36 Improve subtract performance.
[SVN r77156]
2012-03-02 18:41:33 +00:00