@noelle @craigmaloney@octodon.social oh, hm, not sure if i agree with that definition of remainder
technically speaking, it's a standardized 'remainder-near' function, so my only real issue with it is the name :P
anyway it's easy enough to
a%b - b if a < 0 else a%b
so there's no real issue
@craigmaloney@octodon.social @noelle if you're curious about this decision, it comes from how python rounds //
many languages drop the fractional part, so -6 // 8 is 0. you then need a -6 to get back to your original value.
8*0 + (-6) == -6
python always rounds down, so -6 // 8 is -1. so you need a 2:
8*(-1) + 2 == -6
@Lady @craigmaloney But entertainingly, math.remainder still doesn't give OP the answer they want: