122 Commits

Author SHA1 Message Date
ckormanyos be9c643032 Try for even more cover lines 2025-07-04 19:58:46 +02:00
ckormanyos 748b7511ae Handle recent review comments 2025-06-19 13:28:31 +02:00
ckormanyos df82a0c76b Add more edge-case testing 2025-01-12 18:38:33 +01:00
ckormanyos ec8679d2e5 Correct read over-large strings and sqrt(INF) 2024-12-21 13:25:08 +01:00
ckormanyos 8e82493c0c Merge branch 'upstream_develop' into sync_upstream
# Conflicts:
#	include/boost/multiprecision/cpp_dec_float.hpp
#	test/test_exp.cpp
2024-12-14 19:17:18 +01:00
jzmaddock 20187736b3 Fix up cpp_bin_float for very small bit counts. (#577)
Fix up cpp_bin_float for very small bit counts.
Adds support for emulating float16_t and bfloat16_t.
Also adds test cases, and updates test_arithmetic.hpp to cope with testing small bit count types.
Fixes https://github.com/boostorg/multiprecision/issues/576.
2023-12-16 09:21:29 +00:00
Matt Borland 65c1175b8f Add using std::swap 2023-10-31 11:35:20 +01:00
Matt Borland 75f995eda9 Fix missing includes 2023-09-22 10:41:01 +02:00
jzmaddock 6fd9ab367e Ensure cpp_dec_float throws on malformed string input. (#532)
Ensure cpp_dec_float throws on malformed string input.
Fixes https://github.com/boostorg/multiprecision/issues/499.

Also add error handling to MPF string construction.
2023-02-16 17:02:05 +00:00
Christopher Kormanyos 63c28b7d0a Implement eval_convert_to() for 128-bit integers 2023-01-05 20:14:01 +01:00
Christopher Kormanyos 759a10266c Non-functional adaptions prepare double-float 2023-01-03 10:07:08 +01:00
Christopher Kormanyos ee7ff42ef2 Refactor ctor enable_if and scoped enum works 2023-01-02 08:15:11 +01:00
Christopher Kormanyos 6b463c390d Try improve DF edge cases but still lots TODO 2022-12-31 14:32:17 +01:00
Christopher Kormanyos 7effe8d637 Simplify syntax and adapt one arithmetic test 2022-12-29 14:04:11 +01:00
Christopher Kormanyos ad7ef1c825 Simply disable selected failed arithmetic tests 2022-12-28 16:16:02 +01:00
Christopher Kormanyos efd25b5afe Retry some failed CI runs 2022-12-28 15:45:03 +01:00
Matt Borland 9e424ff5a5 Suppress non-ISO type warnings 2022-07-11 12:21:16 -07:00
jzmaddock b63b6fe7fe Add enhanced tests for rational number construct and assign.
Fix the errors that result in rational_adaptor and gmp.
2022-04-28 17:59:47 +01:00
Matt Borland 78e2be1a6d Conditionally disable math usage in default_ops 2022-02-22 11:43:03 +01:00
Matt Borland cb537aa47a Add standalone implementation of lltrunc 2022-02-11 14:38:21 +01:00
jzmaddock 150cf95712 Stop relying on if constexpr in new test case. 2022-01-23 09:17:37 +00:00
jzmaddock 4bfdc1bae1 Fix some mpq rational arithmetic errors:
Multiplication by zero should not proceed via gcd.
Multiplication by scalar should be restricted to integer types (not floats).
Add some more tests to catch these cases.
2022-01-22 18:34:09 +00:00
Matt Borland 2e067d2d76 Disable lexical_cast in standalone mode 2022-01-08 09:47:05 +02:00
Matt Borland c7cbbbd840 Fix macro error from rebase 2022-01-07 14:10:30 +02:00
Matt Borland 50957704b3 Revert "Revert "Merge pull request #403 from mborland/standalone_fixes""
This reverts commit 04b327b24f.
2022-01-06 20:37:43 +02:00
jzmaddock bcd095c125 Remove more typeid uses for __int128. 2022-01-05 18:10:05 +00:00
jzmaddock 91f6f2b370 Stop using typeid on __int128/__float128
as it leads to linker errors on some platforms.
2022-01-05 09:11:55 +00:00
jzmaddock d78e4ba6ad Correct conversion operators so they work in non gnu mode.
Use typedefs for __int128 and __float128 throughout.
Remove lexical tommath conversions in favour of "proper" conversion operators.
2022-01-02 10:49:00 +00:00
jzmaddock 521ab46cbc Implement conversions to and from __in128 and __float128.
Add tests to test_arithmetic.hpp.
Strengthened up conversion/assignment operators with enable_if as required, so that unsupported conversions lead to errors at the top level (when looking for the operator in class number), rather than deep inside our template code.
Fixes: https://github.com/boostorg/multiprecision/issues/237.
2021-12-28 19:11:34 +00:00
Matt Borland d77c23842b Missing header for standalone tests 2021-11-26 21:41:39 +02:00
jzmaddock 6d4cd18f02 Update for better interoperability of rationals and integers.
Fix generic_interconvert.hpp for unsigned types.
Update performance testing code to include testing with ::value_type.
Start testing unsigned and checked integer types with rational_adaptor.
Update arithmetic tests to test mixed arithmetic with ::value_type.
2021-09-15 13:16:49 +01:00
jzmaddock db3007352b Correct mpq_rational conversion to integer.
Fixes https://github.com/boostorg/multiprecision/issues/342.
2021-07-06 12:46:44 +01:00
jzmaddock 897bcb4165 Fix up conversions to and from enum's and add new tests.
Fixes: https://github.com/boostorg/multiprecision/issues/324.
2021-06-04 13:43:58 +01:00
jzmaddock a9b4361c0a Completely remove MPL usage. 2021-01-16 11:22:28 +00:00
jzmaddock 771985f06b Finish off removing pretty much all of type_traits usage. 2021-01-14 19:25:54 +00:00
jzmaddock 8bb54d07fd Remove most boost.type_traits usage. 2021-01-14 17:05:14 +00:00
jzmaddock cb514e9249 Giant C++11 refactor removing:
BOOST_STATIC_ASSERT
BOOST_STATIC_CONST
boost::enable_if/disable_if
Changed many traits class usages from boost:: to std::.
2021-01-13 14:33:48 +00:00
jzmaddock 05d2d09bfd Remove tons of C++03 workarounds. 2021-01-11 21:42:50 +00:00
jzmaddock 9d91041e93 Remove rvalue workarounds. 2021-01-11 19:03:46 +00:00
jzmaddock b51516a1a3 Correct spelling of BOOST_NO_LONG_LONG.
Fixes https://github.com/boostorg/multiprecision/issues/269.
2020-09-04 09:22:27 +01:00
jzmaddock ed66aa5469 Improve accuracy of complex tan/tanh.
Test self assignment when using complex_adaptor and fix resulting bugs.
Fixes https://github.com/boostorg/multiprecision/issues/262.
2020-08-06 21:54:49 +01:00
jzmaddock e6289f9603 Lehmer gcd: add test case to validate fixed precision checked arithmetic support. 2020-06-14 17:24:34 +01:00
jzmaddock 64fbcd673c Add better test coverage for new RValue ref overloads. 2020-03-19 18:45:33 +00:00
John Maddock 684b232782 More waring fixes for gcc and clang 2019-10-24 21:39:52 +01:00
pabristow 86a7142d96 Edits to satisfy the picky inspect.exe program, now passing local tests using MSVC 14.2, except for six cpp_int*serial*.txt testdata files missing licence. 2019-08-14 18:02:10 +01:00
jzmaddock 877753246f clang-format: apply new format to (almost) everything. 2019-07-15 18:25:17 +01:00
Tinko Bartels 8740e3863b Replace broken links. 2019-04-23 08:51:47 +02:00
jzmaddock 7f5594c15c Merge pull request #82 from boostorg/APPoS
Apply "Assignment Preserves Precision of Source".
2018-09-16 19:21:36 +01:00
jzmaddock 8d281cc47f Apply "Assignment Preserves Precision of Source".
APPoS for short, throughout the library including in mixed precision arithmetic which should now always promote to the highest precision of any of the arguments.
2018-09-06 20:37:56 +01:00
jzmaddock 27c80085b1 Merge branch 'develop' into issue66 2018-08-18 10:37:39 +01:00