@craigmaloney@octodon.social @noelle mod is NOT the same as remainder and this is the difference :). the problem (from this person's point of view, anyway, likely) is that most programming languages use % to mean remainder, and python (apparently) uses it to mean modulus.

@Lady @craigmaloney But entertainingly, math.remainder still doesn't give OP the answer they want:

Follow

@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

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.