zn_order(2,-7) returns -8; the order of a group element cannot be negative
Maxima 5.49post, SBCL 2.6.7.
(%i1) display2d:false$
(%i2) load(zn_functions)$
(%i3) zn_order(2,-7);
(%o3) -8
(%i4) zn_order(2,7);
(%o4) 3
Expected: (%o3) should be 3 (the modulus and its negation give the same ring), or an error rejecting the negative modulus. It returns n-1 for every unit modulo a negative n.
zn_carmichael_lambda behaves similarly, returning m-1 for every m <= 0.