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

Function FixDivisionSigns

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

Source from the content-addressed store, hash-verified

764/// the signs of the dividend and divisor.
765template <class DecimalClass>
766static inline void FixDivisionSigns(DecimalClass* result, DecimalClass* remainder,
767 bool dividend_was_negative,
768 bool divisor_was_negative) {
769 if (dividend_was_negative != divisor_was_negative) {
770 result->Negate();
771 }
772
773 if (dividend_was_negative) {
774 remainder->Negate();
775 }
776}
777
778/// \brief Build a native endian array of uint64_t from a big endian array of uint32_t.
779template <size_t N>

Callers 2

SingleDivideFunction · 0.85
DecimalDivideFunction · 0.85

Calls 1

NegateMethod · 0.80

Tested by

no test coverage detected