|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83669 - in branches/release: boost/multiprecision boost/multiprecision/detail/functions libs/multiprecision libs/multiprecision/doc libs/multiprecision/doc/html libs/multiprecision/doc/html/boost_multiprecision/indexes libs/multiprecision/doc/html/boost_multiprecision/map libs/multiprecision/example libs/multiprecision/test
From: john_at_[hidden]
Date: 2013-03-31 12:34:51
Author: johnmaddock
Date: 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
New Revision: 83669
URL: http://svn.boost.org/trac/boost/changeset/83669
Log:
Merge fix for #8326, plus misc valgrind errors.
Refs #8326.
Properties modified:
branches/release/boost/multiprecision/ (props changed)
branches/release/libs/multiprecision/ (props changed)
Text files modified:
branches/release/boost/multiprecision/detail/functions/pow.hpp | 9 +++
branches/release/boost/multiprecision/detail/functions/trig.hpp | 9 ++
branches/release/boost/multiprecision/gmp.hpp | 2
branches/release/boost/multiprecision/mpfr.hpp | 21 +++++++
branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html | 4
branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html | 4
branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html | 4
branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html | 4
branches/release/libs/multiprecision/doc/html/boost_multiprecision/map/hist.html | 5 +
branches/release/libs/multiprecision/doc/html/index.html | 2
branches/release/libs/multiprecision/doc/multiprecision.qbk | 2
branches/release/libs/multiprecision/example/gmp_snips.cpp | 3 +
branches/release/libs/multiprecision/example/mpfi_snips.cpp | 1
branches/release/libs/multiprecision/example/mpfr_snips.cpp | 1
branches/release/libs/multiprecision/test/test_arithmetic.hpp | 115 +++++++++++++++++++++++++++++++++++++--
branches/release/libs/multiprecision/test/test_gmp_conversions.cpp | 4 +
branches/release/libs/multiprecision/test/test_mpfr_conversions.cpp | 5 +
17 files changed, 178 insertions(+), 17 deletions(-)
Modified: branches/release/boost/multiprecision/detail/functions/pow.hpp
==============================================================================
--- branches/release/boost/multiprecision/detail/functions/pow.hpp (original)
+++ branches/release/boost/multiprecision/detail/functions/pow.hpp 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -25,6 +25,14 @@
typedef typename boost::multiprecision::detail::canonical<U, T>::type int_type;
+ if(&result == &t)
+ {
+ T temp;
+ pow_imp(temp, t, p, mpl::false_());
+ result = temp;
+ return;
+ }
+
// This will store the result.
if(U(p % U(2)) != U(0))
{
@@ -411,6 +419,7 @@
T t;
eval_pow(t, x, a);
result = t;
+ return;
}
if(a.compare(si_type(1)) == 0)
Modified: branches/release/boost/multiprecision/detail/functions/trig.hpp
==============================================================================
--- branches/release/boost/multiprecision/detail/functions/trig.hpp (original)
+++ branches/release/boost/multiprecision/detail/functions/trig.hpp 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -221,7 +221,7 @@
if(&result == &x)
{
T temp;
- eval_sin(temp, x);
+ eval_cos(temp, x);
result = temp;
return;
}
@@ -361,6 +361,13 @@
void eval_tan(T& result, const T& x)
{
BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The tan function is only valid for floating point types.");
+ if(&result == &x)
+ {
+ T temp;
+ eval_tan(temp, x);
+ result = temp;
+ return;
+ }
T t;
eval_sin(result, x);
eval_cos(t, x);
Modified: branches/release/boost/multiprecision/gmp.hpp
==============================================================================
--- branches/release/boost/multiprecision/gmp.hpp (original)
+++ branches/release/boost/multiprecision/gmp.hpp 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -177,7 +177,7 @@
int e;
long double f, term;
- mpf_init_set_ui(m_data, 0u);
+ mpf_set_ui(m_data, 0u);
f = frexp(a, &e);
Modified: branches/release/boost/multiprecision/mpfr.hpp
==============================================================================
--- branches/release/boost/multiprecision/mpfr.hpp (original)
+++ branches/release/boost/multiprecision/mpfr.hpp 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -39,6 +39,22 @@
namespace detail{
+template <bool b>
+struct mpfr_cleanup
+{
+ struct initializer
+ {
+ initializer() {}
+ ~initializer(){ mpfr_free_cache(); }
+ void force_instantiate()const {}
+ };
+ static const initializer init;
+ static void force_instantiate() { init.force_instantiate(); }
+};
+
+template <bool b>
+typename mpfr_cleanup<b>::initializer const mpfr_cleanup<b>::init;
+
inline long get_default_precision() { return 50; }
template <unsigned digits10, mpfr_allocation_type AllocationType>
@@ -291,6 +307,7 @@
{
if(m_data[0]._mpfr_d)
mpfr_clear(m_data);
+ detail::mpfr_cleanup<true>::force_instantiate();
}
void negate() BOOST_NOEXCEPT
{
@@ -355,6 +372,10 @@
static const unsigned digits2 = (digits10 * 1000uL) / 301uL + ((digits10 * 1000uL) % 301 ? 2u : 1u);
static const unsigned limb_count = mpfr_custom_get_size(digits2) / sizeof(mp_limb_t);
+ ~mpfr_float_imp() BOOST_NOEXCEPT
+ {
+ detail::mpfr_cleanup<true>::force_instantiate();
+ }
mpfr_float_imp()
{
mpfr_custom_init(m_buffer, digits2);
Modified: branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html
==============================================================================
--- branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html (original)
+++ branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s01.html 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -22,9 +22,9 @@
<div class="spirit-nav">
<a accesskey="p" href="../indexes.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="s02.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section id975632">
+<div class="section id990841">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id975632"></a>Function Index</h3></div></div></div>
+<a name="id990841"></a>Function Index</h3></div></div></div>
<p><a class="link" href="s01.html#idx_id_0">A</a> <a class="link" href="s01.html#idx_id_1">B</a> <a class="link" href="s01.html#idx_id_2">C</a> <a class="link" href="s01.html#idx_id_3">D</a> <a class="link" href="s01.html#idx_id_4">E</a> <a class="link" href="s01.html#idx_id_5">F</a> <a class="link" href="s01.html#idx_id_7">I</a> <a class="link" href="s01.html#idx_id_8">L</a> <a class="link" href="s01.html#idx_id_9">M</a> <a class="link" href="s01.html#idx_id_11">O</a> <a class="link" href="s01.html#idx_id_12">P</a> <a class="link" href="s01.html#idx_id_13">R</a> <a class="link" href="s01.html#idx_id_14">S</a> <a class="link" href="s01.html#idx_id_15">T</a> <a class="link" href="s01.html#idx_id_17">V</a> <a class="link" href="s01.html#idx_id_18">Z</a></p>
<div class="variablelist"><dl class="variablelist">
<dt>
Modified: branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html
==============================================================================
--- branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html (original)
+++ branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s02.html 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -22,9 +22,9 @@
<div class="spirit-nav">
<a accesskey="p" href="s01.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="s03.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section id978339">
+<div class="section id995230">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id978339"></a>Class Index</h3></div></div></div>
+<a name="id995230"></a>Class Index</h3></div></div></div>
<p><a class="link" href="s02.html#idx_id_21">C</a> <a class="link" href="s02.html#idx_id_22">D</a> <a class="link" href="s02.html#idx_id_23">E</a> <a class="link" href="s02.html#idx_id_25">G</a> <a class="link" href="s02.html#idx_id_26">I</a> <a class="link" href="s02.html#idx_id_27">L</a> <a class="link" href="s02.html#idx_id_28">M</a> <a class="link" href="s02.html#idx_id_29">N</a> <a class="link" href="s02.html#idx_id_34">T</a></p>
<div class="variablelist"><dl class="variablelist">
<dt>
Modified: branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html
==============================================================================
--- branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html (original)
+++ branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s03.html 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -22,9 +22,9 @@
<div class="spirit-nav">
<a accesskey="p" href="s02.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="s04.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section id978824">
+<div class="section id995715">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id978824"></a>Typedef Index</h3></div></div></div>
+<a name="id995715"></a>Typedef Index</h3></div></div></div>
<p><a class="link" href="s03.html#idx_id_40">C</a> <a class="link" href="s03.html#idx_id_45">I</a> <a class="link" href="s03.html#idx_id_46">L</a> <a class="link" href="s03.html#idx_id_47">M</a> <a class="link" href="s03.html#idx_id_52">S</a> <a class="link" href="s03.html#idx_id_53">T</a> <a class="link" href="s03.html#idx_id_54">U</a></p>
<div class="variablelist"><dl class="variablelist">
<dt>
Modified: branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html
==============================================================================
--- branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html (original)
+++ branches/release/libs/multiprecision/doc/html/boost_multiprecision/indexes/s04.html 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -21,9 +21,9 @@
<div class="spirit-nav">
<a accesskey="p" href="s03.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a>
</div>
-<div class="section id982055">
+<div class="section id997854">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id982055"></a>Index</h3></div></div></div>
+<a name="id997854"></a>Index</h3></div></div></div>
<p><a class="link" href="s04.html#idx_id_57">A</a> <a class="link" href="s04.html#idx_id_58">B</a> <a class="link" href="s04.html#idx_id_59">C</a> <a class="link" href="s04.html#idx_id_60">D</a> <a class="link" href="s04.html#idx_id_61">E</a> <a class="link" href="s04.html#idx_id_62">F</a> <a class="link" href="s04.html#idx_id_63">G</a> <a class="link" href="s04.html#idx_id_64">I</a> <a class="link" href="s04.html#idx_id_65">L</a> <a class="link" href="s04.html#idx_id_66">M</a> <a class="link" href="s04.html#idx_id_67">N</a> <a class="link" href="s04.html#idx_id_68">O</a> <a class="link" href="s04.html#idx_id_69">P</a> <a class="link" href="s04.html#idx_id_70">R</a> <a class="link" href="s04.html#idx_id_71">S</a> <a class="link" href="s04.html#idx_id_72">T</a> <a class="link" href="s04.html#idx_id_73">U</a> <a class="link" href="s04.html#idx_id_74">V</a> <a class="link" href="s04.html#idx_id_75">Z</a></p>
<div class="variablelist"><dl class="variablelist">
<dt>
Modified: branches/release/libs/multiprecision/doc/html/boost_multiprecision/map/hist.html
==============================================================================
--- branches/release/libs/multiprecision/doc/html/boost_multiprecision/map/hist.html (original)
+++ branches/release/libs/multiprecision/doc/html/boost_multiprecision/map/hist.html 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -55,6 +55,11 @@
Fixed bug in <code class="computeroutput"><span class="identifier">cpp_int</span></code>
where division of 0 by something doesn't get zero in the result: 8160.
</li>
+<li class="listitem">
+ Fixed bug in some transcendental functions that caused incorrect return
+ values when variables are reused, for example with <code class="computeroutput"><span class="identifier">a</span>
+ <span class="special">=</span> <span class="identifier">pow</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span></code>. See 8326.
+ </li>
</ul></div>
<h5>
<a name="boost_multiprecision.map.hist.h1"></a>
Modified: branches/release/libs/multiprecision/doc/html/index.html
==============================================================================
--- branches/release/libs/multiprecision/doc/html/index.html (original)
+++ branches/release/libs/multiprecision/doc/html/index.html 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -145,7 +145,7 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: March 08, 2013 at 11:50:36 GMT</small></p></td>
+<td align="left"><p><small>Last revised: March 31, 2013 at 16:21:20 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: branches/release/libs/multiprecision/doc/multiprecision.qbk
==============================================================================
--- branches/release/libs/multiprecision/doc/multiprecision.qbk (original)
+++ branches/release/libs/multiprecision/doc/multiprecision.qbk 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -3622,6 +3622,8 @@
* Fixed bug in subtraction of a single limb in `cpp_int` that results in incorrect value when the result should have a 0
in the last limb: [@https://svn.boost.org/trac/boost/ticket/8133 8133].
* Fixed bug in `cpp_int` where division of 0 by something doesn't get zero in the result: [@https://svn.boost.org/trac/boost/ticket/8160 8160].
+* Fixed bug in some transcendental functions that caused incorrect return values when variables are reused, for example with
+`a = pow(a, b)`. See [@https://svn.boost.org/trac/boost/ticket/8326 8326].
[h4 1.53]
Modified: branches/release/libs/multiprecision/example/gmp_snips.cpp
==============================================================================
--- branches/release/libs/multiprecision/example/gmp_snips.cpp (original)
+++ branches/release/libs/multiprecision/example/gmp_snips.cpp 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -27,6 +27,7 @@
mpz_init(z);
mpz_set(z, v.backend().data());
//]
+ mpz_clear(z);
}
void t2()
@@ -57,6 +58,7 @@
mpf_init(f);
mpf_set(f, a.backend().data());
//]
+ mpf_clear(f);
}
void t3()
@@ -85,6 +87,7 @@
mpq_init(q);
mpq_set(q, v.backend().data());
//]
+ mpq_clear(q);
}
int main()
Modified: branches/release/libs/multiprecision/example/mpfi_snips.cpp
==============================================================================
--- branches/release/libs/multiprecision/example/mpfi_snips.cpp (original)
+++ branches/release/libs/multiprecision/example/mpfi_snips.cpp 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -38,6 +38,7 @@
std::cout << overlap(i1, i2) << std::endl;
std::cout << subset(i1, i2) << std::endl;
//]
+ mpfi_clear(r);
}
int main()
Modified: branches/release/libs/multiprecision/example/mpfr_snips.cpp
==============================================================================
--- branches/release/libs/multiprecision/example/mpfr_snips.cpp (original)
+++ branches/release/libs/multiprecision/example/mpfr_snips.cpp 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -35,6 +35,7 @@
mpfr_init(r);
mpfr_set(r, b.backend().data(), GMP_RNDN);
//]
+ mpfr_clear(r);
}
int main()
Modified: branches/release/libs/multiprecision/test/test_arithmetic.hpp
==============================================================================
--- branches/release/libs/multiprecision/test/test_arithmetic.hpp (original)
+++ branches/release/libs/multiprecision/test/test_arithmetic.hpp 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -641,6 +641,107 @@
}
template <class Real, class T>
+void test_float_funcs(const T&){}
+
+template <class Real>
+void test_float_funcs(const boost::mpl::true_&)
+{
+ if(boost::multiprecision::is_interval_number<Real>::value)
+ return;
+ //
+ // Test variable reuse in function calls, see https://svn.boost.org/trac/boost/ticket/8326
+ //
+ Real a(2), b(10);
+ a = pow(a, b);
+ BOOST_CHECK_EQUAL(a, 1024);
+ a = 2;
+ b = pow(a, b);
+ BOOST_CHECK_EQUAL(b, 1024);
+ b = 10;
+ a = pow(a, 10);
+ BOOST_CHECK_EQUAL(a, 1024);
+ a = -2;
+ a = abs(a);
+ BOOST_CHECK_EQUAL(a, 2);
+ a = -2;
+ a = fabs(a);
+ BOOST_CHECK_EQUAL(a, 2);
+ a = 2.5;
+ a = floor(a);
+ BOOST_CHECK_EQUAL(a, 2);
+ a = 2.5;
+ a = ceil(a);
+ BOOST_CHECK_EQUAL(a, 3);
+ a = 2.5;
+ a = trunc(a);
+ BOOST_CHECK_EQUAL(a, 2);
+ a = 2.25;
+ a = round(a);
+ BOOST_CHECK_EQUAL(a, 2);
+ a = 2;
+ a = ldexp(a, 1);
+ BOOST_CHECK_EQUAL(a, 4);
+ int i;
+ a = frexp(a, &i);
+ BOOST_CHECK_EQUAL(a, 0.5);
+
+ Real tol = std::numeric_limits<Real>::epsilon() * 3;
+ a = 4;
+ a = sqrt(a);
+ BOOST_CHECK_CLOSE_FRACTION(a, 2, tol);
+ a = 3;
+ a = exp(a);
+ BOOST_CHECK_CLOSE_FRACTION(a, Real(exp(Real(3))), tol);
+ a = 3;
+ a = log(a);
+ BOOST_CHECK_CLOSE_FRACTION(a, Real(log(Real(3))), tol);
+ a = 3;
+ a = log10(a);
+ BOOST_CHECK_CLOSE_FRACTION(a, Real(log10(Real(3))), tol);
+
+ a = 0.5;
+ a = sin(a);
+ BOOST_CHECK_CLOSE_FRACTION(a, Real(sin(Real(0.5))), tol);
+ a = 0.5;
+ a = cos(a);
+ BOOST_CHECK_CLOSE_FRACTION(a, Real(cos(Real(0.5))), tol);
+ a = 0.5;
+ a = tan(a);
+ BOOST_CHECK_CLOSE_FRACTION(a, Real(tan(Real(0.5))), tol);
+ a = 0.5;
+ a = asin(a);
+ BOOST_CHECK_CLOSE_FRACTION(a, Real(asin(Real(0.5))), tol);
+ a = 0.5;
+ a = acos(a);
+ BOOST_CHECK_CLOSE_FRACTION(a, Real(acos(Real(0.5))), tol);
+ a = 0.5;
+ a = atan(a);
+ BOOST_CHECK_CLOSE_FRACTION(a, Real(atan(Real(0.5))), tol);
+ a = 0.5;
+ a = sinh(a);
+ BOOST_CHECK_CLOSE_FRACTION(a, Real(sinh(Real(0.5))), tol);
+ a = 0.5;
+ a = cosh(a);
+ BOOST_CHECK_CLOSE_FRACTION(a, Real(cosh(Real(0.5))), tol);
+ a = 0.5;
+ a = tanh(a);
+ BOOST_CHECK_CLOSE_FRACTION(a, Real(tanh(Real(0.5))), tol);
+ a = 4;
+ b = 2;
+ a = fmod(a, b);
+ BOOST_CHECK_CLOSE_FRACTION(a, Real(fmod(Real(4), Real(2))), tol);
+ a = 4;
+ b = fmod(a, b);
+ BOOST_CHECK_CLOSE_FRACTION(b, Real(fmod(Real(4), Real(2))), tol);
+ b = 2;
+ a = atan2(a, b);
+ BOOST_CHECK_CLOSE_FRACTION(a, Real(atan2(Real(4), Real(2))), tol);
+ a = 4;
+ b = atan2(a, b);
+ BOOST_CHECK_CLOSE_FRACTION(b, Real(atan2(Real(4), Real(2))), tol);
+}
+
+template <class Real, class T>
void test_float_ops(const T&){}
template <class Real>
@@ -662,15 +763,15 @@
BOOST_CHECK_EQUAL(ldexp(Real(2), 5) , 64);
BOOST_CHECK_EQUAL(ldexp(Real(2), -5) , Real(2) / 32);
Real v(512);
- int exp;
- Real r = frexp(v, &exp);
+ int exponent;
+ Real r = frexp(v, &exponent);
BOOST_CHECK_EQUAL(r , 0.5);
- BOOST_CHECK_EQUAL(exp , 10);
+ BOOST_CHECK_EQUAL(exponent , 10);
BOOST_CHECK_EQUAL(v , 512);
v = 1 / v;
- r = frexp(v, &exp);
+ r = frexp(v, &exponent);
BOOST_CHECK_EQUAL(r , 0.5);
- BOOST_CHECK_EQUAL(exp , -8);
+ BOOST_CHECK_EQUAL(exponent , -8);
typedef typename Real::backend_type::exponent_type e_type;
BOOST_CHECK_EQUAL(ldexp(Real(2), e_type(5)) , 64);
BOOST_CHECK_EQUAL(ldexp(Real(2), e_type(-5)) , Real(2) / 32);
@@ -685,7 +786,7 @@
BOOST_CHECK_EQUAL(r , 0.5);
BOOST_CHECK_EQUAL(exp2 , -8);
//
- // pow and exp:
+ // pow and exponent:
//
v = 3.25;
r = pow(v, 0);
@@ -719,6 +820,8 @@
BOOST_CHECK_THROW(Real(Real(20) / 0u), std::overflow_error);
}
}
+
+ test_float_funcs<Real>(boost::mpl::bool_<std::numeric_limits<Real>::is_specialized>());
}
template <class T>
Modified: branches/release/libs/multiprecision/test/test_gmp_conversions.cpp
==============================================================================
--- branches/release/libs/multiprecision/test/test_gmp_conversions.cpp (original)
+++ branches/release/libs/multiprecision/test/test_gmp_conversions.cpp 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -146,6 +146,10 @@
f100 = f50;
BOOST_TEST(f100 == 2);
+
+ mpf_clear(mpf);
+ mpz_clear(mpz);
+ mpq_clear(mpq);
return boost::report_errors();
}
Modified: branches/release/libs/multiprecision/test/test_mpfr_conversions.cpp
==============================================================================
--- branches/release/libs/multiprecision/test/test_mpfr_conversions.cpp (original)
+++ branches/release/libs/multiprecision/test/test_mpfr_conversions.cpp 2013-03-31 12:34:50 EDT (Sun, 31 Mar 2013)
@@ -118,6 +118,11 @@
BOOST_TEST(f100 == 2);
f50 = static_cast<mpfr_float_50>(f100);
+
+ mpf_clear(mpf);
+ mpz_clear(mpz);
+ mpq_clear(mpq);
+ mpfr_clear(mpfr);
return boost::report_errors();
}
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