|
| template<> |
| bool | Operation (const double &lo, const double d, const double &hi, double &result) |
| template<> |
| bool | Operation (const float &lo, const double d, const float &hi, float &result) |
| template<> |
| bool | Operation (const hugeint_t &lo, const double d, const hugeint_t &hi, hugeint_t &result) |
| template<> |
| bool | Operation (const uhugeint_t &lo, const double d, const uhugeint_t &hi, uhugeint_t &result) |
|
| template<typename T> |
| static bool | Operation (const T &lo, const double d, const T &hi, T &result) |
◆ Operation() [1/5]
template<typename T>
| bool duckdb::TryExtrapolateOperator::Operation |
( |
const T & | lo, |
|
|
const double | d, |
|
|
const T & | hi, |
|
|
T & | result ) |
|
inlinestatic |
259062 {
259063 if (lo > hi) {
259064 return Operation<T>(hi, -d, lo, result);
259065 }
259066 const auto delta = LossyNumericCast<double>(hi - lo);
259067 T offset;
259068 if (d < 0) {
259069 if (!TryCast::Operation(delta * (-d), offset)) {
259070 return false;
259071 }
259072 return TrySubtractOperator::Operation(lo, offset, result);
259073 ;
259074 }
259075
259076 if (!TryCast::Operation(delta * d, offset)) {
259077 return false;
259078 }
259079 return TryAddOperator::Operation(lo, offset, result);
259080 }
◆ Operation() [2/5]
template<>
| bool duckdb::TryExtrapolateOperator::Operation |
( |
const double & | lo, |
|
|
const double | d, |
|
|
const double & | hi, |
|
|
double & | result ) |
259084 {
259085 result = InterpolateOperator::Operation<double>(lo, d, hi);
259086 return true;
259087}
◆ Operation() [3/5]
template<>
| bool duckdb::TryExtrapolateOperator::Operation |
( |
const float & | lo, |
|
|
const double | d, |
|
|
const float & | hi, |
|
|
float & | result ) |
259090 {
259091 result = InterpolateOperator::Operation<float>(lo, d, hi);
259092 return true;
259093}
◆ Operation() [4/5]
259096 {
259097 double temp;
259098 return Operation(Hugeint::Cast<double>(lo), d, Hugeint::Cast<double>(hi), temp) &&
259099 Hugeint::TryConvert(temp, result);
259100}
◆ Operation() [5/5]
259103 {
259104 double temp;
259105 return Operation(Uhugeint::Cast<double>(lo), d, Uhugeint::Cast<double>(hi), temp) &&
259106 Uhugeint::TryConvert(temp, result);
259107}
The documentation for this struct was generated from the following file: