MCPcopy Create free account
hub / github.com/apache/arrow-rs / rem

Function rem

arrow-arith/src/numeric.rs:77–79  ·  view source on GitHub ↗

Perform `lhs % rhs` Division by zero will result in an error, with exception to floating point numbers, which instead follow the IEEE 754 rules `signed_integer::MIN % -1` will not result in an error but return 0

(lhs: &dyn Datum, rhs: &dyn Datum)

Source from the content-addressed store, hash-verified

75///
76/// `signed_integer::MIN % -1` will not result in an error but return 0
77pub fn rem(lhs: &dyn Datum, rhs: &dyn Datum) -> Result<ArrayRef, ArrowError> {
78 arithmetic_op(Op::Rem, lhs, rhs)
79}
80
81macro_rules! neg_checked {
82 ($t:ty, $a:ident) => {{

Callers 5

add_benchmarkFunction · 0.85
test_integerFunction · 0.85
test_floatFunction · 0.85
test_decimalFunction · 0.85
test_duration_implFunction · 0.85

Calls 1

arithmetic_opFunction · 0.85

Tested by 4

test_integerFunction · 0.68
test_floatFunction · 0.68
test_decimalFunction · 0.68
test_duration_implFunction · 0.68