Fix abs()-related build failure on mac os

Change: 131308407
This commit is contained in:
Shanqing Cai 2016-08-25 10:03:53 -08:00 committed by TensorFlower Gardener
parent 4747f65877
commit 1fa09b5560

View File

@ -22,7 +22,7 @@ namespace test {
template <typename T>
bool IsClose(const T& x, const T& y, double atol, double rtol) {
// Need x == y so that infinities are close to themselves
return x == y || fabs(x - y) < atol + rtol * fabs(x);
return x == y || std::abs(x - y) < atol + rtol * std::abs(x);
}
template <typename T>