Home
last modified time | relevance | path

Searched refs:digits (Results 1 - 25 of 344) sorted by relevance

12345678910>>...14

/third_party/python/Modules/_decimal/tests/
H A Drandfloat.py12 # exact halfway cases with a small number of significant digits
23 # with small number of significant digits.
32 # until n * 2**p2 has more than 20 significant digits.
33 digits, exponent = n, e
34 while digits < 10**20:
35 s = '{}e{}'.format(digits, exponent)
38 s = '{}e{}'.format(digits * 10**40, exponent - 40)
40 digits *= 2
44 digits, exponent = n, e
45 while digits < 1
[all...]
/third_party/skia/third_party/externals/abseil-cpp/absl/strings/
H A Dnumbers.cc148 uint32_t digits; in FastIntToBuffer() local
151 // steps of two digits at a time rather than one whenever possible. in FastIntToBuffer()
156 digits = i / 100000000; // 100,000,000 in FastIntToBuffer()
157 i -= digits * 100000000; in FastIntToBuffer()
158 PutTwoDigits(digits, buffer); in FastIntToBuffer()
161 digits = i / 1000000; // 1,000,000 in FastIntToBuffer()
162 i -= digits * 1000000; in FastIntToBuffer()
163 PutTwoDigits(digits, buffer); in FastIntToBuffer()
166 digits = i / 10000; // 10,000 in FastIntToBuffer()
167 i -= digits * 1000 in FastIntToBuffer()
250 uint32_t digits = u32 / 10000000; // 10,000,000 FastIntToBuffer() local
357 char digits[6]; global() member
515 const char* digits = exp_dig.digits; SixDigitsToBuffer() local
[all...]
H A Dnumbers_benchmark.cc54 const int digits = state.range(0); in BM_safe_strto32_string() local
56 std::string str(digits, '7'); // valid in octal, decimal and hex in BM_safe_strto32_string()
62 ABSL_RAW_CHECK(value == RepeatedSevens(digits, base), ""); in BM_safe_strto32_string()
81 const int digits = state.range(0); in BM_safe_strto64_string() local
83 std::string str(digits, '7'); // valid in octal, decimal and hex in BM_safe_strto64_string()
89 ABSL_RAW_CHECK(value == RepeatedSevens(digits, base), ""); in BM_safe_strto64_string()
109 const int digits = state.range(0); in BM_safe_strtou32_string() local
111 std::string str(digits, '7'); // valid in octal, decimal and hex in BM_safe_strtou32_string()
117 ABSL_RAW_CHECK(value == RepeatedSevens(digits, base), ""); in BM_safe_strtou32_string()
136 const int digits in BM_safe_strtou64_string() local
278 auto digits = absl::numbers_internal::FastHexToBufferZeroPad16(num, buf); BM_FastHexToBufferZeroPad16() local
[all...]
/third_party/rust/crates/syn/src/
H A Dbigint.rs5 digits: Vec<u8>,
10 BigInt { digits: Vec::new() }
14 let mut repr = String::with_capacity(self.digits.len());
17 for digit in self.digits.iter().rev() {
32 let len = self.digits.len(); in reserve_two_digits()
34 len + !self.digits.ends_with(&[0, 0]) as usize + !self.digits.ends_with(&[0]) as usize; in reserve_two_digits()
35 self.digits.resize(desired, 0); in reserve_two_digits()
46 let sum = self.digits[i] + increment; in add_assign()
47 self.digits[ in add_assign()
[all...]
/third_party/node/deps/cares/src/lib/
H A Dares_math.c110 size_t digits; in ares__count_digits() local
112 for (digits = 0; n > 0; digits++) { in ares__count_digits()
115 if (digits == 0) { in ares__count_digits()
116 digits = 1; in ares__count_digits()
119 return digits; in ares__count_digits()
124 size_t digits; in ares__count_hexdigits() local
126 for (digits = 0; n > 0; digits++) { in ares__count_hexdigits()
129 if (digits in ares__count_hexdigits()
[all...]
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/duration/impl/
H A DUtils.java48 * - Sequences of 0 digits and their units are replaced by a single 0 and no unit.
49 * - If there are two such sequences of 0 digits in a level (1000's and 10's), the 1000's 0 is also omitted.
62 return String.valueOf(zh.digits[(int)n]); in chineseNumber()
67 char[] digits = String.valueOf(n).toCharArray(); in chineseNumber()
69 // first, generate all the digits in place in chineseNumber()
75 for (int i = digits.length, u = -1, l = -1; --i >= 0;) { in chineseNumber()
90 int d = digits[i] - '0'; in chineseNumber()
98 buf[--x] = zh.digits[0]; in chineseNumber()
104 buf[--x] = zh.digits[d]; in chineseNumber()
124 if (buf[i] == zh.digits[ in chineseNumber()
189 final char[] digits; global() field in Utils.ChineseDigits
195 ChineseDigits(String digits, String units, String levels, char liang, boolean ko) ChineseDigits() argument
[all...]
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/duration/impl/
H A DUtils.java52 * - Sequences of 0 digits and their units are replaced by a single 0 and no unit.
53 * - If there are two such sequences of 0 digits in a level (1000's and 10's), the 1000's 0 is also omitted.
66 return String.valueOf(zh.digits[(int)n]); in chineseNumber()
71 char[] digits = String.valueOf(n).toCharArray(); in chineseNumber()
73 // first, generate all the digits in place in chineseNumber()
79 for (int i = digits.length, u = -1, l = -1; --i >= 0;) { in chineseNumber()
94 int d = digits[i] - '0'; in chineseNumber()
102 buf[--x] = zh.digits[0]; in chineseNumber()
108 buf[--x] = zh.digits[d]; in chineseNumber()
128 if (buf[i] == zh.digits[ in chineseNumber()
196 final char[] digits; global() field in Utils.ChineseDigits
202 ChineseDigits(String digits, String units, String levels, char liang, boolean ko) ChineseDigits() argument
[all...]
/third_party/python/Lib/test/
H A Dtest_strtod.py107 # exact halfway cases with a small number of significant digits
118 # with small number of significant digits.
127 # until n * 2**p2 has more than 20 significant digits.
128 digits, exponent = n, e
129 while digits < 10**20:
130 s = '{}e{}'.format(digits, exponent)
133 s = '{}e{}'.format(digits * 10**40, exponent - 40)
135 digits *= 2
139 digits, exponent = n, e
140 while digits < 1
[all...]
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
H A DDateNumberFormat.java34 private char[] digits; field in DateNumberFormat
39 private static final int DECIMAL_BUF_SIZE = 20; // 20 digits is good enough to store Long.MAX_VALUE
49 throw new UnsupportedOperationException("DateNumberFormat does not support digits out of BMP."); in DateNumberFormat()
89 digits = new char[10]; in initialize()
90 System.arraycopy(elems, 0, digits, 0, 10); in initialize()
91 zeroDigit = digits[0]; in initialize()
127 if (digits == null) { in setZeroDigit()
128 digits = new char[10]; in setZeroDigit()
130 digits[0] = zero; in setZeroDigit()
132 digits[ in setZeroDigit()
[all...]
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/
H A DDateNumberFormat.java38 private char[] digits; field in DateNumberFormat
43 private static final int DECIMAL_BUF_SIZE = 20; // 20 digits is good enough to store Long.MAX_VALUE
53 throw new UnsupportedOperationException("DateNumberFormat does not support digits out of BMP."); in DateNumberFormat()
93 digits = new char[10]; in initialize()
94 System.arraycopy(elems, 0, digits, 0, 10); in initialize()
95 zeroDigit = digits[0]; in initialize()
131 if (digits == null) { in setZeroDigit()
132 digits = new char[10]; in setZeroDigit()
134 digits[0] = zero; in setZeroDigit()
136 digits[ in setZeroDigit()
[all...]
/third_party/icu/icu4c/source/i18n/
H A DdecNumber.cpp62 /* precision (up to 999,999,999 digits) and arbitrary exponent */
66 /* tightly: digits, emax, and -emin in the context must be <= */
71 /* be finite, positive, have an exponent of zero, and all digits */
72 /* must be either 0 or 1. The result will only contain digits */
152 /* 6. The digits count is allowed to rise to a multiple of DECDPUN */
154 /* accounting of digits is not needed. The correct digits value */
156 /* This must be called before any rounding if the number of digits */
160 /* numbers up to four digits, using appropriate constants. This */
218 /* round-for-reround digits */
6731 decShiftToMost(Unit *uar, Int digits, Int shift) global() argument
7816 Int digits=(len-1)*DECDPUN+1; /* possible digits excluding msu */ global() local
8006 Int ae, d, digits; /* .. */ global() local
[all...]
H A Dnumber_utils.cpp104 U_ASSERT(fContext.digits == other.fData.getCapacity()); in DecNum()
105 if (fContext.digits > kDefaultDigits) { in DecNum()
106 void* p = fData.resize(fContext.digits, 0); in DecNum()
139 // Allocate enough room for: all digits, "E-324", and NUL-terminator. in setTo()
166 fContext.digits = maxDigits; in _setTo()
168 fContext.digits = kDefaultDigits; in _setTo()
189 fContext.digits = length; in setTo()
191 fContext.digits = kDefaultDigits; in setTo()
194 // "digits is of type int32_t, and must have a value in the range 1 through 999,999,999." in setTo()
202 // "decimal digits (i in setTo()
[all...]
/third_party/node/deps/icu-small/source/i18n/
H A DdecNumber.cpp62 /* precision (up to 999,999,999 digits) and arbitrary exponent */
66 /* tightly: digits, emax, and -emin in the context must be <= */
71 /* be finite, positive, have an exponent of zero, and all digits */
72 /* must be either 0 or 1. The result will only contain digits */
152 /* 6. The digits count is allowed to rise to a multiple of DECDPUN */
154 /* accounting of digits is not needed. The correct digits value */
156 /* This must be called before any rounding if the number of digits */
160 /* numbers up to four digits, using appropriate constants. This */
218 /* round-for-reround digits */
6731 decShiftToMost(Unit *uar, Int digits, Int shift) global() argument
7816 Int digits=(len-1)*DECDPUN+1; /* possible digits excluding msu */ global() local
8006 Int ae, d, digits; /* .. */ global() local
[all...]
H A Dnumber_utils.cpp104 U_ASSERT(fContext.digits == other.fData.getCapacity()); in DecNum()
105 if (fContext.digits > kDefaultDigits) { in DecNum()
106 void* p = fData.resize(fContext.digits, 0); in DecNum()
139 // Allocate enough room for: all digits, "E-324", and NUL-terminator. in setTo()
166 fContext.digits = maxDigits; in _setTo()
168 fContext.digits = kDefaultDigits; in _setTo()
189 fContext.digits = length; in setTo()
191 fContext.digits = kDefaultDigits; in setTo()
194 // "digits is of type int32_t, and must have a value in the range 1 through 999,999,999." in setTo()
202 // "decimal digits (i in setTo()
[all...]
/third_party/skia/third_party/externals/icu/source/i18n/
H A DdecNumber.cpp62 /* precision (up to 999,999,999 digits) and arbitrary exponent */
66 /* tightly: digits, emax, and -emin in the context must be <= */
71 /* be finite, positive, have an exponent of zero, and all digits */
72 /* must be either 0 or 1. The result will only contain digits */
152 /* 6. The digits count is allowed to rise to a multiple of DECDPUN */
154 /* accounting of digits is not needed. The correct digits value */
156 /* This must be called before any rounding if the number of digits */
160 /* numbers up to four digits, using appropriate constants. This */
218 /* round-for-reround digits */
6731 decShiftToMost(Unit *uar, Int digits, Int shift) global() argument
7816 Int digits=(len-1)*DECDPUN+1; /* possible digits excluding msu */ global() local
8006 Int ae, d, digits; /* .. */ global() local
[all...]
H A Dnumber_utils.cpp104 U_ASSERT(fContext.digits == other.fData.getCapacity()); in DecNum()
105 if (fContext.digits > kDefaultDigits) { in DecNum()
106 void* p = fData.resize(fContext.digits, 0); in DecNum()
139 // Allocate enough room for: all digits, "E-324", and NUL-terminator. in setTo()
166 fContext.digits = maxDigits; in _setTo()
168 fContext.digits = kDefaultDigits; in _setTo()
195 fContext.digits = length; in setTo()
197 fContext.digits = kDefaultDigits; in setTo()
200 // "digits is of type int32_t, and must have a value in the range 1 through 999,999,999." in setTo()
208 // "decimal digits (i in setTo()
[all...]
/third_party/skia/third_party/externals/abseil-cpp/absl/numeric/internal/
H A Dbits.h77 static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
80 return static_cast<T>(x >> (s & (std::numeric_limits<T>::digits - 1))) |
81 static_cast<T>(x << ((-s) & (std::numeric_limits<T>::digits - 1)));
88 static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
91 return static_cast<T>(x << (s & (std::numeric_limits<T>::digits - 1))) |
92 static_cast<T>(x >> ((-s) & (std::numeric_limits<T>::digits - 1)));
126 static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
236 static_assert(IsPowerOf2(std::numeric_limits<T>::digits), in CountLeadingZeroes()
241 (std::numeric_limits<uint16_t>::digits - in CountLeadingZeroes()
242 std::numeric_limits<T>::digits) in CountLeadingZeroes()
[all...]
/third_party/rust/crates/minimal-lexical/etc/correctness/test-parse-golang/parse-number-fxx-test-data/slowstrconv/
H A Dslowstrconv.go104 } else if (h.decimalPoint > 1) || ((h.decimalPoint == 1) && (h.digits[0] >= 2)) {
127 // hpdPrecision is somewhat arbitrary such that the highPrecisionDecimal.digits
128 // array is sufficiently large (at least several hundred digits of precision)
133 // has hundreds of digits of precision.
135 // For example, if digits[:numDigits] is {7, 8, 9}:
145 // truncated set true means that there are non-zero digits after the first
146 // hpdPrecision digits. This can affect rounding, where "a half exactly" could
152 digits [hpdPrecision]uint8
159 s = append(s, ",digits="...)
160 for _, digit := range h.digits[
[all...]
/third_party/libphonenumber/metadata/src/test/java/com/google/i18n/phonenumbers/metadata/testing/
H A DRangeTreeSubject.java77 public void contains(String digits) { in contains() argument
78 DigitSequence seq = digits.isEmpty() ? DigitSequence.empty() : DigitSequence.of(digits); in contains()
80 failWithActual("expected to contain ", digits); in contains()
84 public void doesNotContain(String digits) { in doesNotContain() argument
85 DigitSequence seq = digits.isEmpty() ? DigitSequence.empty() : DigitSequence.of(digits); in doesNotContain()
87 failWithActual("expected not to contain", digits); in doesNotContain()
/third_party/protobuf/src/google/protobuf/stubs/
H A Dstrutil.h63 // Like above, but only accepts digits.
275 // arbitrary number of hex digits, but all of them together must
280 // hex digits, upper or lower case) or \Uhhhhhhhh (exactly eight
281 // hex digits, upper or lower case) to specify a Unicode code
617 char digits[kFastToBufferSize]; member
623 : piece_data_(digits), in AlphaNum()
624 piece_size_(FastInt32ToBufferLeft(i32, digits) - &digits[0]) {} in AlphaNum()
626 : piece_data_(digits), in AlphaNum()
627 piece_size_(FastUInt32ToBufferLeft(u32, digits) in AlphaNum()
[all...]
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
H A DDecimalFormatSymbols.java135 * {@icu} Returns a DecimalFormatSymbols instance for the given locale with digits and symbols
154 * {@icu} Returns a DecimalFormatSymbols instance for the given locale with digits and symbols
220 * Returns the array of characters used as digits, in order from 0 through 9
227 return digits.clone(); in getDigits()
243 // digitStrings or digits might be referencing a cached copy for in setZeroDigit()
246 digits = digits.clone(); in setZeroDigit()
248 // Make digitStrings field and digits field in sync in setZeroDigit()
250 digits[0] = zeroDigit; in setZeroDigit()
252 // Always propagate to digits in setZeroDigit()
1670 private char digits[]; global() field in DecimalFormatSymbols
2050 final String[] digits; global() field in DecimalFormatSymbols.CacheData
2053 CacheData(ULocale loc, String[] digits, String[] numberElements) CacheData() argument
[all...]
H A DTimeZoneFormat.java651 * @return the decimal digits for localized GMT format.
666 * @param digits a string contains the decimal digit characters from 0 to 9 n the ascending order.
673 public TimeZoneFormat setGMTOffsetDigits(String digits) { in setGMTOffsetDigits() argument
677 if (digits == null) { in setGMTOffsetDigits()
678 throw new NullPointerException("Null GMT offset digits"); in setGMTOffsetDigits()
680 String[] digitArray = toCodePoints(digits); in setGMTOffsetDigits()
682 throw new IllegalArgumentException("Length of digits must be 10"); in setGMTOffsetDigits()
800 * <li>Offset digits (e.g. "0123456789" - see {@link #getGMTOffsetDigits()})
823 * <li>Offset digits (e.g. "0123456789" - see {@link #getGMTOffsetDigits()})
1310 // parsed as localized GMT format, but offset digits wer in parse()
[all...]
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/text/
H A DDecimalFormatSymbols.java129 * <strong>[icu]</strong> Returns a DecimalFormatSymbols instance for the given locale with digits and symbols
147 * <strong>[icu]</strong> Returns a DecimalFormatSymbols instance for the given locale with digits and symbols
210 * Returns the array of characters used as digits, in order from 0 through 9
216 return digits.clone(); in getDigits()
231 // digitStrings or digits might be referencing a cached copy for in setZeroDigit()
234 digits = digits.clone(); in setZeroDigit()
236 // Make digitStrings field and digits field in sync in setZeroDigit()
238 digits[0] = zeroDigit; in setZeroDigit()
240 // Always propagate to digits in setZeroDigit()
1562 private char digits[]; global() field in DecimalFormatSymbols
1926 final String[] digits; global() field in DecimalFormatSymbols.CacheData
1929 CacheData(ULocale loc, String[] digits, String[] numberElements) CacheData() argument
[all...]
/third_party/jerryscript/jerry-core/ecma/builtin-objects/
H A Decma-builtin-number-prototype.c79 lit_utf8_size_t to_num_digits) /**< requested number of digits */ in ecma_builtin_number_prototype_helper_to_string()
103 /* Add significant digits of the integer part. */ in ecma_builtin_number_prototype_helper_to_string()
130 /* Add significant digits of the fraction part. */ in ecma_builtin_number_prototype_helper_to_string()
157 lit_utf8_size_t to_num_digits) /**< requested number of digits */ in ecma_builtin_binary_floating_number_to_string()
160 /* Add significant digits of the decimal part. */ in ecma_builtin_binary_floating_number_to_string()
175 /* Add significant digits of the fraction part and fill the remaining digits with zero */ in ecma_builtin_binary_floating_number_to_string()
195 int32_t round_num, /**< number of digits to keep */ in ecma_builtin_number_prototype_helper_round()
301 lit_utf8_byte_t digits[ECMA_MAX_CHARS_IN_STRINGIFIED_NUMBER]; in ecma_builtin_number_prototype_object_to_string() local
303 lit_utf8_size_t digit_count = ecma_number_to_decimal (this_arg_number, digits, in ecma_builtin_number_prototype_object_to_string()
669 lit_utf8_byte_t digits[ECMA_MAX_CHARS_IN_STRINGIFIED_NUMBER]; ecma_builtin_number_prototype_object_to_fixed() local
767 lit_utf8_byte_t digits[ECMA_MAX_CHARS_IN_STRINGIFIED_NUMBER]; ecma_builtin_number_prototype_object_to_exponential() local
872 lit_utf8_byte_t digits[ECMA_MAX_CHARS_IN_STRINGIFIED_NUMBER]; ecma_builtin_number_prototype_object_to_precision() local
[all...]
/third_party/libphonenumber/metadata/src/test/java/com/google/i18n/phonenumbers/metadata/finitestatematcher/
H A DDigitSequenceMatcherTest.java43 DigitSequence digits = DigitSequenceMatcher.digitsFromString("1234"); in testStringDigits()
45 Assert.assertTrue(digits.hasNext()); in testStringDigits()
46 Assert.assertEquals(1, digits.next()); in testStringDigits()
47 Assert.assertTrue(digits.hasNext()); in testStringDigits()
48 Assert.assertEquals(2, digits.next()); in testStringDigits()
49 Assert.assertTrue(digits.hasNext()); in testStringDigits()
50 Assert.assertEquals(3, digits.next()); in testStringDigits()
51 Assert.assertTrue(digits.hasNext()); in testStringDigits()
52 Assert.assertEquals(4, digits.next()); in testStringDigits()
53 Assert.assertFalse(digits in testStringDigits()
[all...]

Completed in 24 milliseconds

12345678910>>...14