Home
last modified time | relevance | path

Searched full:double (Results 1 – 25 of 438) sorted by relevance

12345678910>>...18

/arkcompiler/ets_runtime/ecmascript/mem/
Dmem_controller.h28 using BytesAndDuration = std::pair<uint64_t, double>;
30 inline BytesAndDuration MakeBytesAndDuration(uint64_t bytes, double duration) in MakeBytesAndDuration()
43 static double GetSystemTimeInMs() in GetSystemTimeInMs()
45 double currentTime = in GetSystemTimeInMs()
46 …std::chrono::duration<double>(std::chrono::high_resolution_clock::now().time_since_epoch()).count(… in GetSystemTimeInMs()
51 double factor) const;
53 double CalculateGrowingFactor(double gcSpeed, double mutatorSpeed);
60 double CalculateMarkCompactSpeedPerMS();
61double GetCurrentOldSpaceAllocationThroughputPerMS(double timeMs = THROUGHPUT_TIME_FRAME_MS) const;
62 double GetNewSpaceAllocationThroughputPerMS() const;
[all …]
Dmem_controller.cpp29 double factor) const in CalculateAllocLimit()
42 double MemController::CalculateGrowingFactor(double gcSpeed, double mutatorSpeed) in CalculateGrowingFactor()
44 double maxGrowingFactor = 4.0; in CalculateGrowingFactor()
45 double halfMaxGrowingFactor = 2.0; in CalculateGrowingFactor()
46 double minGrowingFactor = 1.3; in CalculateGrowingFactor()
47 double minimumFactor = 1.1; in CalculateGrowingFactor()
61 static constexpr double targetMutatorUtilization = 0.97; in CalculateGrowingFactor()
66 const double speedRatio = gcSpeed / mutatorSpeed; in CalculateGrowingFactor()
68 const double a = speedRatio * (1 - targetMutatorUtilization); in CalculateGrowingFactor()
69 const double b = speedRatio * (1 - targetMutatorUtilization) - targetMutatorUtilization; in CalculateGrowingFactor()
[all …]
/arkcompiler/ets_runtime/ecmascript/base/
Dnumber_helper.h25 constexpr double MIN_RADIX = 2;
26 constexpr double MAX_RADIX = 36;
27 constexpr double MIN_FRACTION = 0;
28 constexpr double MAX_FRACTION = 100;
42 static constexpr double HALF = 0.5;
43 static constexpr double EPSILON = std::numeric_limits<double>::epsilon();
45 static constexpr double MAX_VALUE = std::numeric_limits<double>::max();
46 static constexpr double MIN_VALUE = std::numeric_limits<double>::min();
47 static constexpr double POSITIVE_INFINITY = std::numeric_limits<double>::infinity();
48 static constexpr double NAN_VALUE = std::numeric_limits<double>::quiet_NaN();
[all …]
Dmath_helper.h38 static double Asinh(double input) in Asinh()
42 … // +0.0(double) is the special case for std::asinh() function compiled in linux for windows. in Asinh()
49 static inline double Atanh(double input) in Atanh()
53 … // -0.0(double) is the special case for std::atanh() function compiled in linux for windows. in Atanh()
/arkcompiler/ets_runtime/test/typeinfer/div2dyn/
Ddiv2dyn.ts21 AssertType(ans1, "double");
29 AssertType(ans2, "double");
30 AssertType(ans3, "double");
31 AssertType(ans4, "double");
32 AssertType(ans5, "double");
37 AssertType(ans6, "double");
38 AssertType(ans7, "double");
53 AssertType(ans8, "double");
54 AssertType(ans9, "double");
55 AssertType(ans10, "double");
[all …]
/arkcompiler/ets_runtime/ecmascript/
Djs_date.h94 static double MakeDay(double year, double month, double date);
95 static double MakeTime(double hour, double min, double sec, double ms);
96 static double MakeDate(double day, double time);
97 static double TimeClip(double time);
108 double LocalTime(double timeMs) const;
111 double UTCTime(double timeMs) const;
130 static CString ToDateString(double timeMs);
148 double GetDateValue(double timeMs, uint8_t code, bool isLocal) const;
151 static constexpr double MAX_DOUBLE = std::numeric_limits<double>::max();
152 static constexpr double MAX_INT = std::numeric_limits<int>::max();
[all …]
Djs_date.cpp134 double JSDate::MakeTime(double hour, double min, double sec, double ms) in MakeTime()
137 double hourInteger = NumberHelper::TruncateDouble(hour); in MakeTime()
138 double minInteger = NumberHelper::TruncateDouble(min); in MakeTime()
139 double secInteger = NumberHelper::TruncateDouble(sec); in MakeTime()
140 double msInteger = NumberHelper::TruncateDouble(ms); in MakeTime()
148 double JSDate::MakeDay(double year, double month, double date) in MakeDay()
151 double yearInteger = NumberHelper::TruncateDouble(year); in MakeDay()
152 double monthInteger = NumberHelper::TruncateDouble(month); in MakeDay()
163 return static_cast<double>(days - 1) + NumberHelper::TruncateDouble(date); in MakeDay()
170 double JSDate::MakeDate(double day, double time) in MakeDate()
[all …]
/arkcompiler/ets_runtime/ecmascript/builtins/tests/
Dbuiltins_date_test.cpp78 ecmaRuntimeCallInfo->SetCallArg(0, JSTaggedValue(static_cast<double>(2))); in HWTEST_F_L0()
83 ASSERT_EQ(result2.GetRawData(), JSTaggedValue(static_cast<double>(2)).GetRawData()); in HWTEST_F_L0()
93 ecmaRuntimeCallInfo->SetCallArg(0, JSTaggedValue(static_cast<double>(2))); in HWTEST_F_L0()
98 ASSERT_EQ(result4.GetRawData(), JSTaggedValue(static_cast<double>(2)).GetRawData()); in HWTEST_F_L0()
108 ecmaRuntimeCallInfo->SetCallArg(0, JSTaggedValue(static_cast<double>(-2))); in HWTEST_F_L0()
113 ASSERT_EQ(result4.GetRawData(), JSTaggedValue(static_cast<double>(29)).GetRawData()); in HWTEST_F_L0()
124 ecmaRuntimeCallInfo->SetCallArg(0, JSTaggedValue(static_cast<double>(2018))); in HWTEST_F_L0()
126 ecmaRuntimeCallInfo->SetCallArg(1, JSTaggedValue(static_cast<double>(10))); in HWTEST_F_L0()
128 ecmaRuntimeCallInfo->SetCallArg(2, JSTaggedValue(static_cast<double>(6))); in HWTEST_F_L0()
134 ASSERT_EQ(result1.GetRawData(), JSTaggedValue(static_cast<double>(2018)).GetRawData()); in HWTEST_F_L0()
[all …]
Dbuiltins_date_time_format_test.cpp147 static double BuiltinsDateCreate(const double year, const double month, const double date) in BuiltinsDateCreate()
149 const double day = JSDate::MakeDay(year, month, date); in BuiltinsDateCreate()
150 const double time = JSDate::MakeTime(0, 0, 0, 0); // 24:00:00 in BuiltinsDateCreate()
151 double days = JSDate::MakeDate(day, time); in BuiltinsDateCreate()
177 double days = BuiltinsDateCreate(2020, 10, 1); in HWTEST_F_L0()
178 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(static_cast<double>(days))); in HWTEST_F_L0()
217 double days = BuiltinsDateCreate(2020, 5, 11); in HWTEST_F_L0()
218 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(static_cast<double>(days))); in HWTEST_F_L0()
268 double days1 = BuiltinsDateCreate(2020, 10, 1); in HWTEST_F_L0()
269 double days2 = BuiltinsDateCreate(2021, 6, 1); in HWTEST_F_L0()
[all …]
/arkcompiler/ets_frontend/es2panda/ir/ts/
DtsEnumDeclaration.cpp49 int32_t ToInt(double num) in ToInt()
60 uint32_t ToUInt(double num) in ToUInt()
78 return std::numeric_limits<double>::infinity(); in EvaluateIdentifier()
108 if (!std::holds_alternative<double>(value)) { in EvaluateUnaryExpression()
114 return std::get<double>(value); in EvaluateUnaryExpression()
117 return -std::get<double>(value); in EvaluateUnaryExpression()
120 return static_cast<double>(~ToInt(std::get<double>(value))); in EvaluateUnaryExpression()
158 if (std::holds_alternative<double>(left) && std::holds_alternative<double>(right)) { in EvaluateBinaryExpression()
161 … return static_cast<double>(ToUInt(std::get<double>(left)) | ToUInt(std::get<double>(right))); in EvaluateBinaryExpression()
164 … return static_cast<double>(ToUInt(std::get<double>(left)) & ToUInt(std::get<double>(right))); in EvaluateBinaryExpression()
[all …]
/arkcompiler/ets_runtime/ecmascript/tests/
Djs_tagged_number_test.cpp63 EXPECT_EQ(result, JSTaggedNumber(static_cast<double>(4294967294))); in HWTEST_F_L0()
64 // number is double in HWTEST_F_L0()
65 JSTaggedNumber number3(static_cast<double>(123.456)); in HWTEST_F_L0()
66 JSTaggedNumber number4(static_cast<double>(-123.456)); in HWTEST_F_L0()
68 EXPECT_EQ(result, JSTaggedNumber(static_cast<double>(246.912))); in HWTEST_F_L0()
83 // one numer is int,one number is double in HWTEST_F_L0()
85 JSTaggedNumber number4(static_cast<double>(12.1)); in HWTEST_F_L0()
88 // number is double in HWTEST_F_L0()
89 JSTaggedNumber number5(static_cast<double>(12.12)); in HWTEST_F_L0()
90 JSTaggedNumber number6(static_cast<double>(12.12)); in HWTEST_F_L0()
[all …]
Dtagged_value_test.cpp60 HWTEST_F_L0(JSTaggedValueTest, Double) in HWTEST_F_L0() argument
62 double d = 1.1; in HWTEST_F_L0()
69 double nan = std::nan(""); in HWTEST_F_L0()
76double pureNaN = JSTaggedValue::CastTaggedToDouble(JSTaggedValue::TAG_INT - JSTaggedValue::DOUBLE_… in HWTEST_F_L0()
152 JSTaggedValue doubleV((double)100.0); in HWTEST_F_L0()
154 EXPECT_EQ(result.GetDouble(), (double)100.0); in HWTEST_F_L0()
182 EXPECT_TRUE(JSTaggedValue((double)100.0).ToBoolean()); in HWTEST_F_L0()
206 JSTaggedValue doubleV((double)100.0); in HWTEST_F_L0()
208 EXPECT_EQ(result.GetNumber(), (double)100.0); in HWTEST_F_L0()
377 JSTaggedValue doubleV1((double)100.0); in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/ecmascript/builtins/
Dbuiltins_math.cpp38 // if number_value is double,NaN,Undefine, deal in this case in Abs()
39 // if number_value is a String ,which can change to double. e.g."100",deal in this case in Abs()
55 double value = numberValue.GetNumber(); in Acos()
56 double result = base::NAN_VALUE; in Acos()
73 double value = numberValue.GetNumber(); in Acosh()
74 double result = base::NAN_VALUE; in Acosh()
90 double value = numberValue.GetNumber(); in Asin()
91 double result = base::NAN_VALUE; in Asin()
107 double value = numberValue.GetNumber(); in Asinh()
108 double result = base::NAN_VALUE; in Asinh()
[all …]
Dbuiltins_math.h23 double d;
29 static constexpr double E = 2.718281828459045;
31 static constexpr double LN10 = 2.302585092994046;
33 static constexpr double LN2 = 0.6931471805599453;
35 static constexpr double LOG10E = 0.4342944819032518;
37 static constexpr double LOG2E = 1.4426950408889634;
39 static constexpr double PI = 3.141592653589793;
41 static constexpr double SQRT1_2 = 0.7071067811865476;
43 static constexpr double SQRT2 = 1.4142135623730951;
Dbuiltins_arraybuffer.h24 static constexpr double NUMBER_HALF = 0.5;
37 double value;
74 …Value FastSetValueInBuffer(JSTaggedValue arrBuf, uint32_t byteIndex, DataViewType type, double val,
76 …c JSTaggedValue SetValueInBuffer(uint32_t byteIndex, uint8_t *block, DataViewType type, double val,
100 static void SetValueInBufferForByte(double val, uint8_t *block, uint32_t byteIndex);
102 static void SetValueInBufferForUint8Clamped(double val, uint8_t *block, uint32_t byteIndex);
105 …static void SetValueInBufferForInteger(double val, uint8_t *block, uint32_t byteIndex, bool little…
108 …static void SetValueInBufferForFloat(double val, uint8_t *block, uint32_t byteIndex, bool littleEn…
/arkcompiler/ets_runtime/test/typeinfer/mul2dyn/
Dmul2dyn.ts28 AssertType(ans2, "double");
29 AssertType(ans3, "double");
30 AssertType(ans4, "double");
31 AssertType(ans5, "double");
35 AssertType(ans6, "double");
57 AssertType(ans14, "double");
58 AssertType(ans15, "double");
59 AssertType(ans16, "double");
60 AssertType(ans17, "double");
/arkcompiler/ets_runtime/test/typeinfer/sub2dyn/
Dsub2dyn.ts28 AssertType(ans2, "double");
29 AssertType(ans3, "double");
33 AssertType(ans4, "double");
34 AssertType(ans5, "double");
56 AssertType(ans13, "double");
57 AssertType(ans14, "double");
58 AssertType(ans15, "double");
59 AssertType(ans16, "double");
/arkcompiler/runtime_core/compiler/optimizer/code_generator/target/aarch32/
Dlib_helpers.inl27 extern "C" double __aeabi_l2d(int64_t data); // NOLINT(misc-definitions-in-headers)
28 extern "C" double __aeabi_ul2d(uint64_t data); // NOLINT(misc-definitions-in-headers)
32 extern "C" int64_t __aeabi_d2lz(double data); // NOLINT(misc-definitions-in-headers)
33 extern "C" uint64_t __aeabi_d2ulz(double data); // NOLINT(misc-definitions-in-headers)
102 double __aeabi_l2d(int64_t data)
104 return static_cast<double>(data);
108 double __aeabi_ul2d(uint64_t data)
110 return static_cast<double>(data);
126 int64_t __aeabi_d2lz(double data)
132 uint64_t __aeabi_d2ulz(double data)
[all …]
/arkcompiler/ets_runtime/test/typeinfer/add2dyn/
Dadd2dyn.ts46 AssertType(ans6, "double");
47 AssertType(ans7, "double");
50 AssertType(ans8, "double");
53 AssertType(ans9, "double");
75 AssertType(ans17, "double");
76 AssertType(ans18, "double");
77 AssertType(ans19, "double");
78 AssertType(ans20, "double");
/arkcompiler/runtime_core/runtime/
Dintrinsics.cpp41 uint8_t IsInfF64(double v) in IsInfF64()
66 double AbsF64(double v) in AbsF64()
76 double SinF64(double v) in SinF64()
86 double CosF64(double v) in CosF64()
96 double PowF64(double base, double exp) in PowF64()
106 double SqrtF64(double v) in SqrtF64()
126 double MinF64(double a, double b) in MinF64()
146 double MaxF64(double a, double b) in MaxF64()
197 void PrintF64(double v) in PrintF64()
327 double ConvertStringToF64(coretypes::String *s) in ConvertStringToF64()
/arkcompiler/runtime_core/libpandabase/utils/
Dtype_converter.h35 * @param value_ - double number of value
43 ValueUnit(double value, std::string_view literal);
51 std::variant<double, uint64_t> GetValue() const;
53 double GetDoubleValue() const;
67 std::variant<double, uint64_t> value_;
85 constexpr std::array<double, 4> COEFFS_MEMORY = {1024, 1024, 1024, 1024};
86 constexpr std::array<double, 6> COEFFS_TIME = {1000, 1000, 1000, 60, 60, 24};
Dtype_converter.cpp31 ValueUnit::ValueUnit(double value, std::string_view literal) : value_(value), literal_(literal) {} in ValueUnit()
38 std::variant<double, uint64_t> ValueUnit::GetValue() const in GetValue()
43 double ValueUnit::GetDoubleValue() const in GetDoubleValue()
45 return std::get<double>(value_); in GetDoubleValue()
99 ValueUnit TypeConverter(const std::array<double, SIZE> &coeffs, const std::array<std::string_view, … in TypeConverter() argument
102 constexpr double LIMIT = 1.0; in TypeConverter()
103 double division_ratio = 1; in TypeConverter()
/arkcompiler/runtime_core/runtime/include/coretypes/
Dtagged_value.h31 // Every double with all of its exponent bits set and its highest mantissa bit set is a quiet NaN.
34 … so we use a special quietNaN as TaggedInt tag(highest 16bits as 0xFFFF), and need to encode double
56 inline TaggedType ReinterpretDoubleToTaggedType(double value) in ReinterpretDoubleToTaggedType()
60 inline double ReinterpretTaggedTypeToDouble(TaggedType value) in ReinterpretTaggedTypeToDouble()
62 return bit_cast<double>(value); in ReinterpretTaggedTypeToDouble()
106 value_ = TaggedValue(static_cast<double>(v)).GetRawData(); in TaggedValue()
140 value_ = TaggedValue(static_cast<double>(v)).GetRawData(); in TaggedValue()
151 explicit TaggedValue(double v) in TaggedValue()
153 ASSERT_PRINT(!IsImpureNaN(v), "pureNaN will break the encoding of tagged double: " in TaggedValue()
222 inline double GetDouble() const in GetDouble()
[all …]
/arkcompiler/ets_runtime/ecmascript/ic/
Dic_binary_op.h42 // Support cases, such as: int + double, int + int, double + double in AddWithTSType()
44 double a0Double = left.IsInt() ? left.GetInt() : left.GetDouble(); in AddWithTSType()
45 double a1Double = right.IsInt() ? right.GetInt() : right.GetDouble(); in AddWithTSType()
46 double ret = a0Double + a1Double; in AddWithTSType()
62 double a0Double = taggedValueA0.GetNumber(); in AddWithTSType()
63 double a1Double = taggedValueA1.GetNumber(); in AddWithTSType()
108 double a0Double = left.IsInt() ? left.GetInt() : left.GetDouble(); in SubWithTSType()
109 double a1Double = right.IsInt() ? right.GetInt() : right.GetDouble(); in SubWithTSType()
110 double ret = a0Double - a1Double; in SubWithTSType()
174 double dLeft = left.IsInt() ? left.GetInt() : left.GetDouble(); in DivWithTSType()
[all …]
/arkcompiler/ets_runtime/ecmascript/base/tests/
Dnumber_helper_test.cpp76 …* @tc.desc: This function Convert the double type data into a string.first convert it into the cor…
200 …* @tc.desc:This function takes the integer part of double type.When it is positive,it is rounded d…
223 …* @tc.desc: This function takes the double of integer type.When the decimal part is eight and the …
242 double nanDouble = 0.0f / 0.0f; in HWTEST_F_L0()
244 double infDouble = POSITIVE_INFINITY; in HWTEST_F_L0()
260 double nanDouble = 0.0f / 0.0f; in HWTEST_F_L0()
262 double infDouble = POSITIVE_INFINITY; in HWTEST_F_L0()
277 double nanDouble = 0.0f / 0.0f; in HWTEST_F_L0()
279 double infDouble = POSITIVE_INFINITY; in HWTEST_F_L0()
285 …* @tc.desc: The function is to convert double type to int type,The maximum value of integer part o…
[all …]

12345678910>>...18