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

Method ToRealPositiveNoSplit

cpp/src/arrow/util/decimal.cc:460–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458
459 template <typename Real>
460 static Real ToRealPositiveNoSplit(const Decimal128& decimal, int32_t scale) {
461 Real x = RealTraits<Real>::two_to_64(static_cast<Real>(decimal.high_bits()));
462 x += static_cast<Real>(decimal.low_bits());
463 x *= LargePowerOfTen<Real>(-scale);
464 return x;
465 }
466
467 /// An approximate conversion from Decimal128 to Real that guarantees:
468 /// 1. If the decimal is an integer, the conversion is exact.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected