In the PIC archy, the baud rate register needs a value equal to Fosc/(16*DesiredBaudRate) - 1. Obviously the math doesnt always make an int. I would want to take that definition and use some round() function on it to make it into an int. However, this obviously will take some processor time every time I try to evaluate it supposing that there is no optimization for round(someDefinedNumber).

I have a definition for OSC_FREQ, USART_BAUD, and the factor 16 is obvious. The compiler will normally optimize this through arithmetic, but how should I go about rounding the number?