mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
LibJS: Use pow instead of __bulitin_pow on clang
__bulitin_pow doesn't seem to exist on clang, at least it didn't build with it.
This commit is contained in:
parent
745ffca580
commit
020b782474
Notes:
sideshowbarker
2024-07-19 01:32:09 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/020b7824742 Pull-request: https://github.com/SerenityOS/serenity/pull/3975
1 changed files with 6 additions and 0 deletions
|
@ -30,9 +30,15 @@
|
|||
#include <LibJS/Runtime/NumberObject.h>
|
||||
#include <math.h>
|
||||
|
||||
#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 {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue