Home | History | Annotate | Download | only in i18n

Lines Matching refs:number

238             // if it's the negative-number rule, copy it into its own
338 NFRuleSet::format(int64_t number, UnicodeString& toAppendTo, int32_t pos) const
340 NFRule *rule = findNormalRule(number);
347 rule->doFormat(number, toAppendTo, pos);
354 NFRuleSet::format(double number, UnicodeString& toAppendTo, int32_t pos) const
356 NFRule *rule = findDoubleRule(number);
363 rule->doFormat(number, toAppendTo, pos);
370 NFRuleSet::findDoubleRule(double number) const
374 return findFractionRuleSetRule(number);
377 // if the number is negative, return the negative number rule
378 // (if there isn't a negative-number rule, we pretend it's a
379 // positive number)
380 if (number < 0) {
384 number = -number;
388 // if the number isn't an integer, we use one of the fraction rules...
389 if (number != uprv_floor(number)) {
390 // if the number is between 0 and 1, return the proper
392 if (number < 1 && fractionRules[1]) {
401 // if there's a master rule, use it to format the number
408 int64_t r = util64_fromDouble(number + 0.5);
413 NFRuleSet::findNormalRule(int64_t number) const
419 return findFractionRuleSetRule((double)number);
422 // if the number is negative, return the negative-number rule
423 // (if there isn't one, pretend the number is positive)
424 if (number < 0) {
428 number = -number;
453 if (rules[mid]->getBaseValue() == number) {
456 else if (rules[mid]->getBaseValue() > number) {
474 if (result->shouldRollBack((double)number)) {
489 * the number. Basically, the base value of each rule in the rule
492 * number passed in is the result. If there's a tie, the earlier
497 * @param number The number being formatted (which will always be
498 * a number between 0 and 1)
499 * @return The rule to use to format this number
502 NFRuleSet::findFractionRuleSetRule(double number) const
510 // and multiply this by the number being formatted. This is
519 numerator = util64_fromDouble(number * (double)leastCommonMultiple + 0.5);
543 // that is, and the line number of the rule that did it. If
563 double n = ((double)rules[winner]->getBaseValue()) * number;
635 // start by trying the negative number rule (if there is one)