Commit Graph

171 Commits

Author SHA1 Message Date
jzmaddock
cd20cf7db4 Merge branch 'develop' into c99
# Resolved Conflicts:
#	doc/html/boost_multiprecision/indexes/s01.html
#	doc/html/boost_multiprecision/indexes/s02.html
#	doc/html/boost_multiprecision/indexes/s03.html
#	doc/html/boost_multiprecision/indexes/s04.html
#	doc/html/index.html
#	include/boost/multiprecision/detail/default_ops.hpp
2016-09-23 09:01:56 +01:00
jzmaddock
339818c018 Fix compiler errors when converting from cpp_int's to cpp_bin_float's
As reported on the mailing list.
Also adds new test case.
2016-08-17 18:12:41 +01:00
jzmaddock
38117c2ad1 Begin adding C99 floating-point support. 2016-08-06 19:09:22 +01:00
jzmaddock
489843a549 Disable runtime checks in msvc tests as it breaks the STL. 2016-07-22 09:16:01 +01:00
jzmaddock
c7e29b02ff Test and allow MSVC compiled code to be used with /RTC1 /RTCc etc. 2016-06-16 13:07:10 +01:00
jzmaddock
a0bb538a2a Add hashing support to the remaining backends, plus tests etc. 2016-04-30 04:29:07 +01:00
jzmaddock
efbb9e272d Begin adding support for boost::hash.
Fix cpp_int import/export of negative numbers.
2016-04-29 18:52:57 +01:00
jzmaddock
f6ae652756 Change obj to lib rule. 2016-04-04 13:05:13 +01:00
jzmaddock
d3c6beb721 Add exhaustive rounding test program for cpp_bin_float.
Note not run by default as it takes half a day to run.
See: https://svn.boost.org/trac/boost/ticket/12039.
2016-03-22 08:16:30 +00:00
jzmaddock
57333128e8 Allow code and tests to compile without exceptions.
See https://svn.boost.org/trac/boost/ticket/12070.
2016-03-17 11:50:06 +00:00
jzmaddock
8a8b2211d4 Change cpp_bin_float.convert_to<>() conversion routine to avoid double-rounding.
See https://svn.boost.org/trac/boost/ticket/12039.
2016-03-15 08:15:35 +00:00
jzmaddock
df773c7ab2 Disable explicit conversions on expression templates when the target type is implicitly constructible from the number type.
See https://svn.boost.org/trac/boost/ticket/11922
2016-01-20 12:52:20 +00:00
jzmaddock
7dfea115f8 Fix cpp_bin_float conversions,
fix inverse trig logic to get as many digits as possible from std::asin.
Add test case.
Fixes: https://svn.boost.org/trac/boost/ticket/11764
2015-10-29 09:58:28 +00:00
jzmaddock
d78767ef95 Add cpp_int import/export code.
See: https://svn.boost.org/trac/boost/ticket/11590.
2015-09-20 08:45:03 +01:00
jzmaddock
42c6ad2c8f Fix test failures for special functions. 2015-06-04 13:17:29 +01:00
jzmaddock
d5fd0312a4 Split some tests up. 2015-06-01 19:07:28 +01:00
jzmaddock
d711ce23df Fix mixed mode comparison operators.
See https://svn.boost.org/trac/boost/ticket/11328.
And added tests for mixed mode comparisons and other operators.
2015-06-01 18:11:11 +01:00
jzmaddock
9262fa4884 Stop using run in configure rules:
It breaks testing for some strange reason.
2015-05-18 11:59:25 +01:00
jzmaddock
9927d49cb9 Many more fixes and tests for noexcept issues, see https://svn.boost.org/trac/boost/ticket/10990 2015-02-08 18:16:31 +00:00
jzmaddock
33630bc407 Clean up and enhance noexcept support, add tests to validate cpp_int and cpp_rational are performing as expected. See https://svn.boost.org/trac/boost/ticket/10990 2015-02-07 17:54:09 +00:00
jzmaddock
cd1e62a4b0 Fix for issue https://svn.boost.org/trac/boost/ticket/10405
Change code snippets in docs to be complete programs to avoid any confusion.
Fix failure caused by change to Boost.Random.
Regenerate docs.
2014-08-29 18:54:09 +01:00
jzmaddock
c2c2fd6d79 Enable correct rounding for mpq_rational -> floating point conversions. 2014-06-29 13:30:15 +01:00
jzmaddock
f779941205 Fix warnings and compiler errors, plus rounding error in generic_interconvert.hpp.
Add comments about rounding to gmp.hpp.
Update tests to check mpq_rational.
2014-06-29 10:36:19 +01:00
jzmaddock
6ae735d8d5 Commit test file and improve tests some more. Fix some bugs too! 2014-06-28 17:09:50 +01:00
jzmaddock
66fe81cdbc Update and enhance tests. 2014-06-28 16:27:50 +01:00
jzmaddock
9f9394940a Add scalbn, ilogb, logb and tests and docs. 2014-06-17 08:53:54 +01:00
jzmaddock
e7704434d5 Fix PP-logic on test case.
Don't explicitly request gnu++0x mode - it causes conflicts with testers running in c++1y mode.
2014-04-10 18:01:29 +01:00
jzmaddock
bdacea2934 Partial fix for https://svn.boost.org/trac/boost/ticket/9740 to allow code to be used with -ftrapv in gcc. 2014-03-08 10:57:01 +00:00
jzmaddock
9bf3b419c1 Minor fixes for Intel C++ on Win32. 2014-02-21 17:29:05 +00:00
jzmaddock
b3b9164bb9 Adjust big_lanczos now we have Sterling's approx in Boost.Math for large digit counts.
Add extra high-precision test for gamma functions.
2014-01-30 09:35:14 +00:00
jzmaddock
5302b484a4 Add serialization support to cpp_bin_float and document. 2013-12-22 13:35:56 +00:00
John Maddock
10ed707a68 Initial merge of cpp_bin_float code from sandbox.
[SVN r86781]
2013-11-21 19:05:42 +00:00
John Maddock
0a3a504f92 Merge multiprecision changes from Trunk.
[SVN r85681]
2013-09-15 18:04:02 +00:00
John Maddock
10e6f7227d Fix path used to load test data.
[SVN r85642]
2013-09-10 17:40:30 +00:00
John Maddock
07c1027919 Update for Intel 13.1
[SVN r85253]
2013-08-09 12:27:11 +00:00
John Maddock
c5e7d59a73 Add serialization support to float128 and adaptor backends.
Use __float128 via typedefs so recent Intel compilers don't complain.

[SVN r85241]
2013-08-08 17:43:54 +00:00
John Maddock
6ab42a5611 Fix binary archive serialization.
Add rational serialization.

[SVN r85231]
2013-08-07 08:15:51 +00:00
John Maddock
07369c61a2 Improve serialization tests.
[SVN r85219]
2013-08-06 08:08:13 +00:00
John Maddock
904b93f22c Add tentative serialization support.
[SVN r85212]
2013-08-05 11:52:07 +00:00
John Maddock
dd420d8d3b Add tentative support for user-defined-literals.
[SVN r84106]
2013-05-02 10:16:57 +00:00
John Maddock
5126fa8e74 Fix float128 compile error.
Add constexpr support to float128.
Add float128 docs and rebuild HTML.

[SVN r84016]
2013-04-22 17:50:55 +00:00
John Maddock
74e46a3306 Initial Intel C++ _Quad support in float128.
[SVN r83856]
2013-04-12 09:01:20 +00:00
John Maddock
eb267293d7 Refactored build process to improve compile times.
Fixed expression-template incompatibility in spherical_harmonic.hpp.
Fixed expression template issues in log1p_expm1_test.hpp and test_cbrt.hpp.

[SVN r83775]
2013-04-06 08:54:04 +00:00
John Maddock
04b1c9e9f0 Initial commit of 128-bit float wrapper
[SVN r83713]
2013-04-02 17:26:48 +00:00
John Maddock
6582c85fd8 Improve uBas integration to allow use of expression templates inside uBas templates.
Fixes #8292.

[SVN r83439]
2013-03-15 17:29:20 +00:00
John Maddock
b8f6ed0612 Change to use the unit test framework as the test exec monitor seems to be terminally broken.
[SVN r82944]
2013-02-17 08:59:46 +00:00
Christopher Kormanyos
fb748f698d Refs #8065
[SVN r82920]
2013-02-16 10:55:06 +00:00
John Maddock
8ff620de3b Add debug_adaptor.hpp.
Document debug_adaptor and VC++ visualizers.

[SVN r82517]
2013-01-17 12:23:21 +00:00
John Maddock
2b901734b2 Big search and replace name change of adapter -> adaptor.
[SVN r82501]
2013-01-15 11:43:27 +00:00
John Maddock
0d4b3d4b02 Add logged adapter.
Add docs for logged_adapter and mpfi_float.

[SVN r82499]
2013-01-15 09:25:05 +00:00
John Maddock
97b0b495a4 Split test_arithmetic_mpfr_50.cpp into two tests for faster compiles / smaller memory usage.
[SVN r82431]
2013-01-10 11:25:15 +00:00
John Maddock
42458450be Add initial support for mpfi interval arithmetic
[SVN r82337]
2013-01-03 18:58:43 +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
82e82e6b15 Disable debug info for a couple of slower compilers: speeds up the tests somewhat.
[SVN r81799]
2012-12-08 17:40:29 +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
672cd76754 Refactor test_arithmetic.cpp into lots of small files for reduced dependencies.
Changed use of __forceinline to release builds only.

[SVN r81654]
2012-12-01 16:19:23 +00:00
John Maddock
8f18e0b73f Enhance config tests.
Split cpp_int tests into smaller chunks.

[SVN r81440]
2012-11-20 18:50:08 +00:00
John Maddock
8ae04c68a6 Merge multiprecision from sandbox.
[SVN r81417]
2012-11-18 18:56:59 +00:00
John Maddock
3430188795 Add overloads of the integer-only functions which work with native integer types.
Ensure powm promotes fixed precision types to avoid numeric overflow.
Allow the Miller-Rabin code to be used by native integers.
Fix Miller Rabin tests to actually return the test result!
Fix some bugs in cpp_int unsigned arithmetic, and ensure the Miller Rabin and random number code can be safely used with checked fixed precision integers.

[SVN r81269]
2012-11-09 18:55:19 +00:00
John Maddock
836d765243 Fix Jamfile SNAFU.
[SVN r81170]
2012-11-04 12:14:22 +00:00
John Maddock
788449ffa5 Add non-member functions for mixed precision arithmetic + tests for same.
Fix a couple of bugs discovered along the way.

[SVN r81151]
2012-11-02 19:13: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
9f8b30fcdf Update docs with review comments.
Update a few tests based on review comments.
Regenerate docs.

[SVN r80539]
2012-09-16 12:25:14 +00:00
John Maddock
c7230f94ff Extra test cases for more complete coverage.
Added test coverage makefile.
Fixed errors from extra test cases.
Rename a few traits.

[SVN r80328]
2012-08-31 11:57:55 +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
1f35bfe581 Make some gmp constructors explicit.
Add tests to verify that explicit conversions fail.
Fix failures inside number.hpp.

[SVN r80083]
2012-08-19 16:39:24 +00:00
John Maddock
b892e3f5ab Big breaking change - make lossy construction explicit.
[SVN r80058]
2012-08-16 08:13:51 +00:00
John Maddock
c8c3610cdc Fix uBlas tests and failures resulting from them.
[SVN r79902]
2012-08-07 11:47:25 +00:00
John Maddock
821afe64fb Add uBlas interoperability tests.
Add file include tests.

[SVN r79894]
2012-08-07 08:10:07 +00:00
John Maddock
2fb7c1a044 Fix Linux x64 C++0x build issues.
[SVN r79854]
2012-08-02 17:14:17 +00:00
John Maddock
64fe0089d3 Refactor concept checks for faster compilers.
Add constexpr construction test.

[SVN r79724]
2012-07-24 18:03:54 +00:00
John Maddock
26905dc5ea Fix non ET operators to return by value (not rvalue refs as that's unsafe - thanks to Howard Hinnant for the test case).
Fix move constructors to actually move!
Add move test case.
Add better move support throughout the lib.

[SVN r79224]
2012-07-02 08:08:28 +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
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
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
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
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
45a08da90e Add simple version of the Miller Rabin test
[SVN r77353]
2012-03-17 09:18:20 +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
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
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
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
66b67a1c09 Refactor SF tests for much faster compile times.
[SVN r76545]
2012-01-16 18:26:50 +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
44d5a3e394 Change tests for faster compile times.
[SVN r76412]
2012-01-11 19:09:49 +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
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
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
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
4a9845ac7e Fix and test integer formatted output.
[SVN r75716]
2011-11-28 19:24:20 +00:00
John Maddock
ffc6bcedc9 Fix float IO and add test.
[SVN r75707]
2011-11-28 09:13:12 +00:00