2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Fix for build failure when there are no long double functions.

Fixes #7485.

[SVN r80932]
This commit is contained in:
John Maddock
2012-10-10 12:21:16 +00:00
parent ba13586027
commit 48876d1176
2 changed files with 8 additions and 0 deletions

View File

@@ -15,7 +15,11 @@ namespace boost{ namespace math{ namespace tr1{
extern "C" double BOOST_MATH_TR1_DECL boost_nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long double y) BOOST_MATH_C99_THROW_SPEC
{
#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
return c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, (double)y);
#else
return (double)c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION((long double)x, y);
#endif
}
}}}

View File

@@ -15,7 +15,11 @@ namespace boost{ namespace math{ namespace tr1{
extern "C" float BOOST_MATH_TR1_DECL boost_nexttowardf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long double y) BOOST_MATH_C99_THROW_SPEC
{
#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
return (float)c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION((double)x, (double)y);
#else
return (float)c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION((long double)x, y);
#endif
}
}}}