Home
last modified time | relevance | path

Searched defs:RoundUp (Results 1 - 6 of 6) sorted by relevance

/arkcompiler/ets_runtime/ecmascript/base/
H A Dbit_helper.h154 constexpr T RoundUp(T x, size_t n) in RoundUp() function
H A Ddtoa_helper.cpp276 void DtoaHelper::RoundUp(BufferVector<char> buffer, int* length, int* decimal_point) in RoundUp() function in panda::ecmascript::base::DtoaHelper
324 ASSERT(EXPONENT_64 < -exponent && -exponent <= EXPONENT_128); UInt128 fractionals128 = UInt128(fractionals, 0); fractionals128.Shift(-exponent - EXPONENT_64); int point = 128; for (int i = 0; i < fractional_count; ++i) { if (fractionals128.IsZero()) break; fractionals128.Multiply(5); point--; int digit = fractionals128.DivModPowerOf2(point); buffer[*length] = � + digit; (*length)++; } if (fractionals128.BitAt(point - 1) == 1) { RoundUp(buffer, length, decimal_point); } } } void DtoaHelper::TrimZeros(BufferVector<char> buffer, int* length, int* decimal_point) { while (*length > 0 && buffer[(*length) - 1] == �) { (*length)--; } int first_non_zero = 0; while (first_non_zero < *length && buffer[first_non_zero] == �) { first_non_zero++; } if (first_non_zero != 0) { for (int i = first_non_zero; i < *length; ++i) { buffer[i - first_non_zero] = buffer[i]; } *length -= first_non_zero; *decimal_point -= first_non_zero; } } bool DtoaHelper::FixedDtoa(double v, int fractional_count, BufferVector<char> buffer, int* length, int* decimal_point) { if (v == 0) { buffer[0] = �; buffer[1] = �; *length = 1; *decimal_point = 1; return true; } uint64_t significand = NumberHelper::Significand(v); int exponent = NumberHelper::Exponent(v); if (exponent > 20) return false; if (fractional_count > 20) return false; *length = 0; if (exponent + kDoubleSignificandSize > EXPONENT_64) { const uint64_t kFive17 = 0xB1�2EC5; uint64_t divisor = kFive17; int divisor_power = 17; uint64_t dividend = significand; uint32_t quotient; uint64_t remainder; if (exponent > divisor_power) FillFractionals() argument
/arkcompiler/runtime_core/libpandabase/utils/
H A Dbit_utils.h146 constexpr T RoundUp(T x, size_t n) in RoundUp() function
/arkcompiler/runtime_core/static_core/libpandabase/utils/
H A Dbit_utils.h147 constexpr T RoundUp(T x, size_t n) in RoundUp() function
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_ir/src/
H A Dmir_type.cpp372 static inline uint64 RoundUp(uint64 offset, uint32 align) in RoundUp() function
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/include/be/
H A Dcommon_utils.h328 inline uint64 RoundUp(uint64 offset, uint64 align) in RoundUp() function

Completed in 5 milliseconds