I like to develop my formulae in a spreadsheet, before moving it into code. I often use round() in my spreadsheet work, and copied a formula using that to Arduino, not realizing that round() does not exist in the Arduino reference.

I've seen some convoluted ways to make numbers round up or down, but find the generic C/C++ Round function, round(), works just fine:

a = round(b);

If b = 12.5, then a = 12, but if b = 12.6, then a = 13.

http://www.codecogs.com/reference/computing/c/math.h/round.php

How many other standard c math functions are undocumented in Arduino, but still work?