Commit Graph

725 Commits

Author SHA1 Message Date
jzmaddock
cfa202697d Make tests conditional on BOOST_HAS_FLOAT128 2022-06-16 11:44:16 +01:00
jzmaddock
b577cc9b5a Add missing #includes to float128.hpp.
Make constexpr __float128 arithmetic tests behave the same way, irrespective of whether numberic_limits is specialized for that type.
2022-06-15 19:57:02 +01:00
jzmaddock
67cf2d62f1 Tentatively fix conflict between cstdfloat.hpp and multiprecision. 2022-06-13 19:10:11 +01:00
jzmaddock
7e72fb9350 Add missing file. 2022-06-04 17:53:53 +01:00
jzmaddock
7645043aa6 Fix input streaming for trailing delimiters.
Fixes https://github.com/boostorg/multiprecision/issues/468.
2022-06-04 16:00:01 +01:00
Matt Borland
2a2cb93875 Remove from CI run and add missing header 2022-05-28 16:47:39 -07:00
Matt Borland
b30cfbb5dd Fix for issue #464 2022-05-28 08:54:44 -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
jzmaddock
7e8d2aee20 Merge pull request #418 from mborland/math_standalone
Math standalone
2022-02-28 17:48:30 +00:00
Matt Borland
78e2be1a6d Conditionally disable math usage in default_ops 2022-02-22 11:43:03 +01:00
jzmaddock
0251625d98 Disable fixed-precision tests for msvc-14.1 and earlier.
It doesn't perform bankers rounding for double IO which breaks all our tests.
2022-02-12 16:48:33 +00:00
jzmaddock
685302681b Add missing test case. 2022-02-11 18:25:13 +00:00
Matt Borland
cb537aa47a Add standalone implementation of lltrunc 2022-02-11 14:38:21 +01:00
jzmaddock
485fa7c9ae Fix output at zero decimal precision and fixed formatting...
To output rounded to nearest integer.
Add new tests.
Fixes: https://github.com/boostorg/multiprecision/issues/416
Fixes: https://github.com/boostorg/multiprecision/issues/388
2022-02-11 10:13:16 +00:00
Christopher Kormanyos
a57d0c7d43 [ck skip] Merge branch 'develop' into try_to_get_gcc5_back_in_ci 2022-02-02 11:56:49 +01:00
Christopher Kormanyos
33adaa160c [ci skip] clean the test code under observation 2022-02-02 11:41:52 +01:00
Christopher Kormanyos
35e1c29dab Repair the use of static_assert 2022-02-02 10:18:06 +01:00
Christopher Kormanyos
35b0bd7047 Try repair test_cpp_rational (not just g++-5) 2022-02-02 09:58:44 +01:00
Christopher Kormanyos
421778741c Revise timer and print debug points in test 2022-02-02 09:00:39 +01:00
Christopher Kormanyos
41acf076e2 Repair timer constexpr-ness again 2022-02-01 23:22:27 +01:00
Christopher Kormanyos
d3f70d9131 Remember #include <chrono> in reworked timer 2022-02-01 22:53:50 +01:00
Christopher Kormanyos
8810158a36 Complete rework or timer.hpp 2022-02-01 20:15:37 +01:00
jzmaddock
a8ab907e20 Ensure remainder has correct sign when the result is zero.
Also ensure float128 specializations of eval_signbit are actually called.
Change return type of signbit to bool to match std::signbit and update docs.
Add test case.
Fixes https://github.com/boostorg/multiprecision/issues/426.
2022-02-01 19:02:02 +00:00
Christopher Kormanyos
ab4068978e Be safer with obvious float artifacts (if any) 2022-02-01 18:49:04 +01:00
Christopher Kormanyos
376ffc4279 Try repair syntax on running test_cpp_rational(s) 2022-02-01 14:49:50 +01:00
Christopher Kormanyos
fa69ae1f2b Resolve g++-5 tests for FP except search 2022-02-01 13:19:44 +01:00
jzmaddock
1b345f5c78 Add missing linker options to standalone tests.
Fixes linker errors when building with -std=gnu++XX and new test_arithmetic.hpp version.
2022-01-24 18:19:04 +00: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
8dd0056d4e Adjust PP directives. 2022-01-05 18:10:44 +00:00
jzmaddock
bcd095c125 Remove more typeid uses for __int128. 2022-01-05 18:10:05 +00:00
jzmaddock
f8007d7a9e Object files get too big on mingw32. 2022-01-05 09:12:23 +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
9d172a0a60 Minor test case corrections to handle new __int128/__float128 conversion operators. 2022-01-04 09:14:56 +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
jzmaddock
38b781d674 Merge pull request #404 from boostorg/issue362
Change all bit counts to use size_t/ptrdiff_t
2021-12-18 09:16:15 +00:00
jzmaddock
c72c479023 Change all bit counts to use size_t/ptrdiff_t.
Fixes https://github.com/boostorg/multiprecision/issues/362
2021-12-15 15:18:47 +00:00
jzmaddock
ae592ade3d Correct error logic in test/test_convert_cpp_int_2_float.cpp.
Previously we were accidentally passing a negative value to the shift operator.
2021-12-13 18:20:16 +00:00
jzmaddock
2d501d88f8 Update C++ std version check
So that we don't catch pre-std C++2a versions by mistake.
2021-12-12 13:16:38 +00:00
jzmaddock
ffcfe8112a Update Eigen tests
For what is an isn't possible in C++20.
2021-12-11 10:48:47 +00:00
jzmaddock
d84f1d9f51 Merge branch 'develop' into issue400
Fixed Conflicts:
	test/Jamfile.v2
2021-12-10 10:01:42 +00:00
Matt Borland
714f22c160 Merge remote-tracking branch 'boostorg/standalone_chris' into standalone 2021-12-09 17:51:37 +02:00
jzmaddock
c5eda8ad18 Update Eigen NumTraits code.
Eigen's requirements have changed in version 3.4.
Also improve testing and better support variable precision types.
2021-12-09 15:40:48 +00:00
Matt Borland
d967ddfc5d Add standalone signed conversions for tommath 2021-12-09 00:04:28 +02:00
jzmaddock
11da1dcd2f Update cpp_int->float conversion.
Ensures correct round to nearest regardless of value of floating point control flags.
Fixes https://github.com/boostorg/multiprecision/issues/360.
2021-12-08 19:27:09 +00:00
Matt Borland
595c9017c8 Add standalone testing for GMP and tommath 2021-12-07 21:54:17 +02:00