MCPcopy Create free account
hub / github.com/apache/arrow / GetWholeAndFraction

Method GetWholeAndFraction

cpp/src/arrow/util/basic_decimal.cc:95–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void BasicDecimal32::GetWholeAndFraction(int scale, BasicDecimal32* whole,
96 BasicDecimal32* fraction) const {
97 DCHECK_GE(scale, 0);
98 DCHECK_LE(scale, kMaxScale);
99
100 BasicDecimal32 multiplier(DecimalTraits<BasicDecimal32>::powers_of_ten()[scale]);
101 auto s = Divide(multiplier, whole, fraction);
102 DCHECK_EQ(s, DecimalStatus::kSuccess);
103}
104
105const BasicDecimal32& BasicDecimal32::GetMaxValue() {
106 return DecimalTraits<BasicDecimal32>::kMaxValue;

Callers 7

ToRealPositiveMethod · 0.80
ToRealPositiveMethod · 0.80
ToRealPositiveMethod · 0.80
ToRealPositiveMethod · 0.80
TYPED_TESTFunction · 0.80
AddLargePositiveFunction · 0.80
AddLargeNegativeFunction · 0.80

Calls 1

DivideFunction · 0.70

Tested by 1

TYPED_TESTFunction · 0.64