Modulo?
Is there a way to perform the basic modulo operation on two UInt operands?
UInt<2> a, b, remainder;
a = 100;
b = 30;
a.Div(b, &remainder);
std::cout << a << std::endl;
std::cout << remainder << std::endl;
Perfect, thanks a lot! Can't wait for some documentation. ;)
Does the Div() function actually provide real modulo or is there rounding involved? I'm getting unpredictable answers with the program I wrote. What I need is either a remainder that is a floating point, or at the very least I need Div() to always round up. (ceiling) I don't care much what the remainder is, I just need to know whether or not it is zero.
Huh? how can you get a floating point from this operation?