|
Boost-Commit : |
From: pbristow_at_[hidden]
Date: 2007-07-30 05:31:21
Author: pbristow
Date: 2007-07-30 05:31:20 EDT (Mon, 30 Jul 2007)
New Revision: 7583
URL: http://svn.boost.org/trac/boost/changeset/7583
Log:
Suppressed wqarning loss of accuracy conversion to T valuetype by explicit T()
result = T(z * 1.125 + z * 0.003379167095512573896158903121545171688L);
Text files modified:
sandbox/math_toolkit/boost/math/special_functions/erf.hpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Modified: sandbox/math_toolkit/boost/math/special_functions/erf.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/erf.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/erf.hpp 2007-07-30 05:31:20 EDT (Mon, 30 Jul 2007)
@@ -191,17 +191,17 @@
//
if(z == 0)
{
- result = 0;
+ result = T(0);
}
else if(z < 1e-10)
{
- result = z * 1.125 + z * 0.003379167095512573896158903121545171688L;
+ result = T(z * 1.125 + z * 0.003379167095512573896158903121545171688L);
}
else
{
static const T n[7] = { 0.00337916709551257778174L, -0.000147024115786688745475L, -0.37463022236812520164L, 0.0163061594494816999803L, -0.0534354147807331748737L, 0.00161898096813581982844L, -0.0059528010489182840404L };
static const T d[7] = { 1, -0.0435089806536379531594L, 0.442761965043509204727L, -0.017375974533016704678L, 0.0772756490303260060769L, -0.00210552465858669941879L, 0.00544772980263244037286L };
- result = z * 1.125 + z * tools::evaluate_polynomial(n, z) / tools::evaluate_polynomial(d, z);
+ result = T(z * 1.125 + z * tools::evaluate_polynomial(n, z) / tools::evaluate_polynomial(d, z));
}
}
else if((z < 14) || ((z < 28) && invert))
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