Commit 82a53425 authored by Amol Bhave's avatar Amol Bhave Committed by Facebook Github Bot

Fix math portability for xplat

Summary:
xplat folly sync got blocked due to an error with missing ::remainderl
function.
Not really sure why this function is missing, for now ignore it.

Reviewed By: Orvid

Differential Revision: D15298056

fbshipit-source-id: 34035da5de826b55e28c79b8540aacd827e1ffdf
parent 5c57c80c
......@@ -52,18 +52,6 @@ constexpr long double nextafter(long double x, long double y) {
return __builtin_nextafterl(x, y);
}
constexpr float remainder(float x, float y) {
return __builtin_remainderf(x, y);
}
constexpr double remainder(double x, double y) {
return __builtin_remainder(x, y);
}
constexpr long double remainder(long double x, long double y) {
return __builtin_remainderl(x, y);
}
#else // __GNUC__
inline float nextafter(float x, float y) {
......@@ -78,19 +66,25 @@ inline long double nextafter(long double x, long double y) {
return ::nextafterl(x, y);
}
inline float remainder(float x, float y) {
return ::remainderf(x, y);
}
#endif // __GNUC__
inline double remainder(double x, double y) {
return ::remainder(x, y);
/**
* On uclibc, std::remainder isn't implemented.
* Implement it using builtin versions
*/
#ifdef __UCLIBC__
constexpr float remainder(float x, float y) {
return __builtin_remainderf(x, y);
}
inline long double remainder(long double x, long double y) {
return ::remainderl(x, y);
constexpr double remainder(double x, double y) {
return __builtin_remainder(x, y);
}
#endif // __GNUC__
constexpr long double remainder(long double x, long double y) {
return __builtin_remainderl(x, y);
}
#endif // __UCLIBC__
#endif // !__ANDROID__ && !__UCLIBC__
} // namespace folly
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment