As the title says, converting floating-point values into integers correctly: http://www.cs.tut.fi/~jkorpela/round.html