As a mathematician, one of my pet peeves of C-derived languages is :
(-1) % 8 // comes out as -1, and not 7
fmodf(-1,8) // fails similarly
What is the most effective solution?
Templates and operator overloading are both possible in C++, but both are unfamiliar to me.
Thank you for providing examples.