#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include <cstdlib>
#include <cmath>
#include <limits>
#include <stdlib.h>
#include "unicode/plurrule.h"
#include "cmemory.h"
#include "number_decnum.h"
#include "putilimp.h"
#include "number_decimalquantity.h"
#include "number_roundingutils.h"
#include "double-conversion.h"
#include "charstr.h"
#include "number_utils.h"
#include "uassert.h"
#include "util.h"
usingnamespaceicu;
usingnamespaceicu::number;
usingnamespaceicu::number::impl;
DoubleToStringConverter;
StringToDoubleConverter;
namespace {
int8_t NEGATIVE_FLAG = …;
int8_t INFINITY_FLAG = …;
int8_t NAN_FLAG = …;
inline int32_t safeSubtract(int32_t a, int32_t b) { … }
static double DOUBLE_MULTIPLIERS[] = …;
}
icu::IFixedDecimal::~IFixedDecimal() = default;
DecimalQuantity::DecimalQuantity() { … }
DecimalQuantity::~DecimalQuantity() { … }
DecimalQuantity::DecimalQuantity(const DecimalQuantity &other) { … }
DecimalQuantity::DecimalQuantity(DecimalQuantity&& src) noexcept { … }
DecimalQuantity &DecimalQuantity::operator=(const DecimalQuantity &other) { … }
DecimalQuantity& DecimalQuantity::operator=(DecimalQuantity&& src) noexcept { … }
void DecimalQuantity::copyFieldsFrom(const DecimalQuantity& other) { … }
void DecimalQuantity::clear() { … }
void DecimalQuantity::setMinInteger(int32_t minInt) { … }
void DecimalQuantity::setMinFraction(int32_t minFrac) { … }
void DecimalQuantity::applyMaxInteger(int32_t maxInt) { … }
uint64_t DecimalQuantity::getPositionFingerprint() const { … }
void DecimalQuantity::roundToIncrement(
uint64_t increment,
digits_t magnitude,
RoundingMode roundingMode,
UErrorCode& status) { … }
void DecimalQuantity::multiplyBy(const DecNum& multiplicand, UErrorCode& status) { … }
void DecimalQuantity::divideBy(const DecNum& divisor, UErrorCode& status) { … }
void DecimalQuantity::negate() { … }
int32_t DecimalQuantity::getMagnitude() const { … }
bool DecimalQuantity::adjustMagnitude(int32_t delta) { … }
int32_t DecimalQuantity::adjustToZeroScale() { … }
double DecimalQuantity::getPluralOperand(PluralOperand operand) const { … }
int32_t DecimalQuantity::getExponent() const { … }
void DecimalQuantity::adjustExponent(int delta) { … }
void DecimalQuantity::resetExponent() { … }
bool DecimalQuantity::hasIntegerValue() const { … }
int32_t DecimalQuantity::getUpperDisplayMagnitude() const { … }
int32_t DecimalQuantity::getLowerDisplayMagnitude() const { … }
int8_t DecimalQuantity::getDigit(int32_t magnitude) const { … }
int32_t DecimalQuantity::fractionCount() const { … }
int32_t DecimalQuantity::fractionCountWithoutTrailingZeros() const { … }
bool DecimalQuantity::isNegative() const { … }
Signum DecimalQuantity::signum() const { … }
bool DecimalQuantity::isInfinite() const { … }
bool DecimalQuantity::isNaN() const { … }
bool DecimalQuantity::isZeroish() const { … }
DecimalQuantity &DecimalQuantity::setToInt(int32_t n) { … }
void DecimalQuantity::_setToInt(int32_t n) { … }
DecimalQuantity &DecimalQuantity::setToLong(int64_t n) { … }
void DecimalQuantity::_setToLong(int64_t n) { … }
DecimalQuantity &DecimalQuantity::setToDouble(double n) { … }
void DecimalQuantity::_setToDoubleFast(double n) { … }
void DecimalQuantity::convertToAccurateDouble() { … }
DecimalQuantity &DecimalQuantity::setToDecNumber(StringPiece n, UErrorCode& status) { … }
DecimalQuantity& DecimalQuantity::setToDecNum(const DecNum& decnum, UErrorCode& status) { … }
void DecimalQuantity::_setToDecNum(const DecNum& decnum, UErrorCode& status) { … }
DecimalQuantity DecimalQuantity::fromExponentString(UnicodeString num, UErrorCode& status) { … }
int32_t DecimalQuantity::getVisibleFractionCount(UnicodeString value) { … }
int64_t DecimalQuantity::toLong(bool truncateIfOverflow) const { … }
uint64_t DecimalQuantity::toFractionLong(bool includeTrailingZeros) const { … }
bool DecimalQuantity::fitsInLong(bool ignoreFraction) const { … }
double DecimalQuantity::toDouble() const { … }
DecNum& DecimalQuantity::toDecNum(DecNum& output, UErrorCode& status) const { … }
void DecimalQuantity::truncate() { … }
void DecimalQuantity::roundToNickel(int32_t magnitude, RoundingMode roundingMode, UErrorCode& status) { … }
void DecimalQuantity::roundToMagnitude(int32_t magnitude, RoundingMode roundingMode, UErrorCode& status) { … }
void DecimalQuantity::roundToMagnitude(int32_t magnitude, RoundingMode roundingMode, bool nickel, UErrorCode& status) { … }
void DecimalQuantity::roundToInfinity() { … }
void DecimalQuantity::appendDigit(int8_t value, int32_t leadingZeros, bool appendAsInteger) { … }
UnicodeString DecimalQuantity::toPlainString() const { … }
UnicodeString DecimalQuantity::toExponentString() const { … }
UnicodeString DecimalQuantity::toScientificString() const { … }
int8_t DecimalQuantity::getDigitPos(int32_t position) const { … }
void DecimalQuantity::setDigitPos(int32_t position, int8_t value) { … }
void DecimalQuantity::shiftLeft(int32_t numDigits) { … }
void DecimalQuantity::shiftRight(int32_t numDigits) { … }
void DecimalQuantity::popFromLeft(int32_t numDigits) { … }
void DecimalQuantity::setBcdToZero() { … }
void DecimalQuantity::readIntToBcd(int32_t n) { … }
void DecimalQuantity::readLongToBcd(int64_t n) { … }
void DecimalQuantity::readDecNumberToBcd(const DecNum& decnum) { … }
void DecimalQuantity::readDoubleConversionToBcd(
const char* buffer, int32_t length, int32_t point) { … }
void DecimalQuantity::compact() { … }
void DecimalQuantity::ensureCapacity() { … }
void DecimalQuantity::ensureCapacity(int32_t capacity) { … }
void DecimalQuantity::switchStorage() { … }
void DecimalQuantity::copyBcdFrom(const DecimalQuantity &other) { … }
void DecimalQuantity::moveBcdFrom(DecimalQuantity &other) { … }
const char16_t* DecimalQuantity::checkHealth() const { … }
bool DecimalQuantity::operator==(const DecimalQuantity& other) const { … }
UnicodeString DecimalQuantity::toString() const { … }
#endif