What is a good algorithm to determine the necessary fraction needed to add/sub to the number in order to round it to the nearest integer without using the inbuilt ceiling or floor funcitons?
Edit: Looking for a mathematical number trick to figure out the part needed to round the number to the nearest integer. The more primitive the math operations the better. Please avoid using other's procedures. 0.5 can be taken eitherway, whatever suits your method. This is NOT my homework question, nor am I going to use this anywhere.