[math] In the impl. of abs() for FP types use std::fabs() if possible.

This fixes the function for long double on some compilers.

For all FP types non-std fabs() was called. This function is defined
only for double. On compilers supporting long double type more precise
than double (GCC, Clang, etc.) this resulted in truncation of the result.
This commit is contained in:
Adam Wulkiewicz 2015-07-22 04:41:34 +02:00
parent 144643ec0c
commit 5a1e553c75

View File

@ -85,6 +85,9 @@ struct abs<T, true>
{
static inline T apply(T const& value)
{
using ::fabs;
using std::fabs; // for long double
return fabs(value);
}
};