mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:27:44 +00:00
LibJS: constexpr
some Number object constant values
This commit is contained in:
parent
4c759ff751
commit
b98b83712f
1 changed files with 3 additions and 4 deletions
|
@ -30,10 +30,9 @@
|
||||||
#include <LibJS/Runtime/NumberObject.h>
|
#include <LibJS/Runtime/NumberObject.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
// FIXME: constexpr these?
|
constexpr const double EPSILON_VALUE { __builtin_pow(2, -52) };
|
||||||
#define EPSILON_VALUE pow(2, -52)
|
constexpr const double MAX_SAFE_INTEGER_VALUE { __builtin_pow(2, 53) - 1 };
|
||||||
#define MAX_SAFE_INTEGER_VALUE pow(2, 53) - 1
|
constexpr const double MIN_SAFE_INTEGER_VALUE { -(__builtin_pow(2, 53) - 1) };
|
||||||
#define MIN_SAFE_INTEGER_VALUE -(pow(2, 53) - 1)
|
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue