diff --git a/icu4c/source/i18n/plurrule.cpp b/icu4c/source/i18n/plurrule.cpp index cb817042da8..7d1037f8bdd 100644 --- a/icu4c/source/i18n/plurrule.cpp +++ b/icu4c/source/i18n/plurrule.cpp @@ -1618,7 +1618,7 @@ FixedDecimal::FixedDecimal(double n, int32_t v, int64_t f, int32_t e) { init(n, v, f, e); // check values. TODO make into unit test. // - // long visiblePower = (int) Math.pow(10, v); + // long visiblePower = (int) Math.pow(10.0, v); // if (decimalDigits > visiblePower) { // throw new IllegalArgumentException(); // } @@ -1871,7 +1871,7 @@ void FixedDecimal::adjustForMinFractionDigits(int32_t minFractionDigits) { double FixedDecimal::getPluralOperand(PluralOperand operand) const { switch(operand) { - case PLURAL_OPERAND_N: return (exponent == 0 ? source : source * pow(10, exponent)); + case PLURAL_OPERAND_N: return (exponent == 0 ? source : source * pow(10.0, exponent)); case PLURAL_OPERAND_I: return (double) longValue(); case PLURAL_OPERAND_F: return static_cast(decimalDigits); case PLURAL_OPERAND_T: return static_cast(decimalDigitsWithoutTrailingZeros); @@ -1922,14 +1922,14 @@ UnicodeString FixedDecimal::toString() const { } double FixedDecimal::doubleValue() const { - return (isNegative ? -source : source) * pow(10, exponent); + return (isNegative ? -source : source) * pow(10.0, exponent); } int64_t FixedDecimal::longValue() const { if (exponent == 0) { return intValue; } else { - return (long) (pow(10, exponent) * intValue); + return (long) (pow(10.0, exponent) * intValue); } }