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

Function ToReal

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

Source from the content-addressed store, hash-verified

149 /// \brief Convert to a floating-point number (scaled)
150 template <typename T, typename = std::enable_if_t<std::is_floating_point_v<T>>>
151 T ToReal(int32_t scale) const {
152 static_assert(std::is_same_v<T, float> || std::is_same_v<T, double>,
153 "Unexpected floating-point type");
154 if constexpr (std::is_same_v<T, float>) {
155 return ToFloat(scale);
156 } else {
157 return ToDouble(scale);
158 }
159 }
160
161 ARROW_FRIEND_EXPORT friend std::ostream& operator<<(std::ostream& os,
162 const Decimal32& decimal);

Callers

nothing calls this directly

Calls 1

ToDoubleFunction · 0.85

Tested by

no test coverage detected