NDiv
NDiv[m, n]
Performs integer division of m by n, rounding toward negative infinity (floor division).
This behavior ensures that NDiv and Mod together satisfy the identity:
Let[always_true, Fun[{ m, n }, Eq[Add[Mul[NDiv[m, n], n], Mod[m, n]], m]]];
always_true[7, -3]; (* => #t *)
always_true[-9, 2]; (* => #t *)
mandnshould be integers.- Returns a
Numberrepresenting the integer quotient.
NDiv[7, 3]; (* => 2 *)
NDiv[-7, 3]; (* => -3 *)
Neg
Neg[n]
Returns the negation (additive inverse) of n.
Since KSL does not provide a unary minus operator, this function is used to obtain the opposite sign.
- Returns a
Number.
Neg[3]; (* => -3 *)
Neg[-5]; (* => 5 *)
Neg[0]; (* => 0 *)
Not
Not[b]
Returns the logical negation of a boolean value b.
bmust be#tor#f.- Returns
#tifbis#f, and#fifbis#t.
Not[#t]; (* => #f *)
Not[#f]; (* => #t *)