Commit Graph

350 Commits

Author SHA1 Message Date
jzmaddock
34dc9d1966 Add more overflow tests. 2017-03-05 17:10:44 +00:00
jzmaddock
2876565d86 Add new test to Jamfile. 2017-03-05 17:04:29 +00:00
jzmaddock
f333808577 Increase testing of truncated integer arithmetic. 2017-03-05 17:02:10 +00:00
jzmaddock
7a2df8ff0a Fix error handing in checked cpp_int multiply.
See https://github.com/boostorg/multiprecision/issues/16
2017-03-05 13:10:13 +00:00
jzmaddock
f4dceca5dc Disable some float128 tests when running under older gcc versions -
no point in testing for old bugs in libquadmath.
2017-03-03 09:20:58 +00:00
jzmaddock
cd2bbcba5b Fix bounded variable precision cpp_int's.
1) Removed some constexpr optimizations which were causing the code to fail to spot that truncation/overflow had occurred.
2) Change min/max code for numeric_limits to work for bounded variable precision types (this needs more work as the current code relies on being able to create a fixed-precision allocator-free type of equivalent width.
3) Add tests for bounded variable precision integers.
See: https://svn.boost.org/trac/boost/ticket/12798
2017-02-03 19:39:28 +00:00
jzmaddock
e108817e69 C99 tests: disable one more mpfr case fixed in recent releases. 2017-01-31 19:56:31 +00:00
jzmaddock
9341113864 C99 test: don't test buggy mpfr versions. 2017-01-31 19:54:49 +00:00
jzmaddock
7deabbe0d4 Previous commit was incomplete. 2017-01-31 19:46:26 +00:00
jzmaddock
c99bb4d418 Fix tests use of min/max types and correct type for the exponent of the number. 2017-01-31 19:41:35 +00:00
jzmaddock
6139de5732 Add MPFR version info to test. 2017-01-31 19:21:51 +00:00
jzmaddock
c81a5e410a Fix GCC-ubuntu failures induced by previous commits 2017-01-30 23:08:34 +00:00
jzmaddock
8179baf40f Fix cpp_int left shift in cases where there is bit-loss.
See https://svn.boost.org/trac/boost/ticket/12790.
Also add dedicated test case.
2017-01-29 19:20:29 +00:00
jzmaddock
c0df5b6747 Change ilogb to consistently return the minimum value of the exponent type
(which may be either narrower or wider than the int return type specified in C99).
Change transcendental code which uses ilogb for loop termination, to check for
a minimal value return to correctly handle the case that the value has gone to zero.
See https://svn.boost.org/trac/boost/ticket/12625
2016-12-03 08:50:38 +00:00
jzmaddock
26ceb6ef38 Get cpp_dec_float, float128, and mpfr passing the C99 annex F tests.
See https://svn.boost.org/trac/boost/ticket/12581.
2016-12-02 17:54:36 +00:00
jzmaddock
138a9055e2 Big commit to bring things into line with C99 Annex F.
See https://svn.boost.org/trac/boost/ticket/12581.
2016-11-30 19:00:55 +00:00
jzmaddock
ec018d5099 Increase testing for rounding when subtracting cpp_bin_float. 2016-11-18 10:56:58 +00:00
jzmaddock
618ef47611 Fix subtraction of small quantities in cpp_bin_float.
See: https://svn.boost.org/trac/boost/ticket/12580
2016-11-17 19:02:11 +00:00
jzmaddock
0e2195fa78 Improve performance of convert_to<Float>.
See https://svn.boost.org/trac/boost/ticket/12527.
2016-11-15 12:06:19 +00:00
jzmaddock
0230921010 Fix conversion of values to double that result in negative infinity.
See https://svn.boost.org/trac/boost/ticket/12527#comment:11.
2016-11-12 19:31:45 +00:00
jzmaddock
0006227416 Change cpp_bin_float rounding code to round in arbitrary location and modify convert-to-float to use it.
See https://svn.boost.org/trac/boost/ticket/12527.
2016-11-12 13:22:15 +00:00
jzmaddock
51686cae87 Fix sign when a conversion results in zero. 2016-11-06 13:12:44 +00:00
jzmaddock
4538e88a91 Fix integer sqrt for very small integers.
See https://svn.boost.org/trac/boost/ticket/12559.
2016-11-06 11:58:54 +00:00
jzmaddock
059cb63649 Prevent double rounding when converting to a denormalized float.
See https://svn.boost.org/trac/boost/ticket/12527.
2016-11-05 17:20:26 +00:00
jzmaddock
ed43204e92 Fix ceil cpp_bin_float to return signed zero when coming up from below.
Also fixes same issue in round/trunc.
See https://svn.boost.org/trac/boost/ticket/12525.
2016-10-26 18:48:53 +01:00
jzmaddock
5a5612c0a9 Fix sign of result when subtraction yields zero.
See https://svn.boost.org/trac/boost/ticket/12524.
2016-10-26 17:55:31 +01:00
jzmaddock
ef0ef9b515 Fix conversion to floating point types when the exponent value would overflow an int.
See https://svn.boost.org/trac/boost/ticket/12512
2016-10-24 18:48:09 +01:00
jzmaddock
75dc2ebb33 Switch floating point types to be zero initialized when default constructed.
This is now consistent between types, and matches what explicitly initialized built in types do.
See https://svn.boost.org/trac/boost/ticket/12500.
2016-10-23 19:12:56 +01:00
jzmaddock
4859528993 Fix mpfi conversions and tests. 2016-10-17 18:02:38 +01:00
jzmaddock
ea357ba6f6 Complete floating point conversion tests.
Allow float->int explicit conversions.
Remove float->int convert-fial tests.
Add enable_if restrictions on op= operators so explicit conversions don't inadvertently take place.
2016-10-12 19:52:28 +01:00
jzmaddock
fb9503920a Add more interconversion tests and fix resulting failures. 2016-10-03 18:01:16 +01:00
jzmaddock
ebfc08a07a Start adding interconversion test cases. 2016-09-28 19:56:39 +01:00
jzmaddock
94e3348f79 Add first comprehensive interconversion test case. 2016-09-28 19:39:44 +01:00
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
105b324d9d Document eval_pow2,
Optimise default eval_pow2 for integer args.
2016-09-22 11:05:38 +01:00
jzmaddock
19e41b0155 Add exp2 support. 2016-09-22 10:53:06 +01:00
jzmaddock
9f5b8ab4ad Fix for libstdc++ bug 2016-09-19 19:10:02 +01:00
jzmaddock
87ae4edc75 C99: trivial test for comparison functions. 2016-09-18 18:36:18 +01:00
jzmaddock
d624d3fd94 C99: add scalbln, rinmt and tgamma. 2016-09-18 18:29:00 +01:00
jzmaddock
22928e00ad Suppress needless warning (unused parameter). 2016-09-18 17:35:14 +01:00
jzmaddock
d25834c52f C99: Add support for remainder and remquo. 2016-09-18 17:34:48 +01:00
jzmaddock
b2108867c7 Fix for cpp_int conversions. 2016-09-15 19:08:38 +01:00
jzmaddock
e1f3e4989f C99: Add nextafter and nexttoward 2016-09-09 19:39:04 +01:00
jzmaddock
67e0dc15ee C99: Add log1p and log2 support. 2016-09-08 18:42:20 +01:00
jzmaddock
5b7f9f1a03 C99: Add support for lgamma, lrint and llrint. 2016-09-07 18:18:31 +01:00
jzmaddock
de84bd4902 C99: Add support for number comparison functions plus hypot. 2016-09-07 11:51:55 +01:00
jzmaddock
00fc161f3c C99: Fix regression failures in new code.
Test for negative interactions with std:: functions.
2016-09-04 10:21:28 +01:00
jzmaddock
e1b66e8e7e C99: Initial fma support. 2016-09-02 16:48:37 +01:00
jzmaddock
6e3f814cec Fix bug in self assignment of complex expression templates.
Fixes https://svn.boost.org/trac/boost/ticket/12408.
2016-08-27 18:27:54 +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