MCPcopy Create free account
hub / github.com/apache/datafusion / pow_decimal256_float

Function pow_decimal256_float

datafusion/functions/src/math/power.rs:275–287  ·  view source on GitHub ↗

Decimal256 specialized float exponent version.

(base: i256, scale: i8, exp: f64)

Source from the content-addressed store, hash-verified

273
274/// Decimal256 specialized float exponent version.
275fn pow_decimal256_float(base: i256, scale: i8, exp: f64) -> Result<i256, ArrowError> {
276 if exp.is_finite() && exp.trunc() == exp && exp >= 0f64 && exp < u32::MAX as f64 {
277 return pow_decimal256_int(base, scale, exp as i64);
278 }
279
280 if !exp.is_finite() {
281 return Err(ArrowError::ComputeError(format!(
282 "Cannot use non-finite exp: {exp}"
283 )));
284 }
285
286 pow_decimal256_float_fallback(base, scale, exp)
287}
288
289/// Decimal256 specialized integer exponent version.
290fn pow_decimal256_int(base: i256, scale: i8, exp: i64) -> Result<i256, ArrowError> {

Callers 2

pow_decimal256_intFunction · 0.85
invoke_with_argsMethod · 0.85

Calls 2

pow_decimal256_intFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…