It seems to me you have just said that rounding errors do not exist. You be better aware of them, rather than saying it does not exist.
Yes it does. For example if you want to derive a 115200 baud from the 18.432 crystal, you will typically need to divide by 10 to get the typical 115200*16 oversampling base clock.
If you divide 18431999 by 115200 and then by 16, you will get 9. Yes, nine, that is 10% off. (Note that more things have to be fucked up for this to happen, but I very easily see how this can happen in many amateur software projcts.)
This is why you don't just simply calculate the baud rate divisors with a simple single mathematic operator and call it the day.
Comm devices with divisors are often so quantized in the baud rate options (off-by-one leading to massive errors) that you really have two options:
1) Hardcode the divisor value, calculate the resulting baud rate manually, and document it as a comment
Pros:
- very robust and reliable, no ugly surprises in baud rate generation, little surface area for bugs
Cons:
- non-generic, you need to remember to recalculate if you change the baud rate or the crystal, and there's a risk you forget to do that
2) Write (or find an existing) a proper function that sets the divisor for the minimum error, and reports the calculated error, and provides a way to abort operation if the error is outside valid range
Basically, calc_divider(min_baud, preferred_baud, max_baud, clk) which returns success or failure.
Pros:
- when done right, is generic; you can change crystals and baud rates, and use this function before you do that to calculate the viability of doing so
Cons:
- a lot of surface area for bugs, or wrong concepts of implementation. Actually I have never seen this done right...
Option 2 is far worse if you do it in a half-arsed way.
Just assigning some mathematical operation in the baud divisor register looks easy and "generic", but is a recipe for disaster. It's only going to work for some certain values, while it deceivingly
looks generic. So you would need to comment "don't change this constant"; it's better to use the literal directly in the assignment.