Searched refs:INT64_BITS (Results 1 – 3 of 3) sorted by relevance
/arkcompiler/ets_runtime/ecmascript/base/tests/ |
D | number_helper_test.cpp | 274 EXPECT_EQ(NumberHelper::DoubleToInt(256.0, INT64_BITS), 256); in HWTEST_F_L0() 275 EXPECT_EQ(NumberHelper::DoubleToInt(256.555555555555556, INT64_BITS), 256); in HWTEST_F_L0() 276 EXPECT_EQ(NumberHelper::DoubleToInt(256.999999999999999, INT64_BITS), 257); in HWTEST_F_L0() 277 EXPECT_EQ(NumberHelper::DoubleToInt(65536.55555, INT64_BITS), 65536); in HWTEST_F_L0() 278 EXPECT_EQ(NumberHelper::DoubleToInt(-65536.99999, INT64_BITS), -65536); in HWTEST_F_L0() 280 EXPECT_EQ(NumberHelper::DoubleToInt(2147483647.0, INT64_BITS), 2147483647); in HWTEST_F_L0() 281 EXPECT_EQ(NumberHelper::DoubleToInt(-2147483647.0, INT64_BITS), -2147483647); in HWTEST_F_L0() 284 EXPECT_EQ(NumberHelper::DoubleToInt(nanDouble, INT64_BITS), 0); in HWTEST_F_L0() 286 EXPECT_EQ(NumberHelper::DoubleToInt(infDouble, INT64_BITS), 0); in HWTEST_F_L0()
|
/arkcompiler/ets_runtime/ecmascript/base/ |
D | number_helper.h | 63 static constexpr size_t INT64_BITS = 64; variable
|
D | number_helper.cpp | 676 … << (static_cast<uint32_t>(exp) - DOUBLE_SIGNIFICAND_SIZE + INT64_BITS - bits)) >> in DoubleToInt() 677 (INT64_BITS - bits); in DoubleToInt() 867 return static_cast<int32_t>(val >> (INT64_BITS - bits)); in Next()
|