|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85255 - trunk/boost/multiprecision/detail
From: john_at_[hidden]
Date: 2013-08-09 13:44:48
Author: johnmaddock
Date: 2013-08-09 13:44:48 EDT (Fri, 09 Aug 2013)
New Revision: 85255
URL: http://svn.boost.org/trac/boost/changeset/85255
Log:
Fix exact sqrt's.
Text files modified:
trunk/boost/multiprecision/detail/default_ops.hpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
Modified: trunk/boost/multiprecision/detail/default_ops.hpp
==============================================================================
--- trunk/boost/multiprecision/detail/default_ops.hpp Fri Aug 9 12:12:38 2013 (r85254)
+++ trunk/boost/multiprecision/detail/default_ops.hpp 2013-08-09 13:44:48 EDT (Fri, 09 Aug 2013) (r85255)
@@ -1149,6 +1149,8 @@
eval_bit_set(t, 2 * g);
eval_subtract(r, x, t);
--g;
+ if(eval_get_sign(r) == 0)
+ return;
int msbr = eval_msb(r);
do
{
@@ -1161,6 +1163,8 @@
{
eval_bit_set(s, g);
eval_subtract(r, t);
+ if(eval_get_sign(r) == 0)
+ return;
msbr = eval_msb(r);
}
}
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