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

Function Divide

cpp/src/arrow/util/decimal.h:88–92  ·  view source on GitHub ↗

\brief Divide this number by right and return the result. This operation is not destructive. The answer rounds to zero. Signs work like: 21 / 5 -> 4, 1 -21 / 5 -> -4, -1 21 / -5 -> -4, 1 -21 / -5 -> 4, -1 \param[in] divisor the number to divide by \return the pair of the quotient and the remainder

Source from the content-addressed store, hash-verified

86 /// \param[in] divisor the number to divide by
87 /// \return the pair of the quotient and the remainder
88 Result<std::pair<Decimal32, Decimal32>> Divide(const Decimal32& divisor) const {
89 std::pair<Decimal32, Decimal32> result;
90 ARROW_RETURN_NOT_OK(BasicDecimal32::Divide(divisor, &result.first, &result.second));
91 return result;
92 }
93
94 /// \brief Convert the Decimal32 value to a base 10 decimal string with the given scale
95 std::string ToString(int32_t scale) const;

Callers 3

GetWholeAndFractionMethod · 0.70
ReduceScaleByMethod · 0.70
basic_decimal.ccFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected