mirror of
https://github.com/boostorg/math.git
synced 2026-01-28 07:22:12 +00:00
Fix error handling arguments.
[SVN r74184]
This commit is contained in:
@@ -44,7 +44,7 @@ inline int itrunc(const T& v, const Policy& pol)
|
||||
BOOST_MATH_STD_USING
|
||||
T r = boost::math::trunc(v, pol);
|
||||
if(fabs(r) > (std::numeric_limits<int>::max)())
|
||||
return static_cast<int>(policies::raise_rounding_error("boost::math::itrunc<%1%>(%1%)", 0, 0, v, pol));
|
||||
return static_cast<int>(policies::raise_rounding_error("boost::math::itrunc<%1%>(%1%)", 0, v, 0, pol));
|
||||
return static_cast<int>(r);
|
||||
}
|
||||
template <class T>
|
||||
@@ -59,7 +59,7 @@ inline long ltrunc(const T& v, const Policy& pol)
|
||||
BOOST_MATH_STD_USING
|
||||
T r = boost::math::trunc(v, pol);
|
||||
if(fabs(r) > (std::numeric_limits<long>::max)())
|
||||
return static_cast<long>(policies::raise_rounding_error("boost::math::ltrunc<%1%>(%1%)", 0, 0L, v, pol));
|
||||
return static_cast<long>(policies::raise_rounding_error("boost::math::ltrunc<%1%>(%1%)", 0, v, 0L, pol));
|
||||
return static_cast<long>(r);
|
||||
}
|
||||
template <class T>
|
||||
|
||||
Reference in New Issue
Block a user