Highly unusual. If language used is mainstream (think tiobe index for simplicty) and low level like c/c++ then the only thing i can think of right now is some library that you have taken dependency on overriden globally/publicly something crucial (one of operators maybe since its math? Just spitballing) and thus your program is behaving weirdly
Or god forbid data got corrupted silently and you only noticed it here but that would be weird in itself corruptions even silent ones usually manifest with much worse behaviour than that
Was the integer negative? Some languages/CPUs/runtimes round negatives upward, towards zero, rather than down.
LikeLike
Nope. Was positive.
LikeLike
What the heck? What language is this?
LikeLike
Forgot to ask – the divisor also? Both positive integers? Any chance some of the integers are actually declared as unsigned?
LikeLike
Both positive, signed.
LikeLike
Highly unusual. If language used is mainstream (think tiobe index for simplicty) and low level like c/c++ then the only thing i can think of right now is some library that you have taken dependency on overriden globally/publicly something crucial (one of operators maybe since its math? Just spitballing) and thus your program is behaving weirdly
Or god forbid data got corrupted silently and you only noticed it here but that would be weird in itself corruptions even silent ones usually manifest with much worse behaviour than that
LikeLike