|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86302 - in sandbox/multiprecision.cpp_bin_float: boost/multiprecision libs/multiprecision/test
From: john_at_[hidden]
Date: 2013-10-14 12:44:36
Author: johnmaddock
Date: 2013-10-14 12:44:36 EDT (Mon, 14 Oct 2013)
New Revision: 86302
URL: http://svn.boost.org/trac/boost/changeset/86302
Log:
Fix a few more gcc/linx-x64 failures
Text files modified:
sandbox/multiprecision.cpp_bin_float/boost/multiprecision/cpp_bin_float.hpp | 20 +++++++++-----------
sandbox/multiprecision.cpp_bin_float/libs/multiprecision/test/test_cpp_bin_float.cpp | 2 +-
2 files changed, 10 insertions(+), 12 deletions(-)
Modified: sandbox/multiprecision.cpp_bin_float/boost/multiprecision/cpp_bin_float.hpp
==============================================================================
--- sandbox/multiprecision.cpp_bin_float/boost/multiprecision/cpp_bin_float.hpp Mon Oct 14 11:41:17 2013 (r86301)
+++ sandbox/multiprecision.cpp_bin_float/boost/multiprecision/cpp_bin_float.hpp 2013-10-14 12:44:36 EDT (Mon, 14 Oct 2013) (r86302)
@@ -684,6 +684,7 @@
using default_ops::eval_qr;
using default_ops::eval_bit_test;
using default_ops::eval_get_sign;
+ using default_ops::eval_increment;
//
// Special cases first:
@@ -770,9 +771,7 @@
BOOST_ASSERT((eval_msb(q) == cpp_bin_float<Digits, DigitBase, Allocator>::bit_count));
if((q.limbs()[0] & 1u) && eval_get_sign(r))
{
- eval_left_shift(q, limb_bits);
- q.limbs()[0] = 1;
- res.exponent() -= limb_bits;
+ eval_increment(q);
}
}
else
@@ -781,7 +780,7 @@
// We have exactly "cpp_bin_float<Digits, DigitBase, Allocator>::bit_count" cpp_bin_float<Digits, DigitBase, Allocator>::bit_count in q.
// Get rounding info, which we can get by comparing 2r with v.
// We want to call copy_and_round to handle rounding and general cleanup,
- // so we'll left shift q and add some fake cpp_bin_float<Digits, DigitBase, Allocator>::bit_count on the end to represent
+ // so we'll left shift q and add some fake digits on the end to represent
// how we'll be rounding.
//
BOOST_ASSERT((eval_msb(q) == cpp_bin_float<Digits, DigitBase, Allocator>::bit_count - 1));
@@ -790,9 +789,9 @@
eval_left_shift(r, 1u);
int c = r.compare(v.bits());
if(c == 0)
- q.limbs()[0] = static_cast<limb_type>(1u) << (limb_bits - 1);
+ q.limbs()[0] |= static_cast<limb_type>(1u) << (limb_bits - 1);
else if(c > 0)
- q.limbs()[0] = (static_cast<limb_type>(1u) << (limb_bits - 1)) + static_cast<limb_type>(1u);
+ q.limbs()[0] |= (static_cast<limb_type>(1u) << (limb_bits - 1)) + static_cast<limb_type>(1u);
}
copy_and_round(res, q);
}
@@ -810,6 +809,7 @@
using default_ops::eval_qr;
using default_ops::eval_bit_test;
using default_ops::eval_get_sign;
+ using default_ops::eval_increment;
//
// Special cases first:
@@ -877,9 +877,7 @@
BOOST_ASSERT((eval_msb(q) == cpp_bin_float<Digits, DigitBase, Allocator>::bit_count));
if((q.limbs()[0] & 1u) && eval_get_sign(r))
{
- eval_left_shift(q, limb_bits);
- q.limbs()[0] = 1;
- res.exponent() -= limb_bits;
+ eval_increment(q);
}
}
else
@@ -897,9 +895,9 @@
eval_left_shift(r, 1u);
int c = r.compare(number<typename cpp_bin_float<Digits, DigitBase, Allocator>::double_rep_type>::canonical_value(v));
if(c == 0)
- q.limbs()[0] = static_cast<limb_type>(1u) << (limb_bits - 1);
+ q.limbs()[0] |= static_cast<limb_type>(1u) << (limb_bits - 1);
else if(c > 0)
- q.limbs()[0] = (static_cast<limb_type>(1u) << (limb_bits - 1)) + static_cast<limb_type>(1u);
+ q.limbs()[0] |= (static_cast<limb_type>(1u) << (limb_bits - 1)) + static_cast<limb_type>(1u);
}
copy_and_round(res, q);
}
Modified: sandbox/multiprecision.cpp_bin_float/libs/multiprecision/test/test_cpp_bin_float.cpp
==============================================================================
--- sandbox/multiprecision.cpp_bin_float/libs/multiprecision/test/test_cpp_bin_float.cpp Mon Oct 14 11:41:17 2013 (r86301)
+++ sandbox/multiprecision.cpp_bin_float/libs/multiprecision/test/test_cpp_bin_float.cpp 2013-10-14 12:44:36 EDT (Mon, 14 Oct 2013) (r86302)
@@ -42,7 +42,7 @@
using namespace boost::multiprecision;
#ifdef TEST_MPFR
-typedef number<mpfr_float_backend<15> > good_type;
+typedef number<mpfr_float_backend<18> > good_type;
#else
typedef double good_type;
#endif
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk