diff --git a/Libraries/LibJS/Runtime/NumberConstructor.cpp b/Libraries/LibJS/Runtime/NumberConstructor.cpp index 6453fd840e..c95441166e 100644 --- a/Libraries/LibJS/Runtime/NumberConstructor.cpp +++ b/Libraries/LibJS/Runtime/NumberConstructor.cpp @@ -30,9 +30,15 @@ #include #include +#ifdef __clang__ +# define EPSILON_VALUE pow(2, -52) +# define MAX_SAFE_INTEGER_VALUE pow(2, 53) - 1 +# define MIN_SAFE_INTEGER_VALUE -(pow(2, 53) - 1) +#else constexpr const double EPSILON_VALUE { __builtin_pow(2, -52) }; constexpr const double MAX_SAFE_INTEGER_VALUE { __builtin_pow(2, 53) - 1 }; constexpr const double MIN_SAFE_INTEGER_VALUE { -(__builtin_pow(2, 53) - 1) }; +#endif namespace JS {