Home
last modified time | relevance | path

Searched refs:quantity (Results 1 – 25 of 149) sorted by relevance

123456

/external/icu/icu4c/source/i18n/
Dnumparse_parsednumber.cpp29 quantity.bogus = true; in clear()
42 if (!quantity.bogus && 0 != (flags & FLAG_NEGATIVE)) { in postProcess()
43 quantity.negate(); in postProcess()
52 return !quantity.bogus || 0 != (flags & FLAG_NAN) || 0 != (flags & FLAG_INFINITY); in seenNumber()
72 U_ASSERT(!quantity.bogus); in getDouble()
73 if (quantity.isZero() && quantity.isNegative()) { in getDouble()
77 if (quantity.fitsInLong()) { in getDouble()
78 return static_cast<double>(quantity.toLong()); in getDouble()
80 return quantity.toDouble(); in getDouble()
105 U_ASSERT(!quantity.bogus); in populateFormattable()
[all …]
Dnumber_multiplier.cpp127 void Scale::applyTo(impl::DecimalQuantity& quantity) const { in applyTo()
128 quantity.adjustMagnitude(fMagnitude); in applyTo()
131 quantity.multiplyBy(*fArbitrary, localStatus); in applyTo()
135 void Scale::applyReciprocalTo(impl::DecimalQuantity& quantity) const { in applyReciprocalTo()
136 quantity.adjustMagnitude(-fMagnitude); in applyReciprocalTo()
139 quantity.divideBy(*fArbitrary, localStatus); in applyReciprocalTo()
150 void MultiplierFormatHandler::processQuantity(DecimalQuantity& quantity, MicroProps& micros, in processQuantity() argument
152 fParent->processQuantity(quantity, micros, status); in processQuantity()
153 fMultiplier.applyTo(quantity); in processQuantity()
Dnumber_scientific.cpp122 void ScientificHandler::processQuantity(DecimalQuantity &quantity, MicroProps &micros, in processQuantity() argument
124 fParent->processQuantity(quantity, micros, status); in processQuantity()
129 if (quantity.isZero()) { in processQuantity()
132 micros.rounder.apply(quantity, fSettings.fEngineeringInterval, status); in processQuantity()
135 micros.rounder.apply(quantity, status); in processQuantity()
139 exponent = -micros.rounder.chooseMultiplierAndApply(quantity, *this, status); in processQuantity()
Dnumber_compact.cpp270 void CompactHandler::processQuantity(DecimalQuantity &quantity, MicroProps &micros, in processQuantity() argument
272 parent->processQuantity(quantity, micros, status); in processQuantity()
277 if (quantity.isZero()) { in processQuantity()
279 micros.rounder.apply(quantity, status); in processQuantity()
282 int32_t multiplier = micros.rounder.chooseMultiplierAndApply(quantity, data, status); in processQuantity()
283 magnitude = quantity.isZero() ? 0 : quantity.getMagnitude(); in processQuantity()
287 StandardPlural::Form plural = utils::getStandardPlural(rules, quantity); in processQuantity()
300 info.mod->applyToMicros(micros, quantity); in processQuantity()
Dnumber_integerwidth.cpp42 void IntegerWidth::apply(impl::DecimalQuantity& quantity, UErrorCode& status) const { in apply() argument
46 quantity.setIntegerLength(fUnion.minMaxInt.fMinInt, INT32_MAX); in apply()
50 fUnion.minMaxInt.fMaxInt < quantity.getMagnitude()) { in apply()
53 quantity.setIntegerLength(fUnion.minMaxInt.fMinInt, fUnion.minMaxInt.fMaxInt); in apply()
Dnumber_formatimpl.cpp441 int32_t NumberFormatterImpl::writeNumber(const MicroProps& micros, DecimalQuantity& quantity, in writeNumber() argument
445 if (quantity.isInfinite()) { in writeNumber()
452 } else if (quantity.isNaN()) { in writeNumber()
461 length += writeIntegerDigits(micros, quantity, string, length + index, status); in writeNumber()
464 … if (quantity.getLowerDisplayMagnitude() < 0 || micros.decimal == UNUM_DECIMAL_SEPARATOR_ALWAYS) { in writeNumber()
477 length += writeFractionDigits(micros, quantity, string, length + index, status); in writeNumber()
483 int32_t NumberFormatterImpl::writeIntegerDigits(const MicroProps& micros, DecimalQuantity& quantity, in writeIntegerDigits() argument
487 int integerCount = quantity.getUpperDisplayMagnitude() + 1; in writeIntegerDigits()
490 if (micros.grouping.groupAtPosition(i, quantity)) { in writeIntegerDigits()
502 int8_t nextDigit = quantity.getDigit(i); in writeIntegerDigits()
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/impl/number/parse/
DParsedNumber.java22 public DecimalQuantity_DualStorageBCD quantity; field in ParsedNumber
78 quantity = null; in clear()
87 quantity = other.quantity == null ? null in copyFrom()
88 : (DecimalQuantity_DualStorageBCD) other.quantity.createCopy(); in copyFrom()
118 if (quantity != null && 0 != (flags & FLAG_NEGATIVE)) { in postProcess()
119 quantity.negate(); in postProcess()
132 return quantity != null || 0 != (flags & FLAG_NAN) || 0 != (flags & FLAG_INFINITY); in seenNumber()
157 assert quantity != null; in getNumber()
158 if (quantity.isZero() && quantity.isNegative() && !integerOnly) { in getNumber()
162 if (quantity.fitsInLong() && !forceBigDecimal) { in getNumber()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/parse/
DParsedNumber.java20 public DecimalQuantity_DualStorageBCD quantity; field in ParsedNumber
76 quantity = null; in clear()
85 quantity = other.quantity == null ? null in copyFrom()
86 : (DecimalQuantity_DualStorageBCD) other.quantity.createCopy(); in copyFrom()
116 if (quantity != null && 0 != (flags & FLAG_NEGATIVE)) { in postProcess()
117 quantity.negate(); in postProcess()
130 return quantity != null || 0 != (flags & FLAG_NAN) || 0 != (flags & FLAG_INFINITY); in seenNumber()
155 assert quantity != null; in getNumber()
156 if (quantity.isZero() && quantity.isNegative() && !integerOnly) { in getNumber()
160 if (quantity.fitsInLong() && !forceBigDecimal) { in getNumber()
[all …]
/external/robolectric-shadows/resources/src/main/java/org/robolectric/res/
DPlural.java4 final String quantity, string; field in Plural
8 Plural(String quantity, String string) { in Plural() argument
9 this.quantity = quantity; in Plural()
11 if ("zero".equals(quantity)) { in Plural()
14 } else if ("one".equals(quantity)) { in Plural()
17 } else if ("two".equals(quantity)) { in Plural()
20 } else if ("other".equals(quantity)) { in Plural()
35 return quantity + "(" + num + "): " + string; in toString()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/number/
DDecimalQuantityTest.java417 DecimalQuantity_DualStorageBCD quantity = new DecimalQuantity_DualStorageBCD(); in testFitsInLong() local
418 quantity.setToInt(0); in testFitsInLong()
419 assertTrue("Zero should fit", quantity.fitsInLong()); in testFitsInLong()
420 quantity.setToInt(42); in testFitsInLong()
421 assertTrue("Small int should fit", quantity.fitsInLong()); in testFitsInLong()
422 quantity.setToDouble(0.1); in testFitsInLong()
423 assertFalse("Fraction should not fit", quantity.fitsInLong()); in testFitsInLong()
424 quantity.setToDouble(42.1); in testFitsInLong()
425 assertFalse("Fraction should not fit", quantity.fitsInLong()); in testFitsInLong()
426 quantity.setToLong(1000000); in testFitsInLong()
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/
DDecimalQuantityTest.java414 DecimalQuantity_DualStorageBCD quantity = new DecimalQuantity_DualStorageBCD(); in testFitsInLong() local
415 quantity.setToInt(0); in testFitsInLong()
416 assertTrue("Zero should fit", quantity.fitsInLong()); in testFitsInLong()
417 quantity.setToInt(42); in testFitsInLong()
418 assertTrue("Small int should fit", quantity.fitsInLong()); in testFitsInLong()
419 quantity.setToDouble(0.1); in testFitsInLong()
420 assertFalse("Fraction should not fit", quantity.fitsInLong()); in testFitsInLong()
421 quantity.setToDouble(42.1); in testFitsInLong()
422 assertFalse("Fraction should not fit", quantity.fitsInLong()); in testFitsInLong()
423 quantity.setToLong(1000000); in testFitsInLong()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/number/
DScale.java184 public void applyTo(DecimalQuantity quantity) { in applyTo() argument
185 quantity.adjustMagnitude(magnitude); in applyTo()
187 quantity.multiplyBy(arbitrary); in applyTo()
196 public void applyReciprocalTo(DecimalQuantity quantity) { in applyReciprocalTo() argument
197 quantity.adjustMagnitude(-magnitude); in applyReciprocalTo()
199 quantity.multiplyBy(reciprocal); in applyReciprocalTo()
200 quantity.roundToMagnitude(quantity.getMagnitude() - mc.getPrecision(), mc); in applyReciprocalTo()
DCompactNotation.java120 public MicroProps processQuantity(DecimalQuantity quantity) { in processQuantity() argument
121 MicroProps micros = parent.processQuantity(quantity); in processQuantity()
126 if (quantity.isZero()) { in processQuantity()
128 micros.rounder.apply(quantity); in processQuantity()
131 int multiplier = micros.rounder.chooseMultiplierAndApply(quantity, data); in processQuantity()
132 magnitude = quantity.isZero() ? 0 : quantity.getMagnitude(); in processQuantity()
136 StandardPlural plural = quantity.getStandardPlural(rules); in processQuantity()
145 mod.applyToMicros(micros, quantity); in processQuantity()
DNumberFormatterImpl.java129 DecimalQuantity_DualStorageBCD quantity = new DecimalQuantity_DualStorageBCD(0); in getPrefixSuffixImpl() local
131 quantity.negate(); in getPrefixSuffixImpl()
133 MicroProps micros = generator.processQuantity(quantity); in getPrefixSuffixImpl()
408 DecimalQuantity quantity, in writeNumber() argument
412 if (quantity.isInfinite()) { in writeNumber()
415 } else if (quantity.isNaN()) { in writeNumber()
420 length += writeIntegerDigits(micros, quantity, string, length + index); in writeNumber()
423 if (quantity.getLowerDisplayMagnitude() < 0 in writeNumber()
432 length += writeFractionDigits(micros, quantity, string, length + index); in writeNumber()
440 DecimalQuantity quantity, in writeIntegerDigits() argument
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/number/
DScale.java180 public void applyTo(DecimalQuantity quantity) { in applyTo() argument
181 quantity.adjustMagnitude(magnitude); in applyTo()
183 quantity.multiplyBy(arbitrary); in applyTo()
192 public void applyReciprocalTo(DecimalQuantity quantity) { in applyReciprocalTo() argument
193 quantity.adjustMagnitude(-magnitude); in applyReciprocalTo()
195 quantity.multiplyBy(reciprocal); in applyReciprocalTo()
196 quantity.roundToMagnitude(quantity.getMagnitude() - mc.getPrecision(), mc); in applyReciprocalTo()
DCompactNotation.java121 public MicroProps processQuantity(DecimalQuantity quantity) { in processQuantity() argument
122 MicroProps micros = parent.processQuantity(quantity); in processQuantity()
127 if (quantity.isZero()) { in processQuantity()
129 micros.rounder.apply(quantity); in processQuantity()
132 int multiplier = micros.rounder.chooseMultiplierAndApply(quantity, data); in processQuantity()
133 magnitude = quantity.isZero() ? 0 : quantity.getMagnitude(); in processQuantity()
137 StandardPlural plural = quantity.getStandardPlural(rules); in processQuantity()
146 mod.applyToMicros(micros, quantity); in processQuantity()
DNumberFormatterImpl.java130 DecimalQuantity_DualStorageBCD quantity = new DecimalQuantity_DualStorageBCD(0); in getPrefixSuffixImpl() local
132 quantity.negate(); in getPrefixSuffixImpl()
134 MicroProps micros = generator.processQuantity(quantity); in getPrefixSuffixImpl()
409 DecimalQuantity quantity, in writeNumber() argument
413 if (quantity.isInfinite()) { in writeNumber()
416 } else if (quantity.isNaN()) { in writeNumber()
421 length += writeIntegerDigits(micros, quantity, string, length + index); in writeNumber()
424 if (quantity.getLowerDisplayMagnitude() < 0 in writeNumber()
433 length += writeFractionDigits(micros, quantity, string, length + index); in writeNumber()
441 DecimalQuantity quantity, in writeIntegerDigits() argument
[all …]
DScientificNotation.java158 public MicroProps processQuantity(DecimalQuantity quantity) { in processQuantity() argument
159 MicroProps micros = parent.processQuantity(quantity); in processQuantity()
164 if (quantity.isZero()) { in processQuantity()
167 ((SignificantRounderImpl) micros.rounder).apply(quantity, in processQuantity()
171 micros.rounder.apply(quantity); in processQuantity()
175 exponent = -micros.rounder.chooseMultiplierAndApply(quantity, this); in processQuantity()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowNativePluralRules.java14 protected static int quantityForIntImpl(long address, int quantity) { in quantityForIntImpl() argument
16 if (quantity == 1) return 1; in quantityForIntImpl()
21 protected static int quantityForIntImpl(int address, int quantity) { in quantityForIntImpl() argument
22 return quantityForIntImpl((long)address, quantity); in quantityForIntImpl()
/external/snakeyaml/src/test/resources/pyyaml/
Dspec-02-12.data4 quantity: 1
6 quantity: 4
8 quantity: 1
/external/llvm/test/YAMLParser/
Dspec-02-12.test6 quantity: 1
8 quantity: 4
10 quantity: 1
/external/swiftshader/third_party/llvm-7.0/llvm/test/YAMLParser/
Dspec-02-12.test6 quantity: 1
8 quantity: 4
10 quantity: 1
/external/icu/android_icu4j/src/main/java/android/icu/impl/number/
DMultiplierFormatHandler.java22 public MicroProps processQuantity(DecimalQuantity quantity) { in processQuantity() argument
23 MicroProps micros = parent.processQuantity(quantity); in processQuantity()
24 multiplier.applyTo(quantity); in processQuantity()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/
DMultiplierFormatHandler.java20 public MicroProps processQuantity(DecimalQuantity quantity) { in processQuantity() argument
21 MicroProps micros = parent.processQuantity(quantity); in processQuantity()
22 multiplier.applyTo(quantity); in processQuantity()
DMutablePatternModifier.java231 public MicroProps processQuantity(DecimalQuantity quantity) { in processQuantity() argument
232 MicroProps micros = parent.processQuantity(quantity); in processQuantity()
233 applyToMicros(micros, quantity); in processQuantity()
237 public void applyToMicros(MicroProps micros, DecimalQuantity quantity) { in applyToMicros() argument
239 micros.modMiddle = pm.getModifierWithoutPlural(quantity.signum()); in applyToMicros()
242 DecimalQuantity copy = quantity.createCopy(); in applyToMicros()
245 micros.modMiddle = pm.getModifier(quantity.signum(), plural); in applyToMicros()

123456