daft.functions.pmod#
pmod #
pmod(a: Expression, b: Expression) -> Expression
Returns the positive modulo of a by b.
Computes r = a % b; returns r when r >= 0 and (r + b) % b otherwise. Examples: pmod(-7, 3) == 2, pmod(7, -3) == 1, pmod(-7, -3) == -1. Returns NULL when b is 0.
Source code in daft/functions/numeric.py
226 227 228 229 230 231 232 233 | |