Commit Graph

112 Commits

Author SHA1 Message Date
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
John Maddock
f2cb591acc Fix a few GCC C++0x warnings and errors
[SVN r77143]
2012-02-29 18:26:34 +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
John Maddock
fda499be43 Fix memory leaks / bugs in mpq_t and tommath support.
[SVN r77140]
2012-02-29 10:42:23 +00:00
John Maddock
eb631b8291 Fix some multiple initializations of mpz_t.
[SVN r77128]
2012-02-27 17:10:46 +00:00
John Maddock
1b73913249 Fix some C++0x errors.
[SVN r77088]
2012-02-21 18:19:02 +00:00
John Maddock
8d6dedf4b0 Complete renaming of cpp_float to cpp_dec_float.
Rebuild docs.

[SVN r77037]
2012-02-16 09:36:26 +00:00
John Maddock
380d627359 Big search and replace: change cpp_float to cpp_dec_float.
Also fix up some numeric_limits test failures.

[SVN r77032]
2012-02-15 13:09:45 +00:00
John Maddock
d69424adad Fix bug in fixed_int::convert_to with negative numbers.
Fix bug in fixed_int shift operator when shifting by 0.
Add preliminary gcd/lcm support for integer types.
Add static asserts to floating-point only functions.

[SVN r76706]
2012-01-26 10:11:10 +00:00
John Maddock
4b844fc60c Improve performance of fixed_int divide and string conversion.
Add mixed integer ops to fixed_int.
Improve fixed_int test cases.
Add improved default forwarding functions that preserve arithmetic type arguments.
Fix some operator overloads.
Update performance tests.

[SVN r76639]
2012-01-22 19:12:37 +00:00
John Maddock
a7d4ab19fb Tweak division and string conversion routines for better performance - sadly we're still way behind GMP on these (though better than libtommath).
[SVN r76609]
2012-01-21 13:12:56 +00:00
John Maddock
a53f46637e Fix Linux 64 failures
[SVN r76593]
2012-01-20 17:15:22 +00:00
John Maddock
3c13b7a4d1 Add missing file.
Fix some inconsistent uses of long long and intmax_t.

[SVN r76573]
2012-01-18 12:16:20 +00:00
John Maddock
ca5a793b3d Rejig intmax_t and long long usage to be much more consistent.
[SVN r76550]
2012-01-17 13:06:33 +00:00
John Maddock
c98f15f30d Update docs with performance results.
Add component based initialization of rationals.

[SVN r76486]
2012-01-14 13:24:52 +00:00
John Maddock
a7d480c438 Optimize increment and decrement.
[SVN r76434]
2012-01-12 17:03:27 +00:00
John Maddock
a97c3bd896 Update docs to include fixed_int.hpp.
Remove 64-bit versions of fixed_int typedefs - better to use boost::int64_t instead.

[SVN r76433]
2012-01-12 13:56:22 +00:00
John Maddock
e5c5802d9f Tidy up type usage.
[SVN r76431]
2012-01-12 12:29:52 +00:00
John Maddock
036dc2bacc Rename files.
[SVN r76429]
2012-01-12 12:06:27 +00:00
John Maddock
db83a1c4ad Tentative rename of packed_cpp_int to fixed_int.
[SVN r76428]
2012-01-12 11:55:09 +00:00
John Maddock
8c28b89dfc Fix GCC failures and generally improve performance of packed_cpp_int.
[SVN r76409]
2012-01-11 11:53:49 +00:00
John Maddock
99707d8925 Switch to faster division code and add better test case for packed int's.
[SVN r76398]
2012-01-10 13:20:29 +00:00
John Maddock
8dec0e4db6 Add initial performance test program for testing basic arithmetic.
Fix header include on packed_cpp_int.hpp and add numeric_limits min/max values.

[SVN r76279]
2012-01-02 17:45:49 +00:00
John Maddock
9a1f7c14a5 Update special functions performance test and add generic lanczos support to floating point types.
[SVN r76252]
2012-01-01 11:37:46 +00:00
John Maddock
30310e4a52 Another Boost.Rational fix.
Add tentative version of a fixed width, bit-packed 2's complement integer type.

[SVN r76234]
2011-12-30 18:21:08 +00:00
John Maddock
d7578f242c Add numerator/denominator accessor functions to rational_adapter.hpp.
Define predefined rational number type for libtommath.
Add rational number specific tests to test_arithmetic.cpp.
Document rational_adapter and related stuff, regenerate docs.

[SVN r76130]
2011-12-24 13:13:16 +00:00
John Maddock
c32e35aace Fix File IO and string conversion for rational_adapter, and update tests accordingly.
[SVN r76129]
2011-12-24 11:59:25 +00:00
John Maddock
b9ea00966f Fix modulus operations for negative numbers that should yield zero results (and update tests to match).
Fix boost::rational comparison operator support.
Fix GCC failures in test_rational_io.cpp.
Add adapter for rational types.

[SVN r76128]
2011-12-24 10:07:32 +00:00
John Maddock
a2dc3b968c Fix remaining Boost.Rational support issues and add rational number IO test.
[SVN r76121]
2011-12-23 17:13:29 +00:00
John Maddock
3327eb6b8b Fix some MSVC warnings.
[SVN r76082]
2011-12-20 16:46:54 +00:00
John Maddock
6e3ab5380b Add tests for Boost.Math special functions, and fix whatever errors came up in running those tests.
Add workaround for compilers that don't have a std::abs(long long).

[SVN r76079]
2011-12-20 16:19:55 +00:00
John Maddock
018ac8cd6c Begin adding tests taken from Boost.Math and fix the issues they flag up.
[SVN r75832]
2011-12-06 19:03:41 +00:00
John Maddock
fdcc1a5034 Document libtommath support, add error checking to tommath bitwise operators.
[SVN r75746]
2011-11-30 12:08:59 +00:00
John Maddock
d76492ddaa Suppress some GCC warnings.
[SVN r75723]
2011-11-29 12:27:40 +00:00
John Maddock
4a9845ac7e Fix and test integer formatted output.
[SVN r75716]
2011-11-28 19:24:20 +00:00
John Maddock
7143af0191 Fix IO of infinities and NaN's.
Add IO round trip test and adjust max_digits10 accordingly.

[SVN r75714]
2011-11-28 16:28:31 +00:00
John Maddock
ffc6bcedc9 Fix float IO and add test.
[SVN r75707]
2011-11-28 09:13:12 +00:00
John Maddock
a82c12c447 Mostly fix IO failures.
[SVN r75644]
2011-11-24 17:27:17 +00:00