I am trying to give my students their final califications report but I am having problems rounding the final results.
We have an odd rounding system, for example, any value must be rounded to 4.5 if the value goes from 4.25 to 4.49. If the value is less than 4.24 it should be rounded to 4. In the other hand... if the value is between 4.75 and up it should be rounded to 5, if it's between 4.74 and 4.25 it should be 4.5.
In excel I used this: =IF(AL6-FLOOR(AL6,5)>2.5,CEILING(AL6,5),FLOOR(AL6,5))/10
(where AL6 is the cell where the result to be rounded is).
Any lights on this one using php?