Home
last modified time | relevance | path

Searched refs:fraction (Results 1 - 6 of 6) sorted by relevance

/arkcompiler/runtime_core/static_core/plugins/ets/runtime/intrinsics/helpers/
H A Dets_intrinsics_helpers.h245 PandaString DecimalsToString(FpType *numberInteger, FpType fraction, int radix, FpType delta) in DecimalsToString() argument
248 while (fraction >= delta) { in DecimalsToString()
249 fraction *= radix; in DecimalsToString()
251 int64_t integer = std::floor(fraction); in DecimalsToString()
252 fraction -= integer; in DecimalsToString()
254 if (fraction > HALF && fraction + delta > 1) { in DecimalsToString()
409 PandaString fraction(DecimalsToString<FpType>(&integral, fractional, radix, delta)); in FpToString()
410 result += IntegerToString(integral, radix) + "." + fraction; in FpToString()
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/src/cg/aarch64/
H A Daarch64_insn.cpp108 std::string fraction(res, 1); in Visit()
109 DEBUG_ASSERT(fraction.size() >= 1, "fraction must not be empty"); in Visit()
110 while (fraction.size() != 1 && fraction[fraction.size() - 1] == '0') { in Visit()
111 fraction.pop_back(); in Visit()
115 (void)emitter.Emit(sign + integer + "." + fraction + "e+").Emit(static_cast<int64>(dot) - 1); in Visit()
/arkcompiler/ets_runtime/ecmascript/builtins/
H A Dbuiltins_number.cpp239 double fraction = digitInt.GetNumber(); in ToExponential() local
241 fraction = 0; in ToExponential()
243 if (fraction < base::MIN_FRACTION || fraction > base::MAX_FRACTION) { in ToExponential()
244 THROW_RANGE_ERROR_AND_RETURN(thread, "fraction must be 0 to 100", JSTaggedValue::Exception()); in ToExponential()
246 fraction++; in ToExponential()
248 return NumberHelper::DoubleToExponential(thread, values, static_cast<int>(fraction)); in ToExponential()
273 THROW_RANGE_ERROR_AND_RETURN(thread, "fraction must be 0 to 100", JSTaggedValue::Exception()); in ToFixed()
400 THROW_RANGE_ERROR_AND_RETURN(thread, "fraction must be 1 to 100", JSTaggedValue::Exception()); in ToPrecision()
/arkcompiler/ets_runtime/ecmascript/base/
H A Dnumber_helper.cpp188 double fraction = number - integer;
194 if (fraction != 0 && fraction >= delta) {
196 while (fraction >= delta) {
197 fraction *= radix;
199 int64_t digit = std::floor(fraction);
200 fraction -= digit;
202 bool needCarry = (fraction > HALF) && (fraction + delta > 1);
/arkcompiler/ets_frontend/ets2panda/ir/expressions/
H A DmemberExpression.cpp280 double fraction = std::modf(value, &value); in CheckArrayIndexValue() local
281 if (value < 0.0 || fraction >= std::numeric_limits<double>::epsilon()) { in CheckArrayIndexValue()
/arkcompiler/ets_frontend/es2panda/test/compiler/js/
H A Dcocos_worker_test.js[all...]

Completed in 38 milliseconds