jzmaddock
a98c0ed628
Fix parenthesis in use of max().
2017-06-08 08:49:26 +01:00
jzmaddock
c8dadd5cf6
Re jig expression_storage to try and work around gcc-6.2 internal compiler error.
2017-06-02 12:33:00 +01:00
jzmaddock
57b36b5a92
Store basic arithmetic types by value in expression templates.
...
So that we can't get a dangling-reference to a literal if someone stores an expression, see https://github.com/boostorg/multiprecision/issues/19 .
2017-06-01 19:53:15 +01:00
jzmaddock
2061889b77
Correct __float128 precision in cpp_bin_float.hpp
...
Enable some more travis tests.
2017-05-22 19:47:27 +01:00
jzmaddock
302c6f5c35
Fix up __float128 interoperability.
2017-05-21 11:16:29 +01:00
jzmaddock
f9eaf94f2e
Previous __float128 commit was buggy - fix.
2017-05-19 19:47:53 +01:00
jzmaddock
d6204058f0
Remove duplicate specialization of number_category<__float128> unless we're really using __Quad.
2017-05-19 19:22:41 +01:00
jzmaddock
bc8744811c
Merge branch 'develop' of https://github.com/boostorg/multiprecision into develop
2017-05-19 18:22:46 +01:00
jzmaddock
e2566a4f7f
Tentative fix for construction from __float128 compiler failure in cpp_bin_float.
2017-05-19 18:22:33 +01:00
John Maddock
fdb0ce2b37
Workaround for lack of numeric_limits specializations of __int128 when in strict ansi mode, rather than GNU mode.
2017-05-17 18:20:48 +01:00
jzmaddock
54aebca85d
Fix overflow error in mpf_float::eval_convert_to.
2017-05-14 19:25:08 +01:00
jzmaddock
e691d23cd5
Fix for internal logic error in exp of large values.
...
See https://github.com/boostorg/multiprecision/issues/23 .
2017-05-14 09:37:49 +01:00
jzmaddock
de4b88b55f
Merge branch 'develop' of https://github.com/boostorg/multiprecision into develop
2017-05-12 18:50:36 +01:00
jzmaddock
f2a266da6d
Fix for trig functions of huge arguments.
...
See https://github.com/boostorg/multiprecision/issues/24 .
Note that this is not a particularly clever fix!
2017-05-12 18:50:03 +01:00
John Maddock
8aeee5feb4
Suppress some gcc-6.3 warnings
2017-04-30 18:50:55 +01:00
jzmaddock
12524489a0
Suppress warning about stray ;'s.
2017-04-26 19:27:46 +01:00
jzmaddock
4085ad30a4
Import gcd/lcm into namespaces math and integer.
...
Provides compatibility with Boost.Integer gcd/lcm, and with (deprecated) Boost.Math.
2017-04-26 18:27:19 +01: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
71ffdc4b35
Merge rational fixes
2017-02-27 09:36:14 +00:00
jzmaddock
12a45a9aa2
Fix return type on mpfi ln_two constant
2017-02-26 16:11:05 +00:00
jzmaddock
c5a660d33a
Remove outdated boost::rational workarounds, also quash a couple of warnings.
2017-02-26 14:56:57 +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
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
4911125248
Allow conversion from __float128 to cpp_bin_float.
2017-01-23 19:40:42 +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
fe3eac52bf
Fix bit exporting of trivial cpp_ints.
...
Fixes: https://svn.boost.org/trac/boost/ticket/12627 .
2016-12-02 17:57:35 +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
a31d765629
Merge branch 'develop' of https://github.com/boostorg/multiprecision into develop
2016-11-17 19:02:30 +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
59bbbd026c
Merge pull request #18 from zerotypos-found/patch-1
...
[inspection report] Remove tabs and protect std::min from macro expansion
2016-11-16 19:02:02 +00:00
jzmaddock
0919f25f6c
Improve performance of 128-bit bit-scan operations.
2016-11-15 18:54:29 +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
zerotypos-found
4ee2f1eead
[inspection report] Remove tabs and protect std::min from macro expansion
2016-11-14 12:34:36 +09: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
e3d125c8c7
Fixes for msvc-12.0 test failures.
2016-10-27 18:34:52 +01: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
1c2ecb6f6e
Fix iostream parsing error, see https://svn.boost.org/trac/boost/ticket/12488
2016-10-23 18:10:55 +01:00
jzmaddock
cfeefc8330
Change calls to generic_interconvert to use ADL.
2016-10-17 18:40:43 +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